/trunk/kernel/generic/src/interrupt/interrupt.c |
---|
110,10 → 110,10 |
if (sizeof(void *) == 4) { |
printf("Exc Description Handler Symbol\n"); |
printf("--- ------------ ---------- --------\n"); |
printf("--- -------------- ---------- --------\n"); |
} else { |
printf("Exc Description Handler Symbol\n"); |
printf("--- ------------ ------------------ --------\n"); |
printf("--- -------------- ------------------ --------\n"); |
} |
for (i = 0; i < IVT_ITEMS; i++) { |
122,10 → 122,10 |
symbol = "not found"; |
if (sizeof(void *) == 4) |
printf("%-3u %-12s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name, |
printf("%-3u %-14s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name, |
exc_table[i].f, symbol); |
else |
printf("%-3u %-12s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name, |
printf("%-3u %-14s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name, |
exc_table[i].f, symbol); |
if (((i + 1) % 20) == 0) { |
/trunk/kernel/generic/src/console/cmd.c |
---|
334,6 → 334,17 |
.argc = 0 |
}; |
/* Data and methods for 'physmem' command. */ |
static int cmd_physmem(cmd_arg_t *argv); |
cmd_info_t physmem_info = { |
.name = "physmem", |
.description = "Print physical memory configuration.", |
.help = NULL, |
.func = cmd_physmem, |
.argc = 0, |
.argv = NULL |
}; |
/* Data and methods for 'tlb' command. */ |
static int cmd_tlb(cmd_arg_t *argv); |
cmd_info_t tlb_info = { |
457,6 → 468,7 |
&sched_info, |
&threads_info, |
&tasks_info, |
&physmem_info, |
&tlb_info, |
&version_info, |
&zones_info, |
484,13 → 496,12 |
/** Initialize and register commands. */ |
void cmd_init(void) |
{ |
int i; |
unsigned int i; |
for (i=0;basic_commands[i]; i++) { |
cmd_initialize(basic_commands[i]); |
if (!cmd_register(basic_commands[i])) |
panic("could not register command %s\n", |
basic_commands[i]->name); |
panic("could not register command %s\n", basic_commands[i]->name); |
} |
} |
809,6 → 820,18 |
return 1; |
} |
/** Command for printing physical memory configuration. |
* |
* @param argv Not used. |
* |
* @return Always returns 1. |
*/ |
int cmd_physmem(cmd_arg_t *argv) |
{ |
physmem_print(); |
return 1; |
} |
/** Write 4 byte value to address */ |
int cmd_set4(cmd_arg_t *argv) |
{ |
/trunk/kernel/arch/sparc64/include/mm/frame.h |
---|
69,6 → 69,7 |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
#define physmem_print() |
#endif |
#endif |
/trunk/kernel/arch/ia64/include/mm/frame.h |
---|
42,6 → 42,7 |
#ifndef __ASM__ |
extern void frame_arch_init(void); |
#define physmem_print() |
#define ARCH_STACK_FRAMES TWO_FRAMES |
/trunk/kernel/arch/arm32/include/mm/frame.h |
---|
54,6 → 54,7 |
extern void frame_arch_init(void); |
extern void boot_page_table_free(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ppc32/include/mm/frame.h |
---|
46,6 → 46,7 |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ia32xen/include/mm/frame.h |
---|
46,6 → 46,7 |
#define MA2PA(x) ((mp_map[((uintptr_t) (x)) >> 12] << 12) + (((uintptr_t) (x)) & 0xfff)) |
extern void frame_arch_init(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/amd64/include/mm/frame.h |
---|
45,6 → 45,7 |
#ifndef __ASM__ |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#endif /* __ASM__ */ |
#endif |
/trunk/kernel/arch/ppc64/include/mm/frame.h |
---|
46,6 → 46,7 |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/mips32/include/mm/frame.h |
---|
42,6 → 42,7 |
#ifndef __ASM__ |
extern void frame_arch_init(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ia32/include/mm/frame.h |
---|
46,6 → 46,7 |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ia32/src/mm/frame.c |
---|
45,8 → 45,6 |
#include <macros.h> |
#include <print.h> |
#include <console/cmd.h> |
#include <console/kconsole.h> |
size_t hardcoded_unmapped_ktext_size = 0; |
size_t hardcoded_unmapped_kdata_size = 0; |
55,7 → 53,7 |
static void init_e820_memory(pfn_t minconf) |
{ |
int i; |
unsigned int i; |
pfn_t start, conf; |
size_t size; |
63,11 → 61,14 |
if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { |
start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, FRAME_SIZE)); |
size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, FRAME_SIZE)); |
if ((minconf < start) || (minconf >= start + size)) |
conf = start; |
else |
conf = minconf; |
zone_create(start, size, conf, 0); |
if (last_frame < ALIGN_UP(e820table[i].base_address + |
e820table[i].size, FRAME_SIZE)) |
last_frame = |
76,14 → 77,6 |
} |
} |
static int cmd_e820mem(cmd_arg_t *argv); |
static cmd_info_t e820_info = { |
.name = "e820list", |
.description = "List e820 memory.", |
.func = cmd_e820mem, |
.argc = 0 |
}; |
static char *e820names[] = { |
"invalid", |
"available", |
94,7 → 87,7 |
}; |
static int cmd_e820mem(cmd_arg_t *argv) |
void physmem_print(void) |
{ |
unsigned int i; |
char *name; |
111,18 → 104,14 |
printf("%#18llx %#18llx %s\n", e820table[i].base_address, |
e820table[i].size, name); |
} |
return 0; |
} |
void frame_arch_init(void) |
{ |
static pfn_t minconf; |
pfn_t minconf; |
if (config.cpu_active == 1) { |
cmd_initialize(&e820_info); |
cmd_register(&e820_info); |
minconf = 1; |
#ifdef CONFIG_SMP |
minconf = max(minconf, |