diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2006-09-04 23:29:29 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2006-09-04 23:29:29 +0000 |
commit | 662c1577ac1eab66febb35a900e274c33676f834 (patch) | |
tree | 1e38693bb0ebcc1c59953752b83199fd879a8e6c /c/src/lib/libbsp/i386/pc386/start/start.S | |
parent | * startup/linkcmds: added *(.text.*) *(.data.*) *(.bss.*) (diff) | |
download | rtems-662c1577ac1eab66febb35a900e274c33676f834.tar.bz2 |
* startup/bspstart.c, start/start.S: Since the crude
memory autodetection code can easily fail (boards with
'reserved' regions - I experienced a hard lockup on a
dell precision 490 when writing past the bios-reported
memory size) I added code that a) tries to save
and use multiboot info, if present b) allows applications
to override/set memory size via a weak alias.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/start/start.S | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/start/start.S b/c/src/lib/libbsp/i386/pc386/start/start.S index c09903e807..361f973c2e 100644 --- a/c/src/lib/libbsp/i386/pc386/start/start.S +++ b/c/src/lib/libbsp/i386/pc386/start/start.S @@ -87,6 +87,22 @@ speakl: jmp speakl # and SPIN!!! nop cli # DISABLE INTERRUPTS!!! cld + + /* Save multiboot info */ + cmp $0x2badb002,eax + jne 1f + /* We have multiboot info; let's hope DS and ES are OK... */ + movl ebx, SYM(_boot_multiboot_info_p) + /* Check for memory size info and save */ + movl ebx, esi + movl $SYM(_boot_multiboot_info), edi + movsd + /* only save flag 1 since that's the only data we save */ + and $1,-4(edi) + je 1f + movl $2,ecx + rep movsd +1: #ifdef DEBUG_EARLY_START /* * Must get video attribute to have a working printk. @@ -178,6 +194,15 @@ SYM (zero_bss): END_CODE BEGIN_DATA + PUBLIC(_boot_multiboot_info_p) +SYM(_boot_multiboot_info_p): + .long 0 + + PUBLIC(_boot_multiboot_info) +SYM(_boot_multiboot_info): + .long 0 /* flags */ + .long 0 /* mem_lower */ + .long 0 /* mem_upper */ PUBLIC(_stack_size) SYM(_stack_size): |