Changeset 32f6e1bd in mainline for arch/ia32/src/mm/memory_init.c
- Timestamp:
- 2005-09-02T15:09:55Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 375237d1
- Parents:
- 7df54df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/mm/memory_init.c
r7df54df r32f6e1bd 32 32 #include <print.h> 33 33 34 __u8 e820counter __attribute__ ((section ("BOOT_DATA"))) = 0xff; 35 struct e820memmap_ e820table[MEMMAP_E820_MAX_RECORDS] __attribute__ ((section ("BOOT_DATA"))) ; 36 34 37 size_t get_memory_size(void) 35 38 { … … 41 44 __u8 i; 42 45 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) { 53 49 case MEMMAP_MEMORY_AVAILABLE: 54 50 printf("available memory\n");
Note:
See TracChangeset
for help on using the changeset viewer.