/trunk/kernel/arch/ppc32/include/mm/frame.h |
---|
46,7 → 46,7 |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ppc32/include/mm/memory_init.h |
---|
37,6 → 37,8 |
size_t get_memory_size(void); |
void memory_print_map(void); |
#endif |
/** @} |
/trunk/kernel/arch/ppc32/src/mm/memory_init.c |
---|
42,5 → 42,14 |
return bootinfo.memmap.total; |
} |
void memory_print_map(void) |
{ |
count_t i; |
for (i = 0; i < bootinfo.memmap.count; i++) |
printf("base: %.*p size: %#x\n", sizeof(bootinfo.memmap.zones[i].start) * 2, bootinfo.memmap.zones[i].start, bootinfo.memmap.zones[i].size); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ppc32/src/mm/frame.c |
---|
38,23 → 38,9 |
#include <mm/frame.h> |
#include <align.h> |
#include <macros.h> |
#include <print.h> |
uintptr_t last_frame = 0; |
void physmem_print(void) |
{ |
unsigned int i; |
printf("Base Size\n"); |
printf("---------- ----------\n"); |
for (i = 0; i < bootinfo.memmap.count; i++) { |
printf("%#10x %#10x\n", bootinfo.memmap.zones[i].start, |
bootinfo.memmap.zones[i].size); |
} |
} |
void frame_arch_init(void) |
{ |
pfn_t minconf = 2; |
/trunk/kernel/arch/ppc32/src/ppc32.c |
---|
117,6 → 117,7 |
void arch_pre_smp_init(void) |
{ |
memory_print_map(); |
} |
void arch_post_smp_init(void) |
/trunk/kernel/arch/ia32xen/include/mm/frame.h |
---|
46,7 → 46,7 |
#define MA2PA(x) ((mp_map[((uintptr_t) (x)) >> 12] << 12) + (((uintptr_t) (x)) & 0xfff)) |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ia32xen/include/mm/memory_init.h |
---|
40,6 → 40,8 |
size_t get_memory_size(void); |
void memory_print_map(void); |
#endif |
/** @} |
/trunk/kernel/arch/ia32xen/src/ia32xen.c |
---|
160,6 → 160,8 |
void arch_pre_smp_init(void) |
{ |
if (config.cpu_active == 1) { |
memory_print_map(); |
#ifdef CONFIG_SMP |
acpi_init(); |
#endif /* CONFIG_SMP */ |
/trunk/kernel/arch/ia32xen/src/mm/memory_init.c |
---|
42,5 → 42,10 |
return start_info.frames * PAGE_SIZE; |
} |
void memory_print_map(void) |
{ |
printf("Xen memory: %p size: %d (reserved %d)\n", PFN2ADDR(meminfo.start), PFN2ADDR(meminfo.size - meminfo.reserved), PFN2ADDR(meminfo.reserved)); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ia32xen/src/mm/frame.c |
---|
36,14 → 36,6 |
#include <mm/frame.h> |
#include <config.h> |
void physmem_print(void) |
{ |
printf("Base Size Reserved\n"); |
printf("---------- ---------- ---------\n"); |
printf("%#10x %#10x %#10x\n", PFN2ADDR(meminfo.start), |
PFN2ADDR(meminfo.size), PFN2ADDR(meminfo.reserved)); |
} |
void frame_arch_init(void) |
{ |
if (config.cpu_active == 1) { |
/trunk/kernel/arch/amd64/src/amd64.c |
---|
165,9 → 165,11 |
void arch_pre_smp_init(void) |
{ |
if (config.cpu_active == 1) { |
#ifdef CONFIG_SMP |
memory_print_map(); |
#ifdef CONFIG_SMP |
acpi_init(); |
#endif /* CONFIG_SMP */ |
#endif /* CONFIG_SMP */ |
} |
} |
/trunk/kernel/arch/amd64/src/mm/memory_init.c |
---|
46,5 → 46,34 |
return e801memorysize * 1024; |
} |
void memory_print_map(void) |
{ |
uint8_t i; |
for (i = 0; i < e820counter; i++) { |
printf("E820 base: %#llx size: %#llx type: ", e820table[i].base_address, e820table[i].size); |
switch (e820table[i].type) { |
case MEMMAP_MEMORY_AVAILABLE: |
printf("available memory\n"); |
break; |
case MEMMAP_MEMORY_RESERVED: |
printf("reserved memory\n"); |
break; |
case MEMMAP_MEMORY_ACPI: |
printf("ACPI table\n"); |
break; |
case MEMMAP_MEMORY_NVS: |
printf("NVS\n"); |
break; |
case MEMMAP_MEMORY_UNUSABLE: |
printf("unusable memory\n"); |
break; |
default: |
printf("undefined memory type\n"); |
} |
} |
} |
/** @} |
*/ |
/trunk/kernel/arch/ppc64/include/mm/frame.h |
---|
46,7 → 46,7 |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#define physmem_print() |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/trunk/kernel/arch/ppc64/include/mm/memory_init.h |
---|
37,6 → 37,8 |
size_t get_memory_size(void); |
void memory_print_map(void); |
#endif |
/** @} |
/trunk/kernel/arch/ppc64/src/ppc64.c |
---|
102,6 → 102,7 |
void arch_pre_smp_init(void) |
{ |
memory_print_map(); |
} |
void arch_post_smp_init(void) |
/trunk/kernel/arch/ppc64/src/mm/memory_init.c |
---|
43,5 → 43,13 |
} |
void memory_print_map(void) |
{ |
count_t i; |
for (i = 0; i < bootinfo.memmap.count; i++) |
printf("base: %#x size: %#x\n", bootinfo.memmap.zones[i].start, bootinfo.memmap.zones[i].size); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ppc64/src/mm/frame.c |
---|
38,23 → 38,9 |
#include <mm/frame.h> |
#include <align.h> |
#include <macros.h> |
#include <print.h> |
uintptr_t last_frame = 0; |
void physmem_print(void) |
{ |
unsigned int i; |
printf("Base Size\n"); |
printf("---------- ----------\n"); |
for (i = 0; i < bootinfo.memmap.count; i++) { |
printf("%#10x %#10x\n", bootinfo.memmap.zones[i].start, |
bootinfo.memmap.zones[i].size); |
} |
} |
void frame_arch_init(void) |
{ |
pfn_t minconf = 2; |
/trunk/kernel/arch/ia32/include/mm/memory_init.h |
---|
38,6 → 38,8 |
size_t get_memory_size(void); |
void memory_print_map(void); |
#endif |
/** @} |
/trunk/kernel/arch/ia32/src/mm/frame.c |
---|
103,7 → 103,7 |
printf("%#18llx %#18llx %s\n", e820table[i].base_address, |
e820table[i].size, name); |
} |
} |
} |
/trunk/kernel/arch/ia32/src/mm/memory_init.c |
---|
46,5 → 46,34 |
return e801memorysize * 1024; |
} |
void memory_print_map(void) |
{ |
uint8_t i; |
for (i = 0; i < e820counter; i++) { |
printf("E820 base: %#.16llx size: %#.16llx type: ", e820table[i].base_address, e820table[i].size); |
switch (e820table[i].type) { |
case MEMMAP_MEMORY_AVAILABLE: |
printf("available memory\n"); |
break; |
case MEMMAP_MEMORY_RESERVED: |
printf("reserved memory\n"); |
break; |
case MEMMAP_MEMORY_ACPI: |
printf("ACPI table\n"); |
break; |
case MEMMAP_MEMORY_NVS: |
printf("NVS\n"); |
break; |
case MEMMAP_MEMORY_UNUSABLE: |
printf("unusable memory\n"); |
break; |
default: |
printf("undefined memory type\n"); |
} |
} |
} |
/** @} |
*/ |
/trunk/kernel/arch/ia32/src/ia32.c |
---|
116,6 → 116,8 |
void arch_pre_smp_init(void) |
{ |
if (config.cpu_active == 1) { |
memory_print_map(); |
#ifdef CONFIG_SMP |
acpi_init(); |
#endif /* CONFIG_SMP */ |