Changeset 82da5f5 in mainline for arch/sparc64/src
- Timestamp:
- 2006-05-24T13:38:39Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 567807b1
- Parents:
- 8182031
- Location:
- arch/sparc64/src
- Files:
-
- 1 added
- 2 edited
-
console.c (modified) (1 diff)
-
drivers/i8042.c (added)
-
mm/page.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/sparc64/src/console.c
r8182031 r82da5f5 78 78 stdin = NULL; 79 79 80 dtlb_insert_mapping(KBD_VIRT_ADDRESS, KBD_PHYS_ADDRESS, PAGESIZE_8K, true, false); 81 80 kbd_init(); 82 81 fb_init(FB_PHYS_ADDRESS, FB_X_RES, FB_Y_RES, FB_COLOR_DEPTH, FB_X_RES * FB_COLOR_DEPTH / 8); 83 i8042_init();84 82 } 85 83 -
arch/sparc64/src/mm/page.c
r8182031 r82da5f5 32 32 #include <mm/frame.h> 33 33 #include <bitops.h> 34 #include <debug.h> 34 35 35 36 void page_arch_init(void) … … 41 42 { 42 43 unsigned int order; 44 int i; 45 46 struct { 47 int pagesize; 48 size_t increment; 49 count_t count; 50 } sizemap[] = { 51 { PAGESIZE_8K, 0, 1 }, /* 8K */ 52 { PAGESIZE_8K, PAGE_SIZE, 2 }, /* 16K */ 53 { PAGESIZE_8K, PAGE_SIZE, 4 }, /* 32K */ 54 { PAGESIZE_64K, 0, 1}, /* 64K */ 55 { PAGESIZE_64K, 8*PAGE_SIZE, 2 }, /* 128K */ 56 { PAGESIZE_64K, 8*PAGE_SIZE, 4 }, /* 256K */ 57 { PAGESIZE_512K, 0, 1 }, /* 512K */ 58 { PAGESIZE_512K, 64*PAGE_SIZE, 2 }, /* 1M */ 59 { PAGESIZE_512K, 64*PAGE_SIZE, 4 }, /* 2M */ 60 { PAGESIZE_4M, 0, 1 } /* 4M */ 61 }; 62 63 ASSERT(size <= 4*1024*1024); 43 64 44 65 if (size <= FRAME_SIZE) … … 48 69 49 70 __address virtaddr = PA2KA(PFN2ADDR(frame_alloc(order, FRAME_KA))); 50 51 dtlb_insert_mapping(virtaddr, physaddr, PAGESIZE_512K, true, false); 52 dtlb_insert_mapping(virtaddr + 512 * 1024, physaddr + 512 * 1024, PAGESIZE_512K, true, false); 71 72 for (i = 0; i < sizemap[order].count; i++) 73 dtlb_insert_mapping(virtaddr + i*sizemap[order].increment, 74 physaddr + i*sizemap[order].increment, 75 sizemap[order].pagesize, true, false); 53 76 54 77 return virtaddr;
Note:
See TracChangeset
for help on using the changeset viewer.
