Changeset 0132630 in mainline
- Timestamp:
- 2006-01-03T21:55:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b524c5e0
- Parents:
- 93e90c7
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r93e90c7 r0132630 107 107 generic/src/main/kinit.c \ 108 108 generic/src/main/uinit.c \ 109 generic/src/main/version.c \ 109 110 generic/src/proc/scheduler.c \ 110 111 generic/src/proc/thread.c \ -
arch/mips32/src/debugger.c
r93e90c7 r0132630 42 42 43 43 static int cmd_print_breakpoints(cmd_arg_t *argv); 44 static cmd_info_t pbkpt_info = {45 .name = " pbkpt",44 static cmd_info_t bkpts_info = { 45 .name = "bkpts", 46 46 .description = "Print breakpoint table.", 47 47 .func = cmd_print_breakpoints, … … 265 265 breakpoints[i].address = NULL; 266 266 267 cmd_initialize(& pbkpt_info);268 if (!cmd_register(& pbkpt_info))269 panic("could not register command %s\n", pbkpt_info.name);267 cmd_initialize(&bkpts_info); 268 if (!cmd_register(&bkpts_info)) 269 panic("could not register command %s\n", bkpts_info.name); 270 270 271 271 cmd_initialize(&delbkpt_info); -
generic/include/cpu.h
r93e90c7 r0132630 75 75 76 76 extern void cpu_init(void); 77 extern void cpu_list(void); 77 78 78 79 extern void cpu_arch_init(void); -
generic/src/console/cmd.c
r93e90c7 r0132630 46 46 #include <debug.h> 47 47 #include <symtab.h> 48 48 #include <cpu.h> 49 49 #include <mm/tlb.h> 50 50 #include <arch/mm/tlb.h> 51 51 #include <mm/frame.h> 52 #include <main/version.h> 52 53 53 54 /** Data and methods for 'help' command. */ … … 119 120 .argv = set4_argv 120 121 }; 121 122 123 122 124 123 /** Data and methods for 'call0' command. */ … … 233 232 }; 234 233 235 /** Data and methods for ' ptlb' command. */236 static int cmd_ ptlb(cmd_arg_t *argv);237 cmd_info_t ptlb_info = {238 .name = " ptlb",234 /** Data and methods for 'tlb' command. */ 235 static int cmd_tlb(cmd_arg_t *argv); 236 cmd_info_t tlb_info = { 237 .name = "tlb", 239 238 .description = "Print TLB of current processor.", 240 239 .help = NULL, 241 .func = cmd_ ptlb,240 .func = cmd_tlb, 242 241 .argc = 0, 243 242 .argv = NULL … … 263 262 }; 264 263 265 266 264 static cmd_info_t zone_info = { 267 265 .name = "zone", … … 272 270 }; 273 271 272 /** Data and methods for 'cpus' command. */ 273 static int cmd_cpus(cmd_arg_t *argv); 274 cmd_info_t cpus_info = { 275 .name = "cpus", 276 .description = "List all processors.", 277 .help = NULL, 278 .func = cmd_cpus, 279 .argc = 0, 280 .argv = NULL 281 }; 282 283 /** Data and methods for 'version' command. */ 284 static int cmd_version(cmd_arg_t *argv); 285 cmd_info_t version_info = { 286 .name = "version", 287 .description = "Print version information.", 288 .help = NULL, 289 .func = cmd_version, 290 .argc = 0, 291 .argv = NULL 292 }; 293 294 274 295 275 296 … … 328 349 panic("could not register command %s\n", halt_info.name); 329 350 330 cmd_initialize(& ptlb_info);331 if (!cmd_register(& ptlb_info))332 panic("could not register command %s\n", ptlb_info.name);351 cmd_initialize(&tlb_info); 352 if (!cmd_register(&tlb_info)) 353 panic("could not register command %s\n", tlb_info.name); 333 354 334 355 cmd_initialize(&zones_info); … … 340 361 panic("could not register command %s\n", zone_info.name); 341 362 363 cmd_initialize(&cpus_info); 364 if (!cmd_register(&cpus_info)) 365 panic("could not register command %s\n", cpus_info.name); 366 367 cmd_initialize(&version_info); 368 if (!cmd_register(&version_info)) 369 panic("could not register command %s\n", version_info.name); 370 371 342 372 343 373 } … … 539 569 * @return Always returns 1. 540 570 */ 541 int cmd_ ptlb(cmd_arg_t *argv)571 int cmd_tlb(cmd_arg_t *argv) 542 572 { 543 573 tlb_print(); … … 577 607 } 578 608 579 580 609 int cmd_zones(cmd_arg_t * argv) { 581 610 printf("Zones listing not implemented\n"); 582 611 return 1; 583 612 } 613 584 614 int cmd_zone(cmd_arg_t * argv) { 585 615 printf("Zone details not implemented\n"); … … 587 617 } 588 618 619 /** Command for listing processors. 620 * 621 * @param argv Ignored. 622 * 623 * return Always 1. 624 */ 625 int cmd_cpus(cmd_arg_t *argv) 626 { 627 cpu_list(); 628 return 1; 629 } 630 631 /** Command for printing kernel version. 632 * 633 * @param argv Ignored. 634 * 635 * return Always 1. 636 */ 637 int cmd_version(cmd_arg_t *argv) 638 { 639 version_print(); 640 return 1; 641 } -
generic/src/cpu/cpu.c
r93e90c7 r0132630 39 39 #include <memstr.h> 40 40 #include <list.h> 41 #include <print.h> 41 42 42 43 cpu_t *cpus; … … 89 90 cpu_arch_init(); 90 91 } 92 93 /** List all processors. */ 94 void cpu_list(void) 95 { 96 int i; 97 98 for (i = 0; i < config.cpu_count; i++) { 99 if (cpus[i].active) 100 cpu_print_report(&cpus[i]); 101 else 102 printf("cpu%d: not active\n", i); 103 } 104 } -
generic/src/interrupt/interrupt.c
r93e90c7 r0132630 32 32 #include <console/console.h> 33 33 #include <console/chardev.h> 34 #include <console/cmd.h> 34 35 #include <panic.h> 35 36 #include <print.h> … … 112 113 113 114 static cmd_info_t exc_info = { 114 .name = " pexc",115 .name = "exc", 115 116 .description = "Print exception table.", 116 117 .func = exc_print_cmd, … … 128 129 exc_register(i, "undef", exc_undef); 129 130 130 spinlock_initialize(&exc_info.lock, "kconsole_excinfo"); 131 link_initialize(&exc_info.link); 131 cmd_initialize(&exc_info); 132 132 if (!cmd_register(&exc_info)) 133 133 panic("could not register command %s\n", exc_info.name); -
generic/src/main/kinit.c
r93e90c7 r0132630 70 70 { 71 71 thread_t *t; 72 int i;73 72 #ifdef CONFIG_USERSPACE 74 73 vm_t *m; … … 101 100 * Now that all CPUs are up, we can report what we've found. 102 101 */ 103 for (i = 0; i < config.cpu_count; i++) { 104 if (cpus[i].active) 105 cpu_print_report(&cpus[i]); 106 else 107 printf("cpu%d: not active\n", i); 108 } 102 cpu_list(); 109 103 110 104 #ifdef CONFIG_SMP 111 105 if (config.cpu_count > 1) { 106 int i; 107 112 108 /* 113 109 * For each CPU, create its load balancing thread. -
generic/src/main/main.c
r93e90c7 r0132630 42 42 #include <align.h> 43 43 #include <interrupt.h> 44 #include <main/version.h> 44 45 45 46 #ifdef CONFIG_SMP … … 65 66 #include <typedefs.h> 66 67 67 char *project = "SPARTAN kernel";68 char *copyright = "Copyright (C) 2001-2006 HelenOS project";69 char *release = RELEASE;70 char *name = NAME;71 char *arch = ARCH;72 73 #ifdef REVISION74 char *revision = ", revision " REVISION;75 #else76 char *revision = "";77 #endif78 79 #ifdef TIMESTAMP80 char *timestamp = " on " TIMESTAMP;81 #else82 char *timestamp = "";83 #endif84 85 68 config_t config; 86 69 context_t ctx; … … 168 151 169 152 /* Exception handler initialization, before architecture 170 * starts adding it 's own handlers153 * starts adding its own handlers 171 154 */ 172 155 exc_init(); … … 178 161 tlb_init(); 179 162 arch_post_mm_init(); 180 181 printf("%s, release %s (%s)%s\nBuilt%s for %s\n%s\n", project, release, name, revision, timestamp, arch, copyright); 163 164 version_print(); 165 182 166 printf("%P: hardcoded_ktext_size=%dK, hardcoded_kdata_size=%dK\n", 183 167 config.base, hardcoded_ktext_size/1024, hardcoded_kdata_size/1024);
Note:
See TracChangeset
for help on using the changeset viewer.