Changeset d43d2f7 in mainline
- Timestamp:
- 2005-12-06T19:42:04Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 090e7ea1
- Parents:
- 795ff98
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/mm/page.c
r795ff98 rd43d2f7 44 44 45 45 if (config.cpu_active == 1) { 46 dba = frame_alloc(FRAME_KA | FRAME_PANIC, 0);46 dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 47 47 memsetb(dba, PAGE_SIZE, 0); 48 48 … … 67 67 */ 68 68 69 dba = frame_alloc(FRAME_KA | FRAME_PANIC, 0);69 dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 70 70 memcpy((void *)dba, (void *)bootstrap_dba , PAGE_SIZE); 71 71 write_cr3(KA2PA(dba)); -
arch/ia32/src/mm/page.c
r795ff98 rd43d2f7 49 49 50 50 if (config.cpu_active == 1) { 51 dba = frame_alloc(FRAME_KA | FRAME_PANIC, 0);51 dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 52 52 memsetb(dba, PAGE_SIZE, 0); 53 53 … … 71 71 */ 72 72 73 dba = frame_alloc(FRAME_KA | FRAME_PANIC, 0);73 dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 74 74 memcpy((void *)dba, (void *)bootstrap_dba , PAGE_SIZE); 75 75 write_cr3(KA2PA(dba)); -
arch/mips32/src/mm/page.c
r795ff98 rd43d2f7 40 40 __address ptl0; 41 41 42 ptl0 = frame_alloc(FRAME_KA | FRAME_PANIC, 0);42 ptl0 = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 43 43 memsetb(ptl0, FRAME_SIZE, 0); 44 44 -
generic/include/mm/frame.h
r795ff98 rd43d2f7 36 36 #include <synch/spinlock.h> 37 37 #include <mm/buddy.h> 38 39 #define ONE_FRAME 0 38 40 39 41 #define FRAME_KA 1 /* skip frames conflicting with user address space */ -
generic/src/console/kconsole.c
r795ff98 rd43d2f7 426 426 } 427 427 428 /** Print detailed description of 'describe' command. */ 429 void desc_help(void) 430 { 431 printf("Syntax: describe command_name\n"); 432 } 433 428 434 /** Halt the kernel. 429 435 * 430 * @param argv Argument vector .431 * 432 * @return 0 on failure, 1 on success .436 * @param argv Argument vector (ignored). 437 * 438 * @return 0 on failure, 1 on success (never returns). 433 439 */ 434 440 int cmd_halt(cmd_arg_t *argv) … … 437 443 return 1; 438 444 } 439 440 /** Print detailed description of 'describe' command. */441 void desc_help(void)442 {443 printf("Syntax: describe command_name\n");444 } -
generic/src/cpu/cpu.c
r795ff98 rd43d2f7 61 61 62 62 for (i=0; i < config.cpu_count; i++) { 63 cpus[i].stack = (__u8 *) frame_alloc(FRAME_KA | FRAME_PANIC, 0);63 cpus[i].stack = (__u8 *) frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 64 64 if (!cpus[i].stack) 65 65 panic("malloc/cpus[%d].stack\n", i); -
generic/src/mm/page.c
r795ff98 rd43d2f7 80 80 81 81 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) { 82 newpt = frame_alloc(FRAME_KA, 0);82 newpt = frame_alloc(FRAME_KA, ONE_FRAME); 83 83 memsetb(newpt, PAGE_SIZE, 0); 84 84 SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt)); 85 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC );85 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE); 86 86 } 87 87 … … 89 89 90 90 if (GET_PTL2_FLAGS(ptl1, PTL1_INDEX(page)) & PAGE_NOT_PRESENT) { 91 newpt = frame_alloc(FRAME_KA, 0);91 newpt = frame_alloc(FRAME_KA, ONE_FRAME); 92 92 memsetb(newpt, PAGE_SIZE, 0); 93 93 SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt)); 94 SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC );94 SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE); 95 95 } 96 96 … … 98 98 99 99 if (GET_PTL3_FLAGS(ptl2, PTL2_INDEX(page)) & PAGE_NOT_PRESENT) { 100 newpt = frame_alloc(FRAME_KA, 0);100 newpt = frame_alloc(FRAME_KA, ONE_FRAME); 101 101 memsetb(newpt, PAGE_SIZE, 0); 102 102 SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt)); 103 SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC );103 SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE); 104 104 } 105 105 -
generic/src/mm/vm.c
r795ff98 rd43d2f7 70 70 71 71 src_ptl0 = (pte_t *) PA2KA((__address) GET_PTL0_ADDRESS()); 72 dst_ptl0 = (pte_t *) frame_alloc(FRAME_KA | FRAME_PANIC, 0);72 dst_ptl0 = (pte_t *) frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME); 73 73 74 74 // memsetb((__address) dst_ptl0, PAGE_SIZE, 0); … … 116 116 117 117 for (i=0; i<size; i++) 118 a->mapping[i] = frame_alloc(0, 0);118 a->mapping[i] = frame_alloc(0, ONE_FRAME); 119 119 120 120 spinlock_initialize(&a->lock); -
generic/src/proc/thread.c
r795ff98 rd43d2f7 176 176 spinlock_initialize(&t->lock); 177 177 178 frame_ks = frame_alloc(FRAME_KA, 0);178 frame_ks = frame_alloc(FRAME_KA, ONE_FRAME); 179 179 if (THREAD_USER_STACK & flags) { 180 frame_us = frame_alloc(FRAME_KA, 0);180 frame_us = frame_alloc(FRAME_KA, ONE_FRAME); 181 181 } 182 182 -
kernel.config
r795ff98 rd43d2f7 37 37 @ "print/print1" Printf test 1 38 38 @ "thread/trhead1" Thread test 1 39 @ "mm/mapping " Mapping test 139 @ "mm/mapping1" Mapping test 1 40 40 ! CONFIG_TEST (choice) -
test/mm/mapping1/test.c
r795ff98 rd43d2f7 47 47 printf("Memory management test mapping #1\n"); 48 48 49 frame0 = frame_alloc(FRAME_KA );50 frame1 = frame_alloc(FRAME_KA );49 frame0 = frame_alloc(FRAME_KA, ONE_FRAME); 50 frame1 = frame_alloc(FRAME_KA, ONE_FRAME); 51 51 52 52 printf("Writing %L to physical address %P.\n", VALUE0, KA2PA(frame0));
Note:
See TracChangeset
for help on using the changeset viewer.