Samer,

Was your code not asserted at below if BDS ARCH PROTOCOL not installed?

  //
  // Assert if the Architectural Protocols are not present.
  //
  Status = CoreAllEfiServicesAvailable ();
  if (EFI_ERROR(Status)) {
    //
// Report Status code that some Architectural Protocols are not present.
    //
    REPORT_STATUS_CODE (
      EFI_ERROR_CODE | EFI_ERROR_MAJOR,
      (EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_EC_NO_ARCH)
      );
  }
*  ASSERT_EFI_ERROR (Status);*


Thanks,
Star

On 2016/3/4 9:43, Samer El-Haj-Mahmoud wrote:
Add a DEBUG message and ASSERT if gBds is NULL before entering BDS. This
helps in debugging issues with EFI_BDS_ARC_PROTOCOL not getting
installed because of bad dependencies.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com>
---
  MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c 
b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 0a34711..b08871f 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -2,6 +2,7 @@
    DXE Core Main Entry Point

  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD 
License
  which accompanies this distribution.  The full text of the license may be 
found at
@@ -508,6 +509,12 @@ DxeMain (
    //
    // Transfer control to the BDS Architectural Protocol
    //
+
+  if ((gBds == NULL) || (gBds->Entry == NULL)) {
+    DEBUG((DEBUG_ERROR, "EFI_BDS_ARCH_PROTOCOL was not installed.\n"));
+    ASSERT (FALSE);
+  }
+
    gBds->Entry (gBds);

    //


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to