Changeset 32f6e1bd in mainline for arch/ia32/src/mm/memory_init.c


Ignore:
Timestamp:
2005-09-02T15:09:55Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
375237d1
Parents:
7df54df
Message:

Resolved mapping of e820 boot area, so that it can be accessed as
e820table from 32-bit mode and e820table_boot from real mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/mm/memory_init.c

    r7df54df r32f6e1bd  
    3232#include <print.h>
    3333
     34__u8 e820counter __attribute__ ((section ("BOOT_DATA"))) = 0xff;
     35struct e820memmap_ e820table[MEMMAP_E820_MAX_RECORDS] __attribute__ ((section ("BOOT_DATA"))) ;
     36
    3437size_t get_memory_size(void)
    3538{
     
    4144        __u8 i;
    4245       
    43         /*
    44          * We must not work with the original addresses for they are not mapped anymore.
    45          */
    46         struct e820memmap_ *memtable = (struct e820memmap_ *) PA2KA(e820table);
    47         __u32 *counter_p = (__u32 *) PA2KA(&e820counter);
    48        
    49        
    50         for (i=*counter_p;i>0;i--) {
    51                 printf("E820 base: %Q size: %Q type: ", memtable[i-1].base_address, memtable[i-1].size);
    52                 switch (memtable[i-1].type) {
     46        for (i=e820counter;i>0;i--) {
     47                printf("E820 base: %Q size: %Q type: ", e820table[i-1].base_address, e820table[i-1].size);
     48                switch (e820table[i-1].type) {
    5349                        case MEMMAP_MEMORY_AVAILABLE:
    5450                                printf("available memory\n");
Note: See TracChangeset for help on using the changeset viewer.