Changeset b07c332 in mainline
- Timestamp:
- 2008-02-05T14:02:09Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b5ed4f8
- Parents:
- a0f6a61
- Location:
- kernel
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/mm/frame.h
ra0f6a61 rb07c332 41 41 42 42 #define FRAME_WIDTH 12 /* 4K */ 43 #define FRAME_SIZE (1 <<FRAME_WIDTH)43 #define FRAME_SIZE (1 << FRAME_WIDTH) 44 44 45 45 #ifndef __ASM__ 46 46 extern uintptr_t last_frame; 47 47 extern void frame_arch_init(void); 48 extern void physmem_print(void); 48 49 #endif /* __ASM__ */ 49 50 -
kernel/arch/arm32/include/mm/frame.h
ra0f6a61 rb07c332 55 55 extern void frame_arch_init(void); 56 56 extern void boot_page_table_free(void); 57 #define physmem_print() 57 58 58 59 #endif /* __ASM__ */ -
kernel/arch/ia32/include/mm/frame.h
ra0f6a61 rb07c332 47 47 48 48 extern void frame_arch_init(void); 49 extern void physmem_print(void); 49 50 50 51 #endif /* __ASM__ */ -
kernel/arch/ia32/src/mm/frame.c
ra0f6a61 rb07c332 46 46 47 47 #include <print.h> 48 #include <console/cmd.h>49 #include <console/kconsole.h>50 48 51 49 size_t hardcoded_unmapped_ktext_size = 0; … … 56 54 static void init_e820_memory(pfn_t minconf) 57 55 { 58 int i;56 unsigned int i; 59 57 pfn_t start, conf; 60 58 size_t size; … … 64 62 start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, FRAME_SIZE)); 65 63 size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, FRAME_SIZE)); 64 66 65 if ((minconf < start) || (minconf >= start + size)) 67 66 conf = start; 68 67 else 69 68 conf = minconf; 69 70 70 zone_create(start, size, conf, 0); 71 71 72 if (last_frame < ALIGN_UP(e820table[i].base_address + 72 73 e820table[i].size, FRAME_SIZE)) … … 76 77 } 77 78 } 78 79 static int cmd_e820mem(cmd_arg_t *argv);80 static cmd_info_t e820_info = {81 .name = "e820list",82 .description = "List e820 memory.",83 .func = cmd_e820mem,84 .argc = 085 };86 79 87 80 static char *e820names[] = { … … 95 88 96 89 97 static int cmd_e820mem(cmd_arg_t *argv)90 void physmem_print(void) 98 91 { 99 92 unsigned int i; … … 112 105 e820table[i].size, name); 113 106 } 114 return 0;115 107 } 116 108 … … 118 110 void frame_arch_init(void) 119 111 { 120 staticpfn_t minconf;112 pfn_t minconf; 121 113 122 114 if (config.cpu_active == 1) { 123 cmd_initialize(&e820_info);124 cmd_register(&e820_info);125 126 115 minconf = 1; 127 116 #ifdef CONFIG_SMP 128 117 minconf = max(minconf, 129 130 118 ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + 119 hardcoded_unmapped_kdata_size)); 131 120 #endif 132 121 #ifdef CONFIG_SIMICS_FIX … … 141 130 /* Reserve AP real mode bootstrap memory */ 142 131 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 143 144 132 (hardcoded_unmapped_ktext_size + 133 hardcoded_unmapped_kdata_size) >> FRAME_WIDTH); 145 134 146 135 #ifdef CONFIG_SIMICS_FIX -
kernel/arch/ia32xen/include/mm/frame.h
ra0f6a61 rb07c332 47 47 48 48 extern void frame_arch_init(void); 49 #define physmem_print() 49 50 50 51 #endif /* __ASM__ */ -
kernel/arch/ia64/include/mm/frame.h
ra0f6a61 rb07c332 36 36 #define KERN_ia64_FRAME_H_ 37 37 38 #define FRAME_WIDTH 39 #define FRAME_SIZE (1 <<FRAME_WIDTH)38 #define FRAME_WIDTH 14 /* 16K */ 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 41 #ifdef KERNEL … … 43 43 44 44 extern void frame_arch_init(void); 45 #define physmem_print() 45 46 46 47 #define ARCH_STACK_FRAMES TWO_FRAMES -
kernel/arch/mips32/include/mm/frame.h
ra0f6a61 rb07c332 37 37 38 38 #define FRAME_WIDTH 14 /* 16K */ 39 #define FRAME_SIZE (1 <<FRAME_WIDTH)39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 41 #ifdef KERNEL … … 43 43 44 44 extern void frame_arch_init(void); 45 #define physmem_print() 45 46 46 47 #endif /* __ASM__ */ -
kernel/arch/ppc32/include/mm/frame.h
ra0f6a61 rb07c332 47 47 48 48 extern void frame_arch_init(void); 49 #define physmem_print() 49 50 50 51 #endif /* __ASM__ */ -
kernel/arch/ppc64/include/mm/frame.h
ra0f6a61 rb07c332 47 47 48 48 extern void frame_arch_init(void); 49 #define physmem_print() 49 50 50 51 #endif /* __ASM__ */ -
kernel/arch/sparc64/include/mm/frame.h
ra0f6a61 rb07c332 70 70 extern uintptr_t last_frame; 71 71 extern void frame_arch_init(void); 72 #define physmem_print() 72 73 73 74 #endif -
kernel/generic/src/console/cmd.c
ra0f6a61 rb07c332 335 335 }; 336 336 337 /* Data and methods for 'physmem' command. */ 338 static int cmd_physmem(cmd_arg_t *argv); 339 cmd_info_t physmem_info = { 340 .name = "physmem", 341 .description = "Print physical memory configuration.", 342 .help = NULL, 343 .func = cmd_physmem, 344 .argc = 0, 345 .argv = NULL 346 }; 347 337 348 /* Data and methods for 'tlb' command. */ 338 349 static int cmd_tlb(cmd_arg_t *argv); … … 458 469 &threads_info, 459 470 &tasks_info, 471 &physmem_info, 460 472 &tlb_info, 461 473 &version_info, … … 485 497 void cmd_init(void) 486 498 { 487 int i;488 489 for (i =0;basic_commands[i]; i++) {499 unsigned int i; 500 501 for (i = 0; basic_commands[i]; i++) { 490 502 cmd_initialize(basic_commands[i]); 491 503 if (!cmd_register(basic_commands[i])) 492 panic("could not register command %s\n", 493 basic_commands[i]->name); 504 panic("could not register command %s\n", basic_commands[i]->name); 494 505 } 495 506 } … … 810 821 } 811 822 823 /** Command for printing physical memory configuration. 824 * 825 * @param argv Not used. 826 * 827 * @return Always returns 1. 828 */ 829 int cmd_physmem(cmd_arg_t *argv) 830 { 831 physmem_print(); 832 return 1; 833 } 834 812 835 /** Write 4 byte value to address */ 813 836 int cmd_set4(cmd_arg_t *argv) -
kernel/generic/src/interrupt/interrupt.c
ra0f6a61 rb07c332 110 110 111 111 if (sizeof(void *) == 4) { 112 printf("Exc Description Handler Symbol\n");113 printf("--- ------------ ---------- --------\n");112 printf("Exc Description Handler Symbol\n"); 113 printf("--- -------------- ---------- --------\n"); 114 114 } else { 115 printf("Exc Description Handler Symbol\n");116 printf("--- ------------ ------------------ --------\n");115 printf("Exc Description Handler Symbol\n"); 116 printf("--- -------------- ------------------ --------\n"); 117 117 } 118 118 … … 123 123 124 124 if (sizeof(void *) == 4) 125 printf("%-3u %-1 2s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name,125 printf("%-3u %-14s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name, 126 126 exc_table[i].f, symbol); 127 127 else 128 printf("%-3u %-1 2s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name,128 printf("%-3u %-14s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name, 129 129 exc_table[i].f, symbol); 130 130
Note:
See TracChangeset
for help on using the changeset viewer.