Changeset 4037847 in mainline for arch/ppc32/src/mm
- Timestamp:
- 2006-03-24T19:14:12Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c715e9b
- Parents:
- 5201199
- Location:
- arch/ppc32/src/mm
- Files:
-
- 2 edited
-
frame.c (modified) (3 diffs)
-
memory_init.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/src/mm/frame.c
r5201199 r4037847 27 27 */ 28 28 29 #include <arch/boot/boot.h> 29 30 #include <arch/mm/frame.h> 30 #include <arch/boot/memmap.h>31 31 #include <arch/mm/memory_init.h> 32 32 #include <mm/frame.h> … … 43 43 size_t size; 44 44 45 for (i = 0; i < memmap.count; i++) {46 start = ADDR2PFN(ALIGN_UP( memmap.zones[i].start, FRAME_SIZE));47 size = SIZE2FRAMES(ALIGN_DOWN( memmap.zones[i].size, FRAME_SIZE));45 for (i = 0; i < bootinfo.memmap.count; i++) { 46 start = ADDR2PFN(ALIGN_UP(bootinfo.memmap.zones[i].start, FRAME_SIZE)); 47 size = SIZE2FRAMES(ALIGN_DOWN(bootinfo.memmap.zones[i].size, FRAME_SIZE)); 48 48 49 49 if ((minconf < start) || (minconf >= start + size)) … … 53 53 54 54 zone_create(start, size, conf, 0); 55 if (last_frame < ALIGN_UP( memmap.zones[i].start +memmap.zones[i].size, FRAME_SIZE))56 last_frame = ALIGN_UP( memmap.zones[i].start +memmap.zones[i].size, FRAME_SIZE);55 if (last_frame < ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE)) 56 last_frame = ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE); 57 57 } 58 58 -
arch/ppc32/src/mm/memory_init.c
r5201199 r4037847 27 27 */ 28 28 29 #include <arch/boot/ memmap.h>29 #include <arch/boot/boot.h> 30 30 #include <arch/mm/memory_init.h> 31 31 #include <typedefs.h> 32 32 #include <print.h> 33 33 34 memmap_t memmap;35 36 34 37 35 size_t get_memory_size(void) 38 36 { 39 return memmap.total;37 return bootinfo.memmap.total; 40 38 } 41 39 … … 45 43 count_t i; 46 44 47 for (i = 0; i < memmap.count; i++)48 printf("base: %L size: %L\n", memmap.zones[i].start,memmap.zones[i].size);45 for (i = 0; i < bootinfo.memmap.count; i++) 46 printf("base: %L size: %L\n", bootinfo.memmap.zones[i].start, bootinfo.memmap.zones[i].size); 49 47 }
Note:
See TracChangeset
for help on using the changeset viewer.
