lkml.org 
[lkml]   [2006]   [Aug]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromKeith Owens <>
SubjectRe: [PATCH RFC 3/6] Use %gs as the PDA base-segment in the kernel.
DateSun, 27 Aug 2006 19:49:31 +1000
Jeremy Fitzhardinge (on Sun, 27 Aug 2006 01:44:20 -0700) wrote:
>2: entry.S constructs the stack in the shape of struct pt_regs, and this
>   is passed around the kernel so that the process's saved register
>   state can be accessed.
>--- a/arch/i386/kernel/entry.S
>+++ b/arch/i386/kernel/entry.S
>@@ -30,12 +30,14 @@
>  *	18(%esp) - %eax
>  *	1C(%esp) - %ds
>  *	20(%esp) - %es
>+ *	24(%esp) - %fs	(not saved/restored)
>+ *	28(%esp) - %gs
>+ *	2C(%esp) - orig_eax
>+ *	30(%esp) - %eip
>+ *	34(%esp) - %cs
>+ *	38(%esp) - %eflags
>+ *	3C(%esp) - %oldesp
>+ *	40(%esp) - %oldss
...
>+FS		= 0x24
>+GS		= 0x28
>+ORIG_EAX	= 0x2C
>+EIP		= 0x30
>+CS		= 0x34
>+EFLAGS		= 0x38
>+OLDESP		= 0x3C
>+OLDSS		= 0x40

Now would be a good time to get rid of those hard coded numbers and use
asm-offsets instead.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-27 11:51    [from the cache]
©2003-2008