/branches/arm/kernel/arch/arm32/include/mm/frame.h |
---|
43,9 → 43,16 |
#include <arch/types.h> |
#define BOOT_PAGE_TABLE_SIZE 0x4000 |
#define BOOT_PAGE_TABLE_ADDRESS 0x4000 |
#define BOOT_PAGE_TABLE_START_FRAME (BOOT_PAGE_TABLE_ADDRESS >> FRAME_WIDTH) |
#define BOOT_PAGE_TABLE_SIZE_IN_FRAMES (BOOT_PAGE_TABLE_SIZE >> FRAME_WIDTH) |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
extern void boot_page_table_free(void); |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/branches/arm/kernel/arch/arm32/Makefile.inc |
---|
36,7 → 36,7 |
TARGET = arm-linux-gnu |
TOOLCHAIN_DIR = /usr/local/arm |
KERNEL_LOAD_ADDRESS = 0x80150000 |
KERNEL_LOAD_ADDRESS = 0x80200000 |
CFLAGS += -fno-zero-initialized-in-bss |
/branches/arm/kernel/arch/arm32/src/mm/frame.c |
---|
35,6 → 35,7 |
#include <mm/frame.h> |
#include <arch/mm/frame.h> |
#include <config.h> |
#include <arch/debug/print.h> |
uintptr_t last_frame = 0; |
42,12 → 43,24 |
void frame_arch_init(void) |
{ |
// all memory as one zone |
zone_create(0, ADDR2PFN(config.memory_size), 2, 0); |
zone_create(0, ADDR2PFN(config.memory_size), |
BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); |
last_frame = config.memory_size; |
// blacklist interrupt vector |
frame_mark_unavailable(0, 1); |
// blacklist boot page table |
frame_mark_unavailable(BOOT_PAGE_TABLE_START_FRAME, BOOT_PAGE_TABLE_SIZE_IN_FRAMES); |
} |
/** Frees the boot page table. */ |
void boot_page_table_free(void) |
{ |
int i; |
for (i = 0; i < BOOT_PAGE_TABLE_SIZE_IN_FRAMES; ++i) { |
frame_free (i * FRAME_SIZE + BOOT_PAGE_TABLE_ADDRESS); |
} |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/mm/page.c |
---|
41,7 → 41,7 |
#include <typedefs.h> |
#include <arch/types.h> |
#include <interrupt.h> |
#include <arch/debug/print.h> |
#include <arch/mm/frame.h> |
/** |
72,6 → 72,8 |
// TODO: #else |
as_switch(NULL, AS_KERNEL); |
boot_page_table_free(); |
} |
/** |
/branches/arm/boot/arch/arm32/loader/main.c |
---|
43,7 → 43,7 |
#include "mm.h" |
/** Kernel entry point address. */ |
#define KERNEL_VIRTUAL_ADDRESS 0x80150000 |
#define KERNEL_VIRTUAL_ADDRESS 0x80200000 |
char *release = RELEASE; |
/branches/arm/boot/arch/arm32/loader/pack |
---|
55,8 → 55,8 |
*(COMMON); /* global variables */ |
*(.reginfo); |
. = ALIGN(16384); |
*(PT); /* page table */" > "$LINK" |
. = 0x4000; |
*(PT); /* page table placed at 0x4000 */" > "$LINK" |
echo ' |
/** @addtogroup arm32boot |