A large reason for using the SPI flash on this platform is that it can be updated without OS interference at rutime. In order for that to happen we need both the SPI, as well as the GPIO which is used to change the pinmux from the PWM device to SPI added to the UEFI memory map as being used by the runtime service.
Tested-by: Ard Biesheuvel <a...@kernel.org> Signed-off-by: Jeremy Linton <jeremy.lin...@arm.com> --- Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index de7eb769ea..b0db3312c5 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -503,6 +503,22 @@ ApplyVariables ( DEBUG ((DEBUG_INFO, "Current CPU speed is %u MHz\n", Rate / FREQ_1_MHZ)); } + if (mModelFamily == 4) { + Status = gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, BCM2836_SPI0_BASE_ADDRESS, + SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); + ASSERT_EFI_ERROR (Status); + Status = gDS->SetMemorySpaceAttributes (BCM2836_SPI0_BASE_ADDRESS, + SIZE_4KB, EFI_MEMORY_UC|EFI_MEMORY_RUNTIME); + + Status = gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, GPIO_BASE_ADDRESS, + SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); + ASSERT_EFI_ERROR (Status); + Status = gDS->SetMemorySpaceAttributes (GPIO_BASE_ADDRESS, + SIZE_4KB, EFI_MEMORY_UC|EFI_MEMORY_RUNTIME); + + ASSERT_EFI_ERROR (Status); + } + if (mModelFamily >= 4 && PcdGet32 (PcdRamMoreThan3GB) != 0 && PcdGet32 (PcdRamLimitTo3GB) == 0) { UINT64 SystemMemorySize; -- 2.13.7 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85255): https://edk2.groups.io/g/devel/message/85255 Mute This Topic: https://groups.io/mt/88087669/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-