Changeset 94d614e in mainline for kernel/arch/sparc64/src/mm/frame.c
- Timestamp:
- 2006-07-13T17:32:38Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a5f76758
- Parents:
- 63cda71
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/frame.c
r63cda71 r94d614e 34 34 35 35 #include <arch/mm/frame.h> 36 #include <genarch/ofw/memory_init.h>37 36 #include <mm/frame.h> 37 #include <arch/boot/boot.h> 38 38 #include <config.h> 39 39 #include <align.h> 40 40 41 /** Create memory zones according to information stored in bootinfo. 42 * 43 * Walk the bootinfo memory map and create frame zones according to it. 44 * The first frame is not blacklisted here as it is done in generic 45 * frame_init(). 46 */ 41 47 void frame_arch_init(void) 42 48 { 43 ofw_init_zones(); 49 int i; 50 pfn_t confdata; 44 51 45 /* 46 * Workaround to prevent slab allocator from allocating frame 0. 47 * Frame 0 is 48 * a) not mapped by OFW 49 * b) would be confused with NULL error return code 50 */ 51 frame_mark_unavailable(0, 1); 52 for (i = 0; i < bootinfo.memmap.count; i++) { 53 54 /* 55 * The memmap is created by HelenOS boot loader. 56 * It already contains no holes. 57 */ 58 59 confdata = ADDR2PFN(bootinfo.memmap.zones[i].start); 60 if (confdata == 0) 61 confdata = 2; 62 zone_create(ADDR2PFN(bootinfo.memmap.zones[i].start), 63 SIZE2FRAMES(ALIGN_DOWN(bootinfo.memmap.zones[i].size, PAGE_SIZE)), 64 confdata, 0); 65 } 66 52 67 } 53 68
Note:
See TracChangeset
for help on using the changeset viewer.