Changeset c6e314a in mainline
- Timestamp:
- 2006-07-14T11:39:02Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 08a7802f
- Parents:
- 10b890b
- Location:
- kernel
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/mm/frame.c
r10b890b rc6e314a 137 137 138 138 #ifdef CONFIG_SIMICS_FIX 139 /* Don't know why, but th isaddresses help */139 /* Don't know why, but these addresses help */ 140 140 frame_mark_unavailable(0xd000 >> FRAME_WIDTH,3); 141 141 #endif -
kernel/arch/sparc64/include/mm/frame.h
r10b890b rc6e314a 27 27 */ 28 28 29 29 /** @addtogroup sparc64mm 30 30 * @{ 31 31 */ … … 48 48 struct { 49 49 unsigned : 23; 50 uint64_t pfn : 28; 51 unsigned offset : 13; 50 uint64_t pfn : 28; /**< Physical Frame Number. */ 51 unsigned offset : 13; /**< Offset. */ 52 52 } __attribute__ ((packed)); 53 53 }; … … 55 55 typedef union frame_address frame_address_t; 56 56 57 extern uintptr_t last_frame; 57 58 extern void frame_arch_init(void); 58 59 … … 62 63 #endif 63 64 64 65 /** @} 65 66 */ 66 -
kernel/arch/sparc64/src/mm/frame.c
r10b890b rc6e314a 36 36 #include <mm/frame.h> 37 37 #include <arch/boot/boot.h> 38 #include <arch/types.h> 38 39 #include <config.h> 39 40 #include <align.h> 41 #include <macros.h> 42 43 uintptr_t last_frame = NULL; 40 44 41 45 /** Create memory zones according to information stored in bootinfo. … … 51 55 52 56 for (i = 0; i < bootinfo.memmap.count; i++) { 57 uintptr_t start = bootinfo.memmap.zones[i].start; 58 size_t size = bootinfo.memmap.zones[i].size; 53 59 54 60 /* … … 57 63 */ 58 64 59 confdata = ADDR2PFN( bootinfo.memmap.zones[i].start);65 confdata = ADDR2PFN(start); 60 66 if (confdata == 0) 61 67 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);68 zone_create(ADDR2PFN(start), SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)), confdata, 0); 69 70 last_frame = max(last_frame, start + ALIGN_UP(size, FRAME_SIZE)); 65 71 } 66 72 -
kernel/arch/sparc64/src/mm/page.c
r10b890b rc6e314a 27 27 */ 28 28 29 29 /** @addtogroup sparc64mm 30 30 * @{ 31 31 */ … … 37 37 #include <genarch/mm/page_ht.h> 38 38 #include <mm/frame.h> 39 #include <arch/mm/frame.h> 39 40 #include <bitops.h> 40 41 #include <debug.h> 42 #include <align.h> 41 43 42 44 void page_arch_init(void) … … 73 75 else 74 76 order = (fnzb32(size - 1) + 1) - FRAME_WIDTH; 77 78 /* 79 * Use virtual addresses that are beyond the limit of physical memory. 80 * Thus, the physical address space will not be wasted by holes created 81 * by frame_alloc(). 82 */ 83 ASSERT(last_frame); 84 uintptr_t virtaddr = ALIGN_UP(last_frame, 1<<(order + FRAME_WIDTH)); 85 last_frame = ALIGN_UP(virtaddr + size, 1<<(order + FRAME_WIDTH)); 75 86 76 uintptr_t virtaddr = (uintptr_t) frame_alloc(order, FRAME_KA);77 78 87 for (i = 0; i < sizemap[order].count; i++) 79 88 dtlb_insert_mapping(virtaddr + i*sizemap[order].increment, … … 84 93 } 85 94 86 95 /** @} 87 96 */ 88 -
kernel/arch/sparc64/src/mm/tlb.c
r10b890b rc6e314a 60 60 void tlb_arch_init(void) 61 61 { 62 /* 63 * TLBs are actually initialized by 64 * take_over_tlb_and_tt() early 65 * in start.S. 66 */ 62 67 } 63 68 -
kernel/generic/src/mm/as.c
r10b890b rc6e314a 1522 1522 } 1523 1523 1524 /** Wrapper for as_area_resize . */1524 /** Wrapper for as_area_resize(). */ 1525 1525 unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags) 1526 1526 { … … 1528 1528 } 1529 1529 1530 /** Wrapper for as_area_destroy . */1530 /** Wrapper for as_area_destroy(). */ 1531 1531 unative_t sys_as_area_destroy(uintptr_t address) 1532 1532 {
Note:
See TracChangeset
for help on using the changeset viewer.