summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bios/BIOS-bochs-latestbin131042 -> 131042 bytes
-rw-r--r--bios/BIOS-bochs-legacybin65506 -> 65506 bytes
-rw-r--r--bios/Makefile.in1
-rw-r--r--bios/rombios.c17
-rw-r--r--bios/rombios32.ld10
-rw-r--r--bios/rombios32start.S9
6 files changed, 14 insertions, 23 deletions
diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest
index f588e7a8..bcad368c 100644
--- a/bios/BIOS-bochs-latest
+++ b/bios/BIOS-bochs-latest
Binary files differ
diff --git a/bios/BIOS-bochs-legacy b/bios/BIOS-bochs-legacy
index 24a34d59..f1f9430b 100644
--- a/bios/BIOS-bochs-legacy
+++ b/bios/BIOS-bochs-legacy
Binary files differ
diff --git a/bios/Makefile.in b/bios/Makefile.in
index b0559105..af674b47 100644
--- a/bios/Makefile.in
+++ b/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/bios/rombios.c b/bios/rombios.c
index f8e70e36..1942609a 100644
--- a/bios/rombios.c
+++ b/bios/rombios.c
@@ -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/bios/rombios32.ld b/bios/rombios32.ld
index c7f6066b..ff765c8b 100644
--- a/bios/rombios32.ld
+++ b/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/bios/rombios32start.S b/bios/rombios32start.S
index 9dd396a2..d96d1b75 100644
--- a/bios/rombios32start.S
+++ b/bios/rombios32start.S
@@ -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