Subversion Repositories HelenOS

Rev

Rev 2319 | Rev 3065 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2319 Rev 2721
Line 332... Line 332...
332
    .description = "Halt the kernel.",
332
    .description = "Halt the kernel.",
333
    .func = cmd_halt,
333
    .func = cmd_halt,
334
    .argc = 0
334
    .argc = 0
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
/* Data and methods for 'tlb' command. */
348
/* Data and methods for 'tlb' command. */
338
static int cmd_tlb(cmd_arg_t *argv);
349
static int cmd_tlb(cmd_arg_t *argv);
339
cmd_info_t tlb_info = {
350
cmd_info_t tlb_info = {
340
    .name = "tlb",
351
    .name = "tlb",
341
    .description = "Print TLB of current processor.",
352
    .description = "Print TLB of current processor.",
Line 455... Line 466...
455
    &slabs_info,
466
    &slabs_info,
456
    &symaddr_info,
467
    &symaddr_info,
457
    &sched_info,
468
    &sched_info,
458
    &threads_info,
469
    &threads_info,
459
    &tasks_info,
470
    &tasks_info,
-
 
471
    &physmem_info,
460
    &tlb_info,
472
    &tlb_info,
461
    &version_info,
473
    &version_info,
462
    &zones_info,
474
    &zones_info,
463
    &zone_info,
475
    &zone_info,
464
#ifdef CONFIG_TEST
476
#ifdef CONFIG_TEST
Line 482... Line 494...
482
}
494
}
483
 
495
 
484
/** Initialize and register commands. */
496
/** Initialize and register commands. */
485
void cmd_init(void)
497
void cmd_init(void)
486
{
498
{
487
    int i;
499
    unsigned int i;
488
 
500
 
489
    for (i=0;basic_commands[i]; i++) {
501
    for (i = 0; basic_commands[i]; i++) {
490
        cmd_initialize(basic_commands[i]);
502
        cmd_initialize(basic_commands[i]);
491
        if (!cmd_register(basic_commands[i]))
503
        if (!cmd_register(basic_commands[i]))
492
            panic("could not register command %s\n",
504
            panic("could not register command %s\n", basic_commands[i]->name);
493
                  basic_commands[i]->name);
-
 
494
    }
505
    }
495
}
506
}
496
 
507
 
497
 
508
 
498
/** List supported commands.
509
/** List supported commands.
Line 807... Line 818...
807
{
818
{
808
    tlb_print();
819
    tlb_print();
809
    return 1;
820
    return 1;
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
/** Write 4 byte value to address */
835
/** Write 4 byte value to address */
813
int cmd_set4(cmd_arg_t *argv)
836
int cmd_set4(cmd_arg_t *argv)
814
{
837
{
815
    uint32_t *addr;
838
    uint32_t *addr;
816
    uint32_t arg1 = argv[1].intval;
839
    uint32_t arg1 = argv[1].intval;