@@ -327,5 +327,13 @@ PlatformDxeEntryPoint (
ASSERT_EFI_ERROR (Status);
}
+ if (mHiiSettings->InstalledMezzanineType == MEZZANINE_SECURE96) {
+ Handle = NULL;
+ Status = gBS->InstallProtocolInterface (&Handle,
+ &gSecure96HardwarePresent,
+ EFI_NATIVE_INTERFACE, NULL);
+ ASSERT_EFI_ERROR (Status);
+ }
+
return EFI_SUCCESS;
}
@@ -34,6 +34,7 @@ [Packages]
EmbeddedPkg/EmbeddedPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
+ Platform/96boards/Secure96/Secure96.dec
Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.dec
Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.dec
Silicon/Socionext/SynQuacer/SynQuacer.dec
@@ -59,6 +60,7 @@ [Guids]
gEfiHiiPlatformSetupFormsetGuid
gFdtTableGuid
gNetsecNonDiscoverableDeviceGuid
+ gSecure96HardwarePresent
gSynQuacerNonDiscoverableI2cMasterGuid
gSynQuacerNonDiscoverableRuntimeI2cMasterGuid
gSynQuacerPlatformFormSetGuid
@@ -33,3 +33,9 @@
#string STR_EMMC_DISABLED #language en-US "Disabled"
#string STR_EMMC_ENABLED #language en-US "Enabled"
+
+#string STR_MEZZANINE_SELECT_PROMPT #language en-US "96boards mezzanine"
+#string STR_MEZZANINE_SELECT_HELP #language en-US "The type of mezzanine board plugged into the 96boards LS connector"
+
+#string STR_MEZZANINE_NONE #language en-US "None/Unknown"
+#string STR_MEZZANINE_SECURE96 #language en-US "Secure96"
@@ -70,6 +70,14 @@ formset
option text = STRING_TOKEN(STR_EMMC_ENABLED), value = EMMC_ENABLED, flags = 0;
endoneof;
+ oneof varid = SynQuacerPlatformSettings.InstalledMezzanineType,
+ prompt = STRING_TOKEN(STR_MEZZANINE_SELECT_PROMPT),
+ help = STRING_TOKEN(STR_MEZZANINE_SELECT_HELP),
+ flags = NUMERIC_SIZE_1 | INTERACTIVE | RESET_REQUIRED,
+ option text = STRING_TOKEN(STR_MEZZANINE_NONE), value = MEZZANINE_NONE, flags = DEFAULT;
+ option text = STRING_TOKEN(STR_MEZZANINE_SECURE96), value = MEZZANINE_SECURE96, flags = 0;
+ endoneof;
+
subtitle text = STRING_TOKEN(STR_NULL_STRING);
endform;
@@ -22,12 +22,16 @@
#define PCIE_MAX_SPEED_UNLIMITED 0x0
#define PCIE_MAX_SPEED_GEN1 0x1
+#define MEZZANINE_NONE 0x0
+#define MEZZANINE_SECURE96 0x1
+
typedef struct {
UINT8 EnableEmmc;
UINT8 PcieSlot0MaxSpeed;
UINT8 PcieSlot1MaxSpeed;
UINT8 PcieSlot2MaxSpeed;
- UINT8 Reserved[4];
+ UINT8 InstalledMezzanineType;
+ UINT8 Reserved[3];
} SYNQUACER_PLATFORM_VARSTORE_DATA;
#endif
96boards mezzanines are not runtime discoverable, so it is up to the user to tell the firmware what is connected. So add a pulldown entry that allows a selection to be made: note that boards are only expected to have a single LS connector, so a pulldown is appropriate here. If Secure96 has been selected by the user, install the associated GUID as a protocol, which the Secure96Dxe (which installs the DT overlay into the device tree) has a depex on. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 8 ++++++++ Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf | 2 ++ Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.uni | 6 ++++++ Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.vfr | 8 ++++++++ Silicon/Socionext/SynQuacer/Include/Platform/VarStore.h | 6 +++++- 5 files changed, 29 insertions(+), 1 deletion(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel