Changeset 8f9d70b in mainline for boot/arch/arm32/src/mm.c


Ignore:
Timestamp:
2013-03-24T14:55:36Z (11 years ago)
Author:
Beniamino Galvani <b.galvani@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dfa93b0
Parents:
119b46e
Message:

Initial support for Raspberry Pi

File:
1 edited

Legend:

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

    r119b46e r8f9d70b  
    7575        if (address >= AM335x_RAM_START && address < AM335x_RAM_END)
    7676                return 1;
     77#elif defined MACHINE_raspberrypi
     78        const unsigned long address = section << PTE_SECTION_SHIFT;
     79        if (address < BCM2835_RAM_END)
     80                return 1;
    7781#endif
    7882        return 0;
     
    113117static void init_boot_pt(void)
    114118{
     119#if defined MACHINE_raspberrypi
     120        const pfn_t split_page = 2048;
     121#else
    115122        const pfn_t split_page = PTL0_ENTRIES;
     123#endif
     124
    116125        /* Create 1:1 virtual-physical mapping (in lower 2 GB). */
    117126        pfn_t page;
    118127        for (page = 0; page < split_page; page++)
    119128                init_ptl0_section(&boot_pt[page], page);
    120        
     129
     130#if defined MACHINE_raspberrypi
     131        for (; page < PTL0_ENTRIES; page++)
     132                init_ptl0_section(&boot_pt[page], page - split_page);
     133#endif 
    121134        asm volatile (
    122135                "mcr p15, 0, %[pt], c2, c0, 0\n"
Note: See TracChangeset for help on using the changeset viewer.