Platforms/Hisilicon: remove MBR partition from SD boot path

Since SD card may be formated as GPT partition.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
diff --git a/Platforms/Hisilicon/HiKey/HiKey.dsc b/Platforms/Hisilicon/HiKey/HiKey.dsc
index 6abd9c8..79802a3 100644
--- a/Platforms/Hisilicon/HiKey/HiKey.dsc
+++ b/Platforms/Hisilicon/HiKey/HiKey.dsc
@@ -359,7 +359,7 @@
   # Android Loader

   #

   gEmbeddedTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00D023F70000000000)/eMMC(0x0)/Ctrl(0x0)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E,0x7000,0x20000)"

-  gEmbeddedTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00E023F70000000000)/SD(0x0)/HD(1,MBR,0x263000B1,0x3F,0x21FC0)"

+  gEmbeddedTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00E023F70000000000)/SD(0x0)"

 

   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|1

 

diff --git a/Platforms/Hisilicon/HiKey960/HiKey960.dsc b/Platforms/Hisilicon/HiKey960/HiKey960.dsc
index 16eacc0..8b07b1c 100644
--- a/Platforms/Hisilicon/HiKey960/HiKey960.dsc
+++ b/Platforms/Hisilicon/HiKey960/HiKey960.dsc
@@ -369,7 +369,7 @@
   # Android Loader

   #

   gEmbeddedTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0,0x3)/HD(7,GPT,D3340696-9B95-4C64-8DF6-E6D4548FBA41,0x12100,0x4000)"

-  gEmbeddedTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00F037FF0000000000)/SD(0x0)/HD(1,MBR,0x263000B1,0x3F,0x21FC0)"

+  gEmbeddedTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00F037FF0000000000)/SD(0x0)"

 

   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|1

 

diff --git a/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c b/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
index b1586a8..5c59846 100644
--- a/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
@@ -341,9 +341,6 @@
   CHAR16                              *BootPathStr;

   EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL  *EfiDevicePathFromTextProtocol;

   EFI_DEVICE_PATH                     *DevicePath;

-  EFI_DEVICE_PATH                     *FileDevicePath;

-  FILEPATH_DEVICE_PATH                *FilePath;

-  UINTN                                Size;

   EFI_BOOT_MANAGER_LOAD_OPTION         NewOption;

   EFI_BOOT_MANAGER_LOAD_OPTION        *BootOptions;

   UINTN                                BootOptionCount;

@@ -359,19 +356,6 @@
   DevicePath = (EFI_DEVICE_PATH *)EfiDevicePathFromTextProtocol->ConvertTextToDevicePath (BootPathStr);

   ASSERT (DevicePath != NULL);

 

-  Size = StrSize (SD_FILE_NAME);

-  FileDevicePath = AllocatePool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + END_DEVICE_PATH_LENGTH);

-  if (FileDevicePath != NULL) {

-    FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath;

-    FilePath->Header.Type    = MEDIA_DEVICE_PATH;

-    FilePath->Header.SubType = MEDIA_FILEPATH_DP;

-    CopyMem (&FilePath->PathName, SD_FILE_NAME, Size);

-    SetDevicePathNodeLength (&FilePath->Header, Size + SIZE_OF_FILEPATH_DEVICE_PATH);

-    SetDevicePathEndNode (NextDevicePathNode (&FilePath->Header));

-

-    DevicePath = AppendDevicePath (DevicePath, FileDevicePath);

-    FreePool (FileDevicePath);

-  }

   Status = EfiBootManagerInitializeLoadOption (

              &NewOption,

              LoadOptionNumberUnassigned,