Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/src/mm.c

    raccdbd8 rc5429fe  
    9999 *
    100100 * Memory areas used for I/O are excluded from caching.
     101 * At the moment caching is enabled only on GTA02.
    101102 *
    102103 * @param section       The section number.
     
    170171{
    171172        /*
    172          * Our goal is to create page tables that serve two purposes:
    173          *
    174          * 1. Allow the loader to run in identity-mapped virtual memory and use
    175          *    I/O devices (e.g. an UART for logging).
    176          * 2. Allow the kernel to start running in virtual memory from addresses
    177          *    above 2G.
    178          *
    179          * The matters are slightly complicated by the different locations of
    180          * physical memory and I/O devices on the various boards that we
    181          * support. We see two cases (but other are still possible):
    182          *
    183          * a) Both RAM and I/O is in memory below 2G
    184          *    For instance, this is the case of GTA02, Integrator/CP
    185          *    and RaspberryPi
    186          * b) RAM starts at 2G and I/O devices are below 2G
    187          *    For example, this is the case of BeagleBone and BeagleBoard XM
    188          *
    189          * This leads to two possible setups of boot page tables:
    190          *
    191          * A) To arrange for a), split the virtual address space into two
    192          *    halves, both identity-mapping the first 2G of physical address
    193          *    space.
    194          * B) To accommodate b), create one larger virtual address space
    195          *    identity-mapping the entire physical address space.
    196          */
    197 
    198         for (pfn_t page = 0; page < PTL0_ENTRIES; page++) {
    199                 pfn_t frame = page;
    200                 if (BOOT_BASE < 0x80000000UL && page >= PTL0_ENTRIES / 2)
    201                         frame -= PTL0_ENTRIES / 2;
    202                 init_ptl0_section(&boot_pt[page], frame);
    203         }
     173         * Create 1:1 virtual-physical mapping.
     174         * Physical memory on BBxM a BBone starts at 2GB
     175         * boundary, icp has a memory mirror at 2GB.
     176         * (ARM Integrator Core Module User guide ch. 6.3,  p. 6-7)
     177         * gta02 somehow works (probably due to limited address size),
     178         * s3c2442b manual ch. 5, p.5-1:
     179         * "Address space: 128Mbytes per bank (total 1GB/8 banks)"
     180         */
     181        for (pfn_t page = 0; page < PTL0_ENTRIES; ++page)
     182                init_ptl0_section(&boot_pt[page], page);
    204183
    205184        /*
Note: See TracChangeset for help on using the changeset viewer.