core: move __jiffies and _IdleTimer to .data16 syslinux-4.00-pre37
authorH. Peter Anvin <hpa@linux.intel.com>
Tue, 30 Mar 2010 23:31:47 +0000 (16:31 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 30 Mar 2010 23:31:47 +0000 (16:31 -0700)
Move the __jiffies and _IdleTimer variables to the .data16 segment.
This ensures that if do_idle is invoked very early that it will not
jump off into a non-existent idle routine.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core/idle.inc
core/timer.inc

index 0da03ef..9677c82 100644 (file)
@@ -70,13 +70,12 @@ do_idle:
 .ret:          ret
 
                section .data16
-               alignz 2
+               alignz 4
+               global _IdleTimer
+_IdleTimer     dd 0
                global NoHalt
 NoHalt         dw 0
 
 hlt_err                db 'ERROR: idle with IF=0', CR, LF, 0 
 
-               section .bss16
-               global _IdleTimer
-               alignb 4
-_IdleTimer     resd 1
+               section .text16
index 095e92e..728812b 100644 (file)
@@ -40,7 +40,7 @@ timer_irq:
                jmp 0:0
 BIOS_timer_next        equ $-4
 
-               section .bss16
-               alignb 4
+               section .data16
+               alignz 4
                global __jiffies
-__jiffies      resd 1                  ; The actual timer variable
+__jiffies      dd 0                    ; The actual timer variable