Changeset 4872160 in mainline for boot/arch/arm32/include
- Timestamp:
- 2010-05-04T10:44:55Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 568db0f
- Parents:
- bb252ca
- Location:
- boot/arch/arm32/include
- Files:
-
- 5 moved
-
arch.h (moved) (moved from boot/arch/ia64/loader/types.h ) (2 diffs)
-
asm.h (moved) (moved from boot/arch/arm32/loader/asm.h ) (1 diff)
-
main.h (moved) (moved from boot/arch/arm32/loader/types.h ) (2 diffs)
-
mm.h (moved) (moved from boot/arch/arm32/loader/main.h ) (2 diffs)
-
types.h (moved) (moved from boot/arch/ppc32/loader/main.h ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/include/arch.h
rbb252ca r4872160 1 1 /* 2 * Copyright (c) 20 06Martin Decky2 * Copyright (c) 2010 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef BOOT_ ia64_TYPES_H_30 #define BOOT_ ia64_TYPES_H_29 #ifndef BOOT_arm32_ARCH_H 30 #define BOOT_arm32_ARCH_H 31 31 32 #include <gentypes.h> 32 #define PAGE_WIDTH 12 33 #define PAGE_SIZE (1 << PAGE_WIDTH) 33 34 34 typedef signed char int8_t; 35 #define PTL0_ENTRIES 4096 36 #define PTL0_ENTRY_SIZE 4 35 37 36 typedef unsigned char uint8_t; 37 typedef unsigned short uint16_t; 38 typedef unsigned int uint32_t; 39 typedef unsigned long uint64_t; 38 #define BOOT_OFFSET 0x800000 40 39 41 typedef uint64_t uintptr_t; 42 typedef uint64_t unative_t; 40 #ifndef __ASM__ 41 #define PA2KA(addr) (((uintptr_t) (addr)) + 0x80000000) 42 #else 43 #define PA2KA(addr) ((addr) + 0x80000000) 44 #endif 43 45 44 46 #endif 47 48 /** @} 49 */ -
boot/arch/arm32/include/asm.h
rbb252ca r4872160 27 27 */ 28 28 29 30 29 /** @addtogroup arm32boot 31 30 * @{ 32 31 */ 33 32 /** @file 34 * @brief Functions implemented in assembly.33 * @brief Functions implemented in assembly. 35 34 */ 36 37 35 38 36 #ifndef BOOT_arm32_ASM_H 39 37 #define BOOT_arm32_ASM_H 40 38 39 #include <arch/arch.h> 40 #include <arch/mm.h> 41 41 42 /** Called when the CPU is switched on. 42 extern pte_level0_section_t boot_pt[PTL0_ENTRIES]; 43 extern void *boot_stack; 44 45 /** Jump to the kernel entry point. 43 46 * 44 * This function is placed to the 0x0 address where ARM CPU starts execution. 45 * Jumps to the #bootstrap only. 46 */ 47 extern void start(void); 48 49 50 /** Jumps to the kernel entry point. 51 * 52 * @param entry Kernel entry point address. 47 * @param entry Kernel entry point. 53 48 * @param bootinfo Structure holding information about loaded tasks. 54 49 * 55 50 */ 56 extern void jump_to_kernel(void *entry, void *bootinfo) __attribute__((noreturn));57 51 extern void jump_to_kernel(void *entry, void *bootinfo) 52 __attribute__((noreturn)); 58 53 59 54 #endif -
boot/arch/arm32/include/main.h
rbb252ca r4872160 1 1 /* 2 * Copyright (c) 200 6 Martin Decky2 * Copyright (c) 2007 Michal Kebrt 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 30 29 /** @addtogroup arm32boot 31 30 * @{ 32 31 */ 33 /** @file 34 * @brief Definitions of basic types like #uintptr_t.35 */ 32 /** @file 33 * @brief Boot related declarations. 34 */ 36 35 36 #ifndef BOOT_arm32_MAIN_H 37 #define BOOT_arm32_MAIN_H 37 38 38 #ifndef BOOT_arm32_TYPES_H 39 #define BOOT_arm32_TYPES_H 39 /** Address where characters to be printed are expected. */ 40 #ifdef MACHINE_testarm 41 #define VIDEORAM_ADDRESS 0x10000000 42 #endif 40 43 44 #ifdef MACHINE_integratorcp 45 #define VIDEORAM_ADDRESS 0x16000000 46 #endif 41 47 42 #include <gentypes.h> 43 44 typedef signed char int8_t; 45 46 typedef unsigned char uint8_t; 47 typedef unsigned short uint16_t; 48 typedef unsigned int uint32_t; 49 typedef unsigned long long uint64_t; 50 51 typedef uint32_t uintptr_t; 52 typedef uint32_t unative_t; 53 48 extern void bootstrap(void); 54 49 55 50 #endif 56 51 57 58 52 /** @} 59 53 */ -
boot/arch/arm32/include/mm.h
rbb252ca r4872160 1 1 /* 2 * Copyright (c) 2007 Pavel Jancik 2 3 * Copyright (c) 2007 Michal Kebrt 3 4 * All rights reserved. … … 27 28 */ 28 29 29 30 30 /** @addtogroup arm32boot 31 31 * @{ 32 32 */ 33 33 /** @file 34 * @brief Boot related declarations. 34 * @brief Memory management used while booting the kernel. 35 * 36 * So called "section" paging is used while booting the kernel. The term 37 * "section" comes from the ARM architecture specification and stands for the 38 * following: one-level paging, 1MB sized pages, 4096 entries in the page 39 * table. 35 40 */ 36 41 42 #ifndef BOOT_arm32__MM_H 43 #define BOOT_arm32__MM_H 37 44 38 #ifndef BOOT_arm32_MAIN_H 39 #define BOOT_arm32_MAIN_H 45 #include <typedefs.h> 40 46 47 /** Describe "section" page table entry (one-level paging with 1 MB sized pages). */ 48 #define PTE_DESCRIPTOR_SECTION 0x02 41 49 42 /** Maximum number of tasks in the #bootinfo_t struct. */43 #define TASKMAP_MAX_RECORDS 3250 /** Page table access rights: user - no access, kernel - read/write. */ 51 #define PTE_AP_USER_NO_KERNEL_RW 0x01 44 52 45 /** Size of buffer for storing task name in task_t. */ 46 #define BOOTINFO_TASK_NAME_BUFLEN 32 53 /* Page table level 0 entry - "section" format is used 54 * (one-level paging, 1 MB sized pages). Used only while booting the kernel. 55 */ 56 typedef struct { 57 unsigned int descriptor_type : 2; 58 unsigned int bufferable : 1; 59 unsigned int cacheable : 1; 60 unsigned int impl_specific : 1; 61 unsigned int domain : 4; 62 unsigned int should_be_zero_1 : 1; 63 unsigned int access_permission : 2; 64 unsigned int should_be_zero_2 : 8; 65 unsigned int section_base_addr : 12; 66 } __attribute__((packed)) pte_level0_section_t; 47 67 48 49 /** Struct holding information about single loaded task. */ 50 typedef struct { 51 /** Address where the task was placed. */ 52 void *addr; 53 /** Size of the task's binary. */ 54 unsigned int size; 55 /** Task name. */ 56 char name[BOOTINFO_TASK_NAME_BUFLEN]; 57 } task_t; 58 59 60 /** Struct holding information about loaded tasks. */ 61 typedef struct { 62 /** Number of loaded tasks. */ 63 unsigned int cnt; 64 /** Array of loaded tasks. */ 65 task_t tasks[TASKMAP_MAX_RECORDS]; 66 } bootinfo_t; 67 68 69 extern void bootstrap(void); 68 extern void mmu_start(void); 70 69 71 70 #endif -
boot/arch/arm32/include/types.h
rbb252ca r4872160 1 1 /* 2 * Copyright (c) 200 5Martin Decky2 * Copyright (c) 2006 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef BOOT_ppc32_MAIN_H_ 30 #define BOOT_ppc32_MAIN_H_ 29 /** @addtogroup arm32boot 30 * @{ 31 */ 32 /** @file 33 * @brief Definitions of basic types like #uintptr_t. 34 */ 31 35 32 #include <ofw.h> 33 #include <ofw_tree.h> 34 #include <balloc.h> 35 #include <types.h> 36 #ifndef BOOT_arm32_TYPES_H 37 #define BOOT_arm32_TYPES_H 36 38 37 #define TASKMAP_MAX_RECORDS 32 38 39 /** Size of buffer for storing task name in task_t. */ 39 #define TASKMAP_MAX_RECORDS 32 40 40 #define BOOTINFO_TASK_NAME_BUFLEN 32 41 41 42 typedef uint32_t size_t; 43 typedef uint32_t uintptr_t; 44 45 typedef uint32_t pfn_t; 46 42 47 typedef struct { 48 /** Address where the task was placed. */ 43 49 void *addr; 44 uint32_t size; 50 /** Size of the task's binary. */ 51 size_t size; 52 /** Task name. */ 45 53 char name[BOOTINFO_TASK_NAME_BUFLEN]; 46 54 } task_t; 47 55 48 56 typedef struct { 49 uint32_t count;57 size_t cnt; 50 58 task_t tasks[TASKMAP_MAX_RECORDS]; 51 } taskmap_t;52 53 typedef struct {54 memmap_t memmap;55 taskmap_t taskmap;56 ballocs_t ballocs;57 ofw_tree_node_t *ofw_root;58 59 } bootinfo_t; 59 60 60 extern void start(void); 61 extern void bootstrap(void); 61 #endif 62 62 63 #endif 63 /** @} 64 */
Note:
See TracChangeset
for help on using the changeset viewer.
