Ignore:
Timestamp:
Sep 4, 2006, 11:29:29 PM (14 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
b59eff1
Parents:
f74578a2
Message:
  • 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/start/start.S

    rf74578a2 r662c157  
    8888        cli                     # DISABLE INTERRUPTS!!!
    8989        cld
     90
     91                /* Save multiboot info */
     92                cmp     $0x2badb002,eax
     93                jne             1f
     94                /* We have multiboot info; let's hope DS and ES are OK... */
     95                movl    ebx, SYM(_boot_multiboot_info_p)
     96                /* Check for memory size info and save */
     97                movl    ebx, esi
     98                movl    $SYM(_boot_multiboot_info), edi
     99                movsd
     100                /* only save flag 1 since that's the only data we save */
     101                and             $1,-4(edi)
     102                je              1f
     103                movl    $2,ecx
     104                rep movsd
     1051:
    90106#ifdef DEBUG_EARLY_START
    91107        /*
     
    179195
    180196BEGIN_DATA
     197        PUBLIC(_boot_multiboot_info_p)
     198SYM(_boot_multiboot_info_p):
     199        .long 0
     200
     201        PUBLIC(_boot_multiboot_info)
     202SYM(_boot_multiboot_info):
     203        .long 0 /* flags */
     204        .long 0 /* mem_lower */
     205        .long 0 /* mem_upper */
    181206
    182207        PUBLIC(_stack_size)
Note: See TracChangeset for help on using the changeset viewer.