mirror of
https://github.com/drasko/codezero.git
synced 2026-02-01 04:33:13 +01:00
Kernel updates since December 2009
This commit is contained in:
64
include/l4/platform/realview/offsets.h
Normal file
64
include/l4/platform/realview/offsets.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Describes physical memory layout of realview platform.
|
||||
* Right now this contains common offsets for
|
||||
* pb11mpcore, pba9 and eb.
|
||||
*
|
||||
* This is internally included by respective platform's offsets.h
|
||||
*
|
||||
* Copyright (C) 2007 Bahadir Balban
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_REALVIEW_OFFSETS_H__
|
||||
#define __PLATFORM_REALVIEW_OFFSETS_H__
|
||||
|
||||
/* Physical memory base */
|
||||
#define PLATFORM_PHYS_MEM_START 0x00000000 /* inclusive */
|
||||
#define PLATFORM_PHYS_MEM_END 0x10000000 /* 256 MB, exclusive */
|
||||
|
||||
/*
|
||||
* Device offsets in physical memory
|
||||
* Naming of devices done starting with 0 subscript,
|
||||
* as we use these names for device capability
|
||||
*/
|
||||
#define PLATFORM_SYSTEM_REGISTERS 0x10000000 /* System registers */
|
||||
#define PLATFORM_SYSCTRL_BASE 0x10001000 /* System controller0 */
|
||||
#define PLATFORM_UART0_BASE 0x10009000 /* Console port (UART0) */
|
||||
#define PLATFORM_UART1_BASE 0x1000A000 /* Console port (UART1) */
|
||||
#define PLATFORM_UART2_BASE 0x1000B000 /* Console port (UART2) */
|
||||
#define PLATFORM_UART3_BASE 0x1000C000 /* Console port (UART3) */
|
||||
#define PLATFORM_TIMER0_BASE 0x10011000 /* Timers 0 and 1 */
|
||||
#define PLATFORM_TIMER1_BASE 0x10012000 /* Timers 2 and 3 */
|
||||
|
||||
/*
|
||||
* Virtual Memory base address, where devices will be mapped.
|
||||
* Each Device will take one page in virtual memory.
|
||||
* Nice and smooth.
|
||||
*/
|
||||
#define DEVICE_PAGE 0x1000
|
||||
|
||||
#define PLATFORM_SYSREGS_VBASE (IO_AREA0_VADDR + (0 * DEVICE_PAGE))
|
||||
#define PLATFORM_SYSCTRL_VBASE (IO_AREA0_VADDR + (1 * DEVICE_PAGE))
|
||||
#define PLATFORM_SYSCTRL1_VBASE (IO_AREA0_VADDR + (2 * DEVICE_PAGE))
|
||||
#define PLATFORM_CONSOLE_VBASE (IO_AREA0_VADDR + (3 * DEVICE_PAGE))
|
||||
#define PLATFORM_TIMER0_VBASE (IO_AREA0_VADDR + (4 * DEVICE_PAGE))
|
||||
#define PLATFORM_GIC0_VBASE (IO_AREA0_VADDR + (5 * DEVICE_PAGE))
|
||||
#define PLATFORM_GIC1_VBASE (IO_AREA0_VADDR + (7 * DEVICE_PAGE))
|
||||
#define PLATFORM_GIC2_VBASE (IO_AREA0_VADDR + (9 * DEVICE_PAGE))
|
||||
#define PLATFORM_GIC3_VBASE (IO_AREA0_VADDR + (11 * DEVICE_PAGE))
|
||||
|
||||
/* Add userspace devices here as they become necessary for irqs */
|
||||
|
||||
/* Add size of various user space devices, to be used in capability generation */
|
||||
|
||||
/* The SP810 system controller offsets */
|
||||
#define SP810_BASE PLATFORM_SYSCTRL_VBASE
|
||||
#define SP810_SCCTRL (SP810_BASE + 0x0)
|
||||
|
||||
/* Add size of various user space devices, to be used in capability generation */
|
||||
#define PLATFORM_UART1_SIZE DEVICE_PAGE
|
||||
#define PLATFORM_UART2_SIZE DEVICE_PAGE
|
||||
#define PLATFORM_UART3_SIZE DEVICE_PAGE
|
||||
#define PLATFORM_TIMER1_SIZE DEVICE_PAGE
|
||||
|
||||
#endif /* __PLATFORM_REALVIEW_OFFSETS_H__ */
|
||||
|
||||
24
include/l4/platform/realview/platform.h
Normal file
24
include/l4/platform/realview/platform.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Platform specific ties between drivers and
|
||||
* generic APIs used by the kernel.
|
||||
* E.g. system timer and console.
|
||||
*
|
||||
* Copyright (C) Bahadir Balban 2007
|
||||
*/
|
||||
|
||||
#ifndef __REALVIEW_PLATFORM_H__
|
||||
#define __REALVIEW_PLATFORM_H__
|
||||
|
||||
void init_platform_irq_controller();
|
||||
void init_platform_devices();
|
||||
|
||||
void platform_timer_start(void);
|
||||
void platform_test_cpucycles();
|
||||
|
||||
void platform_timer_start(void);
|
||||
|
||||
void scu_init(void);
|
||||
|
||||
void scu_print_state(void);
|
||||
|
||||
#endif /* __REALVIEW_PLATFORM_H__ */
|
||||
13
include/l4/platform/realview/timer.h
Normal file
13
include/l4/platform/realview/timer.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Platform encapsulation over timer driver.
|
||||
*
|
||||
* Copyright (C) 2007 Bahadir Balban
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_REALVIEW_TIMER_H__
|
||||
#define __PLATFORM_REALVIEW_TIMER_H__
|
||||
|
||||
#include <l4/drivers/timer/sp804/timer.h>
|
||||
|
||||
#endif /* __PLATFORM_REALVIEW_TIMER_H__ */
|
||||
14
include/l4/platform/realview/uart.h
Normal file
14
include/l4/platform/realview/uart.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Ties generic uart call to platform specific
|
||||
* uart driver implementation
|
||||
*
|
||||
* Copyright (C) 2007 Bahadir Balban
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_REALVIEW_UART_H__
|
||||
#define __PLATFORM_REALVIEW_UART_H__
|
||||
|
||||
/* Platform specific implementations are defined here */
|
||||
#include <l4/drivers/uart/pl011/uart.h>
|
||||
|
||||
#endif /* __PLATFORM_REALVIEW_UART_H__ */
|
||||
Reference in New Issue
Block a user