Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2720 → Rev 2721

/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
35,13 → 35,14
#ifndef KERN_ia64_FRAME_H_
#define KERN_ia64_FRAME_H_
 
#define FRAME_WIDTH 14 /* 16K */
#define FRAME_SIZE (1<<FRAME_WIDTH)
#define FRAME_WIDTH 14 /* 16K */
#define FRAME_SIZE (1 << FRAME_WIDTH)
 
#ifdef KERNEL
#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
40,11 → 40,12
#endif /* __ASM__ */
 
#define FRAME_WIDTH 12 /* 4K */
#define FRAME_SIZE (1<<FRAME_WIDTH)
#define FRAME_SIZE (1 << FRAME_WIDTH)
 
#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
36,12 → 36,13
#define KERN_mips32_FRAME_H_
 
#define FRAME_WIDTH 14 /* 16K */
#define FRAME_SIZE (1<<FRAME_WIDTH)
#define FRAME_SIZE (1 << FRAME_WIDTH)
 
#ifdef KERNEL
#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,23 → 104,19
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,
ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size +
hardcoded_unmapped_kdata_size));
ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size +
hardcoded_unmapped_kdata_size));
#endif
#ifdef CONFIG_SIMICS_FIX
minconf = max(minconf, ADDR2PFN(0x10000));
140,8 → 129,8
#ifdef CONFIG_SMP
/* Reserve AP real mode bootstrap memory */
frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH,
(hardcoded_unmapped_ktext_size +
hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
(hardcoded_unmapped_ktext_size +
hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
#ifdef CONFIG_SIMICS_FIX
/* Don't know why, but these addresses help */