diff --git a/bochs/bios/BIOS-bochs-latest b/bochs/bios/BIOS-bochs-latest index a32fddbbd..5110baff6 100644 Binary files a/bochs/bios/BIOS-bochs-latest and b/bochs/bios/BIOS-bochs-latest differ diff --git a/bochs/bios/BIOS-bochs-legacy b/bochs/bios/BIOS-bochs-legacy index 1738b968e..6a2af0b99 100644 Binary files a/bochs/bios/BIOS-bochs-legacy and b/bochs/bios/BIOS-bochs-legacy differ diff --git a/bochs/bios/Makefile.in b/bochs/bios/Makefile.in index b05591052..af674b476 100644 --- a/bochs/bios/Makefile.in +++ b/bochs/bios/Makefile.in @@ -106,6 +106,7 @@ rombios32.o: rombios32.c acpi-dsdt.hex ifeq ("1", "0") acpi-dsdt.hex: acpi-dsdt.dsl iasl -tc -p $@ $< + sed -i -e's/^unsigned/const unsigned/' $@ endif rombios32start.o: rombios32start.S diff --git a/bochs/bios/rombios.c b/bochs/bios/rombios.c index b4e71d889..a21a08299 100644 --- a/bochs/bios/rombios.c +++ b/bochs/bios/rombios.c @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: rombios.c,v 1.217 2008-12-04 18:42:32 sshwarts Exp $ +// $Id: rombios.c,v 1.218 2008-12-04 18:44:14 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -940,7 +940,7 @@ Bit16u cdrom_boot(); #endif // BX_ELTORITO_BOOT -static char bios_cvs_version_string[] = "$Revision: 1.217 $ $Date: 2008-12-04 18:42:32 $"; +static char bios_cvs_version_string[] = "$Revision: 1.218 $ $Date: 2008-12-04 18:44:14 $"; #define BIOS_COPYRIGHT_STRING "(c) 2002 MandrakeSoft S.A. Written by Kevin Lawton & the Bochs team." @@ -10036,13 +10036,6 @@ rombios32_05: mov gs, ax cld - ;; copy rombios32 code to ram (ram offset = 1MB) - mov esi, #0xfffe0000 - mov edi, #0x00040000 - mov ecx, #0x10000 / 4 - rep - movsd - ;; init the stack pointer mov esp, #0x00080000 @@ -10051,17 +10044,9 @@ rombios32_05: push #0x04b2 ;; call rombios32 code - mov eax, #0x00040000 + mov eax, #0x000e0000 call eax - ;; reset the memory (some boot loaders such as syslinux suppose - ;; that the memory is set to zero) - mov edi, #0x00040000 - mov ecx, #0x40000 / 4 - xor eax, eax - rep - stosd - ;; return to 16 bit protected mode first db 0xea dd rombios32_10 diff --git a/bochs/bios/rombios32.c b/bochs/bios/rombios32.c index ec0067135..484e6a1f6 100644 --- a/bochs/bios/rombios32.c +++ b/bochs/bios/rombios32.c @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: rombios32.c,v 1.36 2008-12-04 18:42:32 sshwarts Exp $ +// $Id: rombios32.c,v 1.37 2008-12-04 18:44:14 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // 32 bit Bochs BIOS init code diff --git a/bochs/bios/rombios32.ld b/bochs/bios/rombios32.ld index c7f6066ba..ff765c8b6 100644 --- a/bochs/bios/rombios32.ld +++ b/bochs/bios/rombios32.ld @@ -3,14 +3,12 @@ OUTPUT_ARCH(i386) ENTRY(_start); SECTIONS { - . = 0x00040000; + . = 0x000e0000; .text : { *(.text) } - .rodata : { *(.rodata) } - . = ALIGN(4096); - .data : { *(.data) } - __bss_start = . ; - .bss : { *(.bss) *(COMMON) } + .rodata : { *(.rodata*) } _end = . ; + .data 0x700 : AT (_end) { __data_start = .; *(.data); __data_end = .;} + .bss : { __bss_start = .; *(.bss) *(COMMON); __bss_end = .;} /DISCARD/ : { *(.stab) *(.stabstr) *(.comment) diff --git a/bochs/bios/rombios32start.S b/bochs/bios/rombios32start.S index 88abae697..842079050 100644 --- a/bochs/bios/rombios32start.S +++ b/bochs/bios/rombios32start.S @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: rombios32start.S,v 1.5 2008-03-28 09:02:57 sshwarts Exp $ +// $Id: rombios32start.S,v 1.6 2008-12-04 18:44:14 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // 32 bit Bochs BIOS init code @@ -32,10 +32,17 @@ _start: /* clear bss section */ xor %eax, %eax mov $__bss_start, %edi - mov $_end, %ecx + mov $__bss_end, %ecx sub %edi, %ecx rep stosb + /* copy data section */ + mov $_end, %esi + mov $__data_start, %edi + mov $__data_end, %ecx + sub %edi, %ecx + rep movsb + jmp rombios32_init .code16