Changeset 71eef11 in mainline for kernel/arch/amd64/src/boot/boot.S


Ignore:
Timestamp:
2008-02-06T14:24:13Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7208b6c
Parents:
1b067315
Message:

remove config.memory_size, get_memory_size() and memory_init.{c|d}
the amount of available memory can be calculated from the sizes of the zones
add FRAMES2SIZE, SIZE2KB and SIZE2MB functions/macros (code readability)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/boot/boot.S

    r1b067315 r71eef11  
    183183               
    184184                xorl %ecx, %ecx                                 # no memory size or map available
    185                 movl %ecx, e801memorysize
    186185                movl %ecx, e820counter
    187186               
     
    191190               
    192191                movl (%ebx), %eax                               # ebx = physical address of struct multiboot_info
    193                
    194                 bt $0, %eax                                     # mbi->flags[0] (mem_lower, mem_upper valid)
    195                 jc mem_valid
    196                        
    197                         xorl %ecx, %ecx
    198                         jmp mem_invalid
    199                        
    200                 mem_valid:
    201                 movl 4(%ebx), %ecx                              # mbi->mem_lower
    202                 addl 8(%ebx), %ecx                              # mbi->mem_upper
    203                
    204                 mem_invalid:
    205                 movl %ecx, e801memorysize
    206192               
    207193                bt $3, %eax                                     # mbi->flags[3] (mods_count, mods_addr valid)
Note: See TracChangeset for help on using the changeset viewer.