* [PATCH edk2-platforms 1/5] Silicon/SynQuacer/NetsecDxe: Add polling function to reinitialize GMAC
2018-04-27 11:37 [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
@ 2018-04-27 11:37 ` Ard Biesheuvel
2018-04-27 11:37 ` [PATCH edk2-platforms 2/5] Platform/Socionext/DeveloperBox: add SNP driver Ard Biesheuvel
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-04-27 11:37 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Masahisa KOJIMA
From: Masahisa KOJIMA <masahisa.kojima@linaro.org>
GMAC is a Gigabit Ethernet MAC implemented in NETSEC. When the physical
link is changed from DOWN to UP, GMAC should be reinitialized properly.
We add polling function to check the physical link status and
reinitialize GMAC:
- when the GMAC is running and physical link is down, stop GMAC,
- when the GMAC is stopped and physical link is up, start GMAC.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Masahisa KOJIMA <masahisa.kojima@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c | 108 ++++++++++++++++++++
Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h | 4 +
2 files changed, 112 insertions(+)
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c
index 764c44bb3c87..fa8ae79da28e 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c
@@ -161,6 +161,10 @@ SnpStop (
gBS->CloseEvent (LanDriver->ExitBootEvent);
+ gBS->SetTimer (LanDriver->PhyStatusEvent, TimerCancel, 0);
+ gBS->CloseEvent (LanDriver->PhyStatusEvent);
+ LanDriver->PhyStatusEvent = NULL;
+
// Change the state
Snp->Mode->State = EfiSimpleNetworkStopped;
Status = EFI_SUCCESS;
@@ -406,6 +410,99 @@ NotifyExitBoot (
gBS->CloseEvent (Event);
}
+/**
+ Polling function to check the physical link status with GMAC
+
+ @param[in] Timer Event
+ @param[in] Context Pointer to the Snp structure
+
+**/
+STATIC
+VOID
+EFIAPI
+NetsecPollPhyStatus (
+ IN EFI_EVENT Timer,
+ IN VOID *Context
+ )
+{
+ EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
+ NETSEC_DRIVER *LanDriver;
+ ogma_phy_link_status_t phy_link_status;
+ ogma_gmac_mode_t ogma_gmac_mode;
+ ogma_err_t ogma_err;
+ BOOLEAN ValidFlag;
+ ogma_gmac_mode_t GmacMode;
+ BOOLEAN RxRunningFlag;
+ BOOLEAN TxRunningFlag;
+
+ Snp = (EFI_SIMPLE_NETWORK_PROTOCOL *)Context;
+ if (Snp == NULL) {
+ DEBUG((DEBUG_ERROR, "NETSEC: PollPhyStatus() invalid Snp\n"));
+ return;
+ }
+
+ LanDriver = INSTANCE_FROM_SNP_THIS (Snp);
+
+ // Update the media status
+ ogma_err = ogma_get_phy_link_status (LanDriver->Handle, LanDriver->PhyAddress,
+ &phy_link_status);
+ if (ogma_err != OGMA_ERR_OK) {
+ DEBUG ((DEBUG_ERROR,
+ "NETSEC: ogma_get_phy_link_status failed with error code: %d\n",
+ (INT32)ogma_err));
+ return;
+ }
+
+ // Update the GMAC status
+ ogma_err = ogma_get_gmac_status (LanDriver->Handle, &ValidFlag, &GmacMode,
+ &RxRunningFlag, &TxRunningFlag);
+ if (ogma_err != OGMA_ERR_OK) {
+ DEBUG ((DEBUG_ERROR,
+ "NETSEC: ogma_get_gmac_status failed with error code: %d\n",
+ (INT32)ogma_err));
+ return;
+ }
+
+ // Stop GMAC when GMAC is running and physical link is down
+ if (RxRunningFlag && TxRunningFlag && !phy_link_status.up_flag) {
+ ogma_err = ogma_stop_gmac (LanDriver->Handle, OGMA_TRUE, OGMA_TRUE);
+ if (ogma_err != OGMA_ERR_OK) {
+ DEBUG ((DEBUG_ERROR,
+ "NETSEC: ogma_stop_gmac() failed with error status %d\n",
+ ogma_err));
+ return;
+ }
+ }
+
+ // Start GMAC when GMAC is stopped and physical link is up
+ if (!RxRunningFlag && !TxRunningFlag && phy_link_status.up_flag) {
+ ZeroMem (&ogma_gmac_mode, sizeof (ogma_gmac_mode_t));
+ ogma_gmac_mode.link_speed = phy_link_status.link_speed;
+ ogma_gmac_mode.half_duplex_flag = (ogma_bool)phy_link_status.half_duplex_flag;
+ if (!phy_link_status.half_duplex_flag && FixedPcdGet8 (PcdFlowCtrl)) {
+ ogma_gmac_mode.flow_ctrl_enable_flag = FixedPcdGet8 (PcdFlowCtrl);
+ ogma_gmac_mode.flow_ctrl_start_threshold = FixedPcdGet16 (PcdFlowCtrlStartThreshold);
+ ogma_gmac_mode.flow_ctrl_stop_threshold = FixedPcdGet16 (PcdFlowCtrlStopThreshold);
+ ogma_gmac_mode.pause_time = FixedPcdGet16 (PcdPauseTime);
+ }
+
+ ogma_err = ogma_set_gmac_mode (LanDriver->Handle, &ogma_gmac_mode);
+ if (ogma_err != OGMA_ERR_OK) {
+ DEBUG ((DEBUG_ERROR,
+ "NETSEC: ogma_set_gmac() failed with error status %d\n",
+ (INT32)ogma_err));
+ return;
+ }
+
+ ogma_err = ogma_start_gmac (LanDriver->Handle, OGMA_TRUE, OGMA_TRUE);
+ if (ogma_err != OGMA_ERR_OK) {
+ DEBUG ((DEBUG_ERROR,
+ "NETSEC: ogma_start_gmac() failed with error status %d\n",
+ (INT32)ogma_err));
+ }
+ }
+}
+
/*
* UEFI Start() function
*/
@@ -450,6 +547,17 @@ SnpStart (
NotifyExitBoot, Snp, &LanDriver->ExitBootEvent);
ASSERT_EFI_ERROR (Status);
+ Status = gBS->CreateEvent (EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
+ NetsecPollPhyStatus, Snp, &LanDriver->PhyStatusEvent);
+ ASSERT_EFI_ERROR (Status);
+
+ Status = gBS->SetTimer (
+ LanDriver->PhyStatusEvent,
+ TimerPeriodic,
+ NETSEC_PHY_STATUS_POLL_INTERVAL
+ );
+ ASSERT_EFI_ERROR (Status);
+
// Change state
Mode->State = EfiSimpleNetworkStarted;
Status = EFI_SUCCESS;
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h
index 6aa7f1a1d107..f09fb609ba5a 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h
+++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h
@@ -71,6 +71,8 @@ typedef struct {
EFI_EVENT ExitBootEvent;
+ EFI_EVENT PhyStatusEvent;
+
NON_DISCOVERABLE_DEVICE *Dev;
NETSEC_DEVICE_PATH DevicePath;
@@ -115,4 +117,6 @@ NetsecRelease (
#define RXINT_TMR_CNT_US 0
#define RXINT_PKTCNT 1
+#define NETSEC_PHY_STATUS_POLL_INTERVAL (EFI_TIMER_PERIOD_MILLISECONDS (1000))
+
#endif
--
2.17.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH edk2-platforms 2/5] Platform/Socionext/DeveloperBox: add SNP driver
2018-04-27 11:37 [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
2018-04-27 11:37 ` [PATCH edk2-platforms 1/5] Silicon/SynQuacer/NetsecDxe: Add polling function to reinitialize GMAC Ard Biesheuvel
@ 2018-04-27 11:37 ` Ard Biesheuvel
2018-05-22 15:04 ` Leif Lindholm
2018-04-27 11:37 ` [PATCH edk2-platforms 3/5] Platform/SynQuacer: add 'acpiview' shell command to build Ard Biesheuvel
` (3 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2018-04-27 11:37 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Even though the builtin NETSEC controller driver implements the Simple
Network Protocol (SNP) directly, other network controllers connected
via PCIe may be supported by a UNDI driver, which require the generic
SnpDxe driver in order to be usable.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 1 +
Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 1 +
2 files changed, 2 insertions(+)
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index cc36c2ed1772..430c3fb06df1 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -633,6 +633,7 @@ [Components.common]
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+ MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index 2da83850975b..1b8de4c3823a 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -203,6 +203,7 @@ [FV.FvMain]
INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+ INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
--
2.17.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH edk2-platforms 2/5] Platform/Socionext/DeveloperBox: add SNP driver
2018-04-27 11:37 ` [PATCH edk2-platforms 2/5] Platform/Socionext/DeveloperBox: add SNP driver Ard Biesheuvel
@ 2018-05-22 15:04 ` Leif Lindholm
0 siblings, 0 replies; 8+ messages in thread
From: Leif Lindholm @ 2018-05-22 15:04 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel
To save me making a triple-take when I see this commit in the log in
future, could you change the subject to say SnpDxe instead of SNP?
If so, for the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
On Fri, Apr 27, 2018 at 01:37:45PM +0200, Ard Biesheuvel wrote:
> Even though the builtin NETSEC controller driver implements the Simple
> Network Protocol (SNP) directly, other network controllers connected
> via PCIe may be supported by a UNDI driver, which require the generic
> SnpDxe driver in order to be usable.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 1 +
> Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> index cc36c2ed1772..430c3fb06df1 100644
> --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> @@ -633,6 +633,7 @@ [Components.common]
> MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
> MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
> MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
> + MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
> MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
> MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
> index 2da83850975b..1b8de4c3823a 100644
> --- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
> +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
> @@ -203,6 +203,7 @@ [FV.FvMain]
> INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
> INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
> INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
> + INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
> INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
> INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> --
> 2.17.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH edk2-platforms 3/5] Platform/SynQuacer: add 'acpiview' shell command to build
2018-04-27 11:37 [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
2018-04-27 11:37 ` [PATCH edk2-platforms 1/5] Silicon/SynQuacer/NetsecDxe: Add polling function to reinitialize GMAC Ard Biesheuvel
2018-04-27 11:37 ` [PATCH edk2-platforms 2/5] Platform/Socionext/DeveloperBox: add SNP driver Ard Biesheuvel
@ 2018-04-27 11:37 ` Ard Biesheuvel
2018-04-27 11:37 ` [PATCH edk2-platforms 4/5] Silicon/SynQuacer/PlatformDxe: depex on gEfiVariableArchProtocolGuid Ard Biesheuvel
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-04-27 11:37 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
To help diagnose ACPI related boot problems, include the 'acpiview'
builtin shell command to our build of the UEFI Shell.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 1 +
Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 1 +
2 files changed, 2 insertions(+)
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index 430c3fb06df1..cacb3d9e4852 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -533,6 +533,7 @@ [Components.common]
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+ NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
index f2c6aa15fee4..2d68aed76ca2 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
@@ -505,6 +505,7 @@ [Components.common]
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+ NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
--
2.17.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH edk2-platforms 4/5] Silicon/SynQuacer/PlatformDxe: depex on gEfiVariableArchProtocolGuid
2018-04-27 11:37 [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
` (2 preceding siblings ...)
2018-04-27 11:37 ` [PATCH edk2-platforms 3/5] Platform/SynQuacer: add 'acpiview' shell command to build Ard Biesheuvel
@ 2018-04-27 11:37 ` Ard Biesheuvel
2018-04-27 11:37 ` [PATCH edk2-platforms 5/5] Silicon/SynQuacer: drop BEFORE depex for varstore formatting Ard Biesheuvel
2018-05-22 15:41 ` [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
5 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-04-27 11:37 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
SynQuacer's PlatformDxe uses HII style dynamic PCDs, and so it
implicitly depends on the PI variable protocol. This dependency is
not made explicit due to the fact that it is platform dependent
whether a certain variable is backed by such a dynamic PCD.
So add gEfiVariableArchProtocolGuid to PlatformDxe's DEPEX to ensure
that it does not attempt to refer to HII style dynamic PCDs before
the driver that produces them has been dispatched.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Please refer to this discussion for more details:
https://lists.01.org/pipermail/edk2-devel/2018-April/023700.html
Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
index 8df3073bf24b..5fa2b7f6071d 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf
@@ -84,4 +84,4 @@ [Pcd]
gSynQuacerTokenSpaceGuid.PcdPlatformSettings
[Depex]
- TRUE
+ gEfiVariableArchProtocolGuid
--
2.17.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH edk2-platforms 5/5] Silicon/SynQuacer: drop BEFORE depex for varstore formatting
2018-04-27 11:37 [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
` (3 preceding siblings ...)
2018-04-27 11:37 ` [PATCH edk2-platforms 4/5] Silicon/SynQuacer/PlatformDxe: depex on gEfiVariableArchProtocolGuid Ard Biesheuvel
@ 2018-04-27 11:37 ` Ard Biesheuvel
2018-05-22 15:41 ` [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
5 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-04-27 11:37 UTC (permalink / raw)
To: edk2-devel; +Cc: leif.lindholm, Ard Biesheuvel
Laszlo kindly implemented support for correctly sequencing the load
order of the various DXE drivers involved in persistent variable
support so that we can ensure that an empty or corrupted varstore
in NOR flash is reinitialized before the variable runtime driver
attempts to access it. So incorporate this into the SynQuacar
platforms.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 1 +
Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 1 +
Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf | 6 ++----
Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvbDxe.c | 15 +++++++++++++++
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
index cacb3d9e4852..75816ad94ff3 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
@@ -521,6 +521,7 @@ [Components.common]
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
<LibraryClasses>
+ NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
index 2d68aed76ca2..aa34fb075d77 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc
@@ -493,6 +493,7 @@ [Components.common]
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
<LibraryClasses>
+ NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf
index 62f81cfe33cd..bddb052c2dcc 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf
+++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf
@@ -53,6 +53,7 @@ [LibraryClasses]
UefiRuntimeServicesTableLib
[Guids]
+ gEdkiiNvVarStoreFormattedGuid
gEfiAuthenticatedVariableGuid
gEfiEventVirtualAddressChangeGuid
gEfiSystemNvDataFvGuid
@@ -75,7 +76,4 @@ [FixedPcd]
gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress
[Depex]
- #
- # NorFlashDxe must be loaded before VariableRuntimeDxe in case empty flash needs populating with default values
- #
- BEFORE gVariableRuntimeDxeFileGuid
+ gEfiCpuArchProtocolGuid
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvbDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvbDxe.c
index acc9490b9a5f..ca3b1b5c34f8 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvbDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvbDxe.c
@@ -813,6 +813,21 @@ NorFlashFvbInitialize (
}
}
+ //
+ // The driver implementing the variable read service can now be dispatched;
+ // the varstore headers are in place.
+ //
+ Status = gBS->InstallProtocolInterface (&gImageHandle,
+ &gEdkiiNvVarStoreFormattedGuid,
+ EFI_NATIVE_INTERFACE,
+ NULL);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR,
+ "%a: Failed to install gEdkiiNvVarStoreFormattedGuid\n",
+ __FUNCTION__));
+ return Status;
+ }
+
//
// Declare the Non-Volatile storage as EFI_MEMORY_RUNTIME
//
--
2.17.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH edk2-platforms 0/5] assorted SynQuacer updates
2018-04-27 11:37 [PATCH edk2-platforms 0/5] assorted SynQuacer updates Ard Biesheuvel
` (4 preceding siblings ...)
2018-04-27 11:37 ` [PATCH edk2-platforms 5/5] Silicon/SynQuacer: drop BEFORE depex for varstore formatting Ard Biesheuvel
@ 2018-05-22 15:41 ` Ard Biesheuvel
5 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2018-05-22 15:41 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: Leif Lindholm, Ard Biesheuvel
On 27 April 2018 at 13:37, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> Some changes that have been queuing up over the past weeks.
>
> Ard Biesheuvel (4):
> Platform/Socionext/DeveloperBox: add SNP driver
> Platform/SynQuacer: add 'acpiview' shell command to build
> Silicon/SynQuacer/PlatformDxe: depex on gEfiVariableArchProtocolGuid
> Silicon/SynQuacer: drop BEFORE depex for varstore formatting
>
> Masahisa KOJIMA (1):
> Silicon/SynQuacer/NetsecDxe: Add polling function to reinitialize GMAC
>
Series pushed as f17e3a164917..735e517fefbf
Thanks.
> .../Socionext/DeveloperBox/DeveloperBox.dsc | 3 +
> .../Socionext/DeveloperBox/DeveloperBox.fdf | 1 +
> .../SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 2 +
> .../SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf | 6 +-
> .../Drivers/Fip006Dxe/NorFlashFvbDxe.c | 15 +++
> .../Drivers/Net/NetsecDxe/NetsecDxe.c | 108 ++++++++++++++++++
> .../Drivers/Net/NetsecDxe/NetsecDxe.h | 4 +
> .../Drivers/PlatformDxe/PlatformDxe.inf | 2 +-
> 8 files changed, 136 insertions(+), 5 deletions(-)
>
> --
> 2.17.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread