summaryrefslogtreecommitdiff
path: root/Platform/RaspberryPi/Include/Library
AgeCommit message (Collapse)AuthorFilesLines
2019-12-11Platform/RPi: Don't describe MMIO regions as memoryArd Biesheuvel1-3/+4
When using ACPI OpRegions to poke device registers, Linux will use the UEFI memory map to decide which memory attributes to use, and so they should not be described as cacheable memory. Since MMIO regions that don't require an OS virtual mapping at runtime don't really belong in the UEFI memory map to begin with, omit them entirely. Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
2019-11-19Platform/RPi: Clean up and improve early memory initPete Batard1-0/+26
This patch improves memory initialization for the Raspberry Pi Platform by: Using VideoCore mailbox data to reserve only the regions that are actually mapped. Especially, besides the base RAM size, which was already set using VideoCore data, we can set the GPU/VideoCore base address as well as the extended RAM, which is the memory beyond 1 GB that is available on models such as the Raspberry Pi 4 (for the 2GB or 4GB versions). Introducing a new PcdExtendedMemoryBase PCD for the base address of the extended memory region, which currently cannot be retrieved from VideoCore (MBOX_GET_ARM_MEMSIZE still only returns a single region on Bcm2711). Introducing a new RpiPlatformGetVirtualMemoryInfo() companion call to ArmPlatformGetVirtualMemoryMap() that allows us greatly simplify the registration of each segment in MemoryPeim() as well as making it easier to maintain for future models. We also fix SoC register space that should have been marked as reserved but wasn't until now and remove the unreferenced mSystemMemoryEnd extern in MemoryInitPeiLib.c. RaspberryPiMem.c incorporates some code from ArmJunoMem.c. Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>