Revision: 16203
http://sourceforge.net/p/edk2/code/16203
Author: oliviermartin
Date: 2014-10-10 10:39:36 +0000 (Fri, 10 Oct 2014)
Log Message:
-----------
ArmPlatformPkg/Bds: Reduce boot device entries
If a storage device is used for Variable storage or access is provided
by the Simple Filesystem Protocol do not list it again for RAW memory
map access in the 'Add Boot device' menu.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <[email protected]>
Reviewed-By: Olivier Martin <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPlatformPkg/Bds/Bds.inf
trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c
Modified: trunk/edk2/ArmPlatformPkg/Bds/Bds.inf
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/Bds.inf 2014-10-10 04:52:38 UTC (rev
16202)
+++ trunk/edk2/ArmPlatformPkg/Bds/Bds.inf 2014-10-10 10:39:36 UTC (rev
16203)
@@ -61,6 +61,8 @@
gEfiPxeBaseCodeProtocolGuid
gEfiSimpleNetworkProtocolGuid
gEfiDevicePathToTextProtocolGuid
+ gEfiFirmwareVolumeBlockProtocolGuid
+ gEfiFirmwareVolumeBlock2ProtocolGuid
[Pcd]
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor
Modified: trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c 2014-10-10 04:52:38 UTC
(rev 16202)
+++ trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c 2014-10-10 10:39:36 UTC
(rev 16203)
@@ -18,6 +18,7 @@
#include <Protocol/BlockIo.h>
#include <Protocol/DevicePathToText.h>
+#include <Protocol/FirmwareVolumeBlock.h>
#include <Protocol/PxeBaseCode.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/SimpleNetwork.h>
@@ -530,17 +531,19 @@
IN OUT LIST_ENTRY* BdsLoadOptionList
)
{
- EFI_STATUS Status;
- UINTN HandleCount;
- EFI_HANDLE *HandleBuffer;
- UINTN DevicePathHandleCount;
- EFI_HANDLE *DevicePathHandleBuffer;
- BOOLEAN IsParent;
- UINTN Index;
- UINTN Index2;
- BDS_SUPPORTED_DEVICE *SupportedDevice;
- EFI_DEVICE_PATH_PROTOCOL* DevicePathProtocol;
- EFI_DEVICE_PATH* DevicePath;
+ EFI_STATUS Status;
+ UINTN HandleCount;
+ EFI_HANDLE *HandleBuffer;
+ UINTN DevicePathHandleCount;
+ EFI_HANDLE *DevicePathHandleBuffer;
+ BOOLEAN IsParent;
+ UINTN Index;
+ UINTN Index2;
+ BDS_SUPPORTED_DEVICE *SupportedDevice;
+ EFI_DEVICE_PATH_PROTOCOL* DevicePathProtocol;
+ EFI_DEVICE_PATH* DevicePath;
+ EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileProtocol;
+ EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbProtocol;
// List all the BlockIo Protocols
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiBlockIoProtocolGuid,
NULL, &HandleCount, &HandleBuffer);
@@ -549,7 +552,35 @@
}
for (Index = 0; Index < HandleCount; Index++) {
- // We only select the handle WITH a Device Path AND not part of Media (to
avoid duplication with HardDisk, CDROM, etc)
+ // We only select handles WITH a Device Path AND not part of Media (to
+ // avoid duplication with HardDisk, CDROM, etc). Skip handles used by
+ // Simple Filesystem or used for Variable Storage.
+
+
+ Status = gBS->HandleProtocol (HandleBuffer[Index],
+ &gEfiSimpleFileSystemProtocolGuid,
+ (VOID *)&FileProtocol);
+ if (!EFI_ERROR(Status)) {
+ // SimpleFilesystem supported on this handle, skip
+ continue;
+ }
+
+ Status = gBS->HandleProtocol (HandleBuffer[Index],
+ &gEfiFirmwareVolumeBlockProtocolGuid,
+ (VOID *)&FvbProtocol);
+ if (!EFI_ERROR(Status)) {
+ // Firmware Volme Block / Variable storage supported on this handle, skip
+ continue;
+ }
+
+ Status = gBS->HandleProtocol (HandleBuffer[Index],
+ &gEfiFirmwareVolumeBlock2ProtocolGuid,
+ (VOID *)&FvbProtocol);
+ if (!EFI_ERROR(Status)) {
+ // Firmware Volme Block / Variable storage supported on this handle, skip
+ continue;
+ }
+
Status = gBS->HandleProtocol (HandleBuffer[Index],
&gEfiDevicePathProtocolGuid, (VOID **)&DevicePathProtocol);
if (!EFI_ERROR(Status)) {
// BlockIo is not part of Media Device Path
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits