The Bcm283x architecture provides multiple implementations of the Random Number Generator, that have incompatibilities with one another.
Because we will need to add a new driver for the Bcm2838 RNG we rename the existing Bcm2835-compatible driver to Bcm2835RngDxe and update the one platform that depends on this driver (RPi3). We also rename the internal function calls from Bcm2836 to Bcm2835 since, if we ever add platform support for Pi models that use this SoC (original Pi, Pi Zero, etc), it may look confusing to reference a feature that seems to belongs to the next SoC iteration. Signed-off-by: Pete Batard <p...@akeo.ie> --- Platform/RaspberryPi/RPi3/RPi3.dsc | 2 +- Platform/RaspberryPi/RPi3/RPi3.fdf | 2 +- Silicon/Broadcom/Bcm283x/Drivers/{RngDxe/RngDxe.c => Bcm2835RngDxe/Bcm2835RngDxe.c} | 16 ++++++++-------- Silicon/Broadcom/Bcm283x/Drivers/{RngDxe/RngDxe.inf => Bcm2835RngDxe/Bcm2835RngDxe.inf} | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc index 6a808b287ea9..945baa5021f8 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -602,7 +602,7 @@ [Components.common] # # RNG # - Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.inf + Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.inf # # UEFI application (Shell Embedded Boot Loader) diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf b/Platform/RaspberryPi/RPi3/RPi3.fdf index fd4e490fdcdf..31730865601f 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.fdf +++ b/Platform/RaspberryPi/RPi3/RPi3.fdf @@ -273,7 +273,7 @@ [FV.FvMain] # # RNG # - INF Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.inf + INF Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.inf # # SCSI Bus and Disk Driver diff --git a/Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.c b/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c similarity index 93% rename from Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.c rename to Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c index 722815d32f06..ea86f9b3877e 100644 --- a/Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.c +++ b/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c @@ -1,6 +1,6 @@ /** @file - This driver produces an EFI_RNG_PROTOCOL instance for the Broadcom 2836 RNG + This driver produces an EFI_RNG_PROTOCOL instance for the Broadcom 2835 RNG Copyright (C) 2019, Linaro Ltd. All rights reserved.<BR> @@ -59,7 +59,7 @@ STATIC EFI_STATUS EFIAPI -Bcm2836RngGetInfo ( +Bcm2835RngGetInfo ( IN EFI_RNG_PROTOCOL *This, IN OUT UINTN *RNGAlgorithmListSize, OUT EFI_RNG_ALGORITHM *RNGAlgorithmList @@ -116,7 +116,7 @@ Bcm2836RngGetInfo ( STATIC EFI_STATUS EFIAPI -Bcm2836RngGetRNG ( +Bcm2835RngGetRNG ( IN EFI_RNG_PROTOCOL *This, IN EFI_RNG_ALGORITHM *RNGAlgorithm, OPTIONAL IN UINTN RNGValueLength, @@ -168,9 +168,9 @@ Bcm2836RngGetRNG ( return EFI_SUCCESS; } -STATIC EFI_RNG_PROTOCOL mBcm2836RngProtocol = { - Bcm2836RngGetInfo, - Bcm2836RngGetRNG +STATIC EFI_RNG_PROTOCOL mBcm2835RngProtocol = { + Bcm2835RngGetInfo, + Bcm2835RngGetRNG }; // @@ -178,7 +178,7 @@ STATIC EFI_RNG_PROTOCOL mBcm2836RngProtocol = { // EFI_STATUS EFIAPI -Bcm2836RngEntryPoint ( +Bcm2835RngEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) @@ -186,7 +186,7 @@ Bcm2836RngEntryPoint ( EFI_STATUS Status; Status = gBS->InstallMultipleProtocolInterfaces (&ImageHandle, - &gEfiRngProtocolGuid, &mBcm2836RngProtocol, + &gEfiRngProtocolGuid, &mBcm2835RngProtocol, NULL); ASSERT_EFI_ERROR (Status); diff --git a/Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.inf b/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.inf similarity index 82% rename from Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.inf rename to Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.inf index 8eb90de85cfd..dc91c1a9ba7b 100644 --- a/Silicon/Broadcom/Bcm283x/Drivers/RngDxe/RngDxe.inf +++ b/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.inf @@ -9,14 +9,14 @@ [Defines] INF_VERSION = 0x0001001B - BASE_NAME = RngDxe + BASE_NAME = Bcm2835RngDxe FILE_GUID = 9743084e-c82a-4714-b2ba-f571f81cb021 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - ENTRY_POINT = Bcm2836RngEntryPoint + ENTRY_POINT = Bcm2835RngEntryPoint [Sources] - RngDxe.c + Bcm2835RngDxe.c [Packages] MdePkg/MdePkg.dec -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51525): https://edk2.groups.io/g/devel/message/51525 Mute This Topic: https://groups.io/mt/64721524/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-