lkml.org 
[lkml]   [2008]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Regression: boot failure on AMD Elan TS-5500
H. Peter Anvin wrote:
>>>
>>> startup_32:
>>> cld
>>> /* test KEEP_SEGMENTS flag to see if the bootloader is asking
>>> * us to not reload segments */
>>> testb $(1<<6), BP_loadflags(%esi)
>>> jnz 1f
>>>
>>> cli
>>> movl $(__BOOT_DS),%eax
>>> movl %eax,%ds
>>> movl %eax,%es
>>> movl %eax,%fs
>>> movl %eax,%gs
>>> movl %eax,%ss
>>> 1:

On this general subject... I keep thinking that it would be better to
have this as:

movl %cs, %eax
addl $8, %eax
movl %eax, %cs

... instead of a hard-coded constant. That actually removes all
hard-coded uses of BOOT_CS/BOOT_DS until we eventually load the kernel's
own boot GDT at head_32.S:94.

Does anyone see any problem with that? As far as I can tell, we're
requiring %cs == BOOT_CS for the current code anyway (unless
KEEP_SEGMENTS), but %ds == %cs + 8 seems like a more sensible requirement.

-hpa


\
 
 \ /
  Last update: 2008-07-01 00:21    [W:0.107 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site