Changeset 4872160 in mainline for boot/arch/arm32/include/mm.h
- 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
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.