Changeset 4872160 in mainline for boot/arch/arm32/include/mm.h


Ignore:
Timestamp:
2010-05-04T10:44:55Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
568db0f
Parents:
bb252ca
Message:

new boot infrastructure

  • more code and metadata unification
  • import of up-to-date implementations from the kernel
  • the boot loaders should behave more similarly on all platforms
  • support for deflate compressed (LZ77) boot components
    • this again allows feasible boot images to be created on mips32
  • IA64 is still not booting
    • the broken forked GNU EFI library has been removed, a replacement of the functionality is on its way
File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/include/mm.h

    rbb252ca r4872160  
    11/*
     2 * Copyright (c) 2007 Pavel Jancik
    23 * Copyright (c) 2007 Michal Kebrt
    34 * All rights reserved.
     
    2728 */
    2829
    29 
    3030/** @addtogroup arm32boot
    3131 * @{
    3232 */
    3333/** @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.
    3540 */
    3641
     42#ifndef BOOT_arm32__MM_H
     43#define BOOT_arm32__MM_H
    3744
    38 #ifndef BOOT_arm32_MAIN_H
    39 #define BOOT_arm32_MAIN_H
     45#include <typedefs.h>
    4046
     47/** Describe "section" page table entry (one-level paging with 1 MB sized pages). */
     48#define PTE_DESCRIPTOR_SECTION  0x02
    4149
    42 /** Maximum number of tasks in the #bootinfo_t struct. */
    43 #define TASKMAP_MAX_RECORDS 32
     50/** Page table access rights: user - no access, kernel - read/write. */
     51#define PTE_AP_USER_NO_KERNEL_RW  0x01
    4452
    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 */
     56typedef 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;
    4767
    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);
     68extern void mmu_start(void);
    7069
    7170#endif
Note: See TracChangeset for help on using the changeset viewer.