More changes for cleaner initialization and support for containers.

This commit is contained in:
Bahadir Balban
2009-07-25 17:44:29 +03:00
parent ba1cc0c6bc
commit f7b768ee16
17 changed files with 247 additions and 149 deletions

View File

@@ -2,7 +2,6 @@
* PB926 platform-specific initialisation and setup
*
* Copyright (C) 2007 Bahadir Balban
*
*/
#include <l4/generic/platform.h>
@@ -22,7 +21,7 @@
void init_platform_console(void)
{
add_mapping(PB926_UART0_BASE, PL011_BASE, PAGE_SIZE,
add_boot_mapping(PB926_UART0_BASE, PL011_BASE, PAGE_SIZE,
MAP_IO_DEFAULT_FLAGS);
/*
@@ -30,7 +29,7 @@ void init_platform_console(void)
* userspace printf can work. Note, this raw mapping is to be
* removed in the future, when file-based io is implemented.
*/
add_mapping(PB926_UART0_BASE, USERSPACE_UART_BASE, PAGE_SIZE,
add_boot_mapping(PB926_UART0_BASE, USERSPACE_UART_BASE, PAGE_SIZE,
MAP_USR_IO_FLAGS);
uart_init();
@@ -38,18 +37,18 @@ void init_platform_console(void)
void init_platform_timer(void)
{
add_mapping(PB926_TIMER01_BASE, PLATFORM_TIMER_BASE, PAGE_SIZE,
add_boot_mapping(PB926_TIMER01_BASE, PLATFORM_TIMER_BASE, PAGE_SIZE,
MAP_IO_DEFAULT_FLAGS);
add_mapping(PB926_SYSCTRL_BASE, PB926_SYSCTRL_VBASE, PAGE_SIZE,
add_boot_mapping(PB926_SYSCTRL_BASE, PB926_SYSCTRL_VBASE, PAGE_SIZE,
MAP_IO_DEFAULT_FLAGS);
timer_init();
}
void init_platform_irq_controller()
{
add_mapping(PB926_VIC_BASE, PLATFORM_IRQCTRL_BASE, PAGE_SIZE,
add_boot_mapping(PB926_VIC_BASE, PLATFORM_IRQCTRL_BASE, PAGE_SIZE,
MAP_IO_DEFAULT_FLAGS);
add_mapping(PB926_SIC_BASE, PLATFORM_SIRQCTRL_BASE, PAGE_SIZE,
add_boot_mapping(PB926_SIC_BASE, PLATFORM_SIRQCTRL_BASE, PAGE_SIZE,
MAP_IO_DEFAULT_FLAGS);
irq_controllers_init();
}

View File

@@ -51,6 +51,7 @@ BEGIN_PROC(printhex4)
BEGIN_PROC(printhex2)
mov r1, #2
printhex: adr r2, hexbuf
@printhex: ldr r2, =hexbuf
add r3, r2, r1
mov r1, #0
strb r1, [r3]
@@ -77,8 +78,9 @@ printhex: adr r2, hexbuf
.macro get_straddr rs, rm
mrc p15, 0, \rm, c1, c0 @ Get MMU bits.
tst \rm, #1 @ MMU enabled?
@subeq \rs, \rs, #KERNEL_AREA_START
biceq \rs, \rs, #KERNEL_AREA_START @ Clear Virtual mem offset.
orreq \rs, \rs, #PHYS_ADDR_BASE @ Add Phy mem offset.
@orreq \rs, \rs, #PHYS_ADDR_BASE @ Add Phy mem offset.
.endm
BEGIN_PROC(printascii)