From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com
Subject: [edk2-platforms][PATCH 1/3] Silicon/Broadcom/Bcm283x: Rename Bcm2835 RNG driver
Date: Mon, 2 Dec 2019 11:55:04 +0000 [thread overview]
Message-ID: <20191202115506.4068-2-pete@akeo.ie> (raw)
In-Reply-To: <20191202115506.4068-1-pete@akeo.ie>
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 <pete@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
next prev parent reply other threads:[~2019-12-02 11:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 11:55 [edk2-platforms][PATCH 0/3] Silicon/Broadcom/Bcm283x: RNG improvements Pete Batard
2019-12-02 11:55 ` Pete Batard [this message]
2019-12-02 12:16 ` [edk2-platforms][PATCH 1/3] Silicon/Broadcom/Bcm283x: Rename Bcm2835 RNG driver Philippe Mathieu-Daudé
2019-12-02 11:55 ` [edk2-platforms][PATCH 2/3] Silicon/Broadcom/Bcm283x: Move Bcm2835 RNG defines to their own header Pete Batard
2019-12-02 12:17 ` Philippe Mathieu-Daudé
2019-12-02 11:55 ` [edk2-platforms][PATCH 3/3] Silicon/Broadcom/Bcm283x: Add Bcm2838 RNG driver Pete Batard
2019-12-02 16:03 ` [edk2-platforms][PATCH 0/3] Silicon/Broadcom/Bcm283x: RNG improvements Ard Biesheuvel
2019-12-02 16:53 ` [edk2-devel] " Pete Batard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191202115506.4068-2-pete@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox