Changeset 11485dec in mainline for arch/ia32/src/boot/memmap.S


Ignore:
Timestamp:
2005-07-26T19:58:32Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
117183b
Parents:
e2e56fa9
Message:

Fix IA-32's get_memory_size() to return size of memory in bytes instead of in kilobytes.
Some cosmetics in memory map detection.
The IA-32 kernel is functional again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/boot/memmap.S

    re2e56fa9 r11485dec  
    4949        movw    %bx,%es
    5050        movw    $e820table,%di
    51         movb    $E820_MAX_RECORDS,(e820counter)
     51        movb    $E820_MAX_RECORDS,e820counter
    5252e820loop:       
    5353        movl    $E820_SMAP,%edx         # control sequence "SMAP"
     
    6868        movw    %ax,%di
    6969               
    70         decb    (e820counter) # buffer is full
     70        decb    e820counter # buffer is full
    7171        jz      e820end
    7272       
     
    7676e820end:
    7777        movb    $E820_MAX_RECORDS,%al
    78         subb    (e820counter),%al
    79         movb    %al,(e820counter) # store # of valid entries in e820counter
     78        subb    e820counter,%al
     79        movb    %al,e820counter # store # of valid entries in e820counter
    8080
    8181        jmp     e801begin
    8282
    8383e820err:
    84         movb    $0,(e820counter)
     84        movb    $0,e820counter
    8585
    8686# method e801 - get size of memory
     
    110110        andl    $0xffff,%ecx
    111111        addl    %ecx,%edx
    112         addl    $0x0400,%edx  # add lower 1 MB - its not count by e801 method
    113         movl    %edx,(e801memorysize)           
     112        addl    $0x0400,%edx  # add lower 1 MB - it's not included by e801 method
     113        movl    %edx,e801memorysize
    114114e801end:
    115115        ret
Note: See TracChangeset for help on using the changeset viewer.