diff --git a/mem_test/patches/mem_test_edk2.patch b/mem_test/patches/mem_test_edk2.patch index 720a11b..4d6ca81 100644 --- a/mem_test/patches/mem_test_edk2.patch +++ b/mem_test/patches/mem_test_edk2.patch @@ -3,56 +3,56 @@ index 9f27e83bb0..79e8c9f023 100644 --- a/BaseTools/Scripts/GccBase.lds +++ b/BaseTools/Scripts/GccBase.lds @@ -21,6 +21,7 @@ SECTIONS { - . = PECOFF_HEADER_SIZE; - - .text : ALIGN(CONSTANT(COMMONPAGESIZE)) { -+ _textbsa = .; - *(.text .text.* .stub .gnu.linkonce.t.*) - *(.rodata .rodata.* .gnu.linkonce.r.*) - *(.got .got.*) + . = PECOFF_HEADER_SIZE; + + .text : ALIGN(CONSTANT(COMMONPAGESIZE)) { ++ _textbsa = .; + *(.text .text.* .stub .gnu.linkonce.t.*) + *(.rodata .rodata.* .gnu.linkonce.r.*) + *(.got .got.*) diff --git a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c index 17e48443ac..a2b3adefdf 100644 --- a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c +++ b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c @@ -16,6 +16,9 @@ - #include - #include - -+EFI_SYSTEM_TABLE *mySystemTable; -+EFI_HANDLE myImageHandle; -+ - /** - UEFI entry point for an application that will in turn call the - ShellAppMain function which has parameters similar to a standard C + #include + #include + ++EFI_SYSTEM_TABLE *mySystemTable; ++EFI_HANDLE myImageHandle; ++ + /** + UEFI entry point for an application that will in turn call the + ShellAppMain function which has parameters similar to a standard C @@ -51,6 +54,9 @@ ShellCEntryLib ( - EfiShellParametersProtocol = NULL; - EfiShellInterface = NULL; - -+ mySystemTable = SystemTable; -+ myImageHandle = ImageHandle; -+ - Status = SystemTable->BootServices->OpenProtocol ( - ImageHandle, - &gEfiShellParametersProtocolGuid, + EfiShellParametersProtocol = NULL; + EfiShellInterface = NULL; + ++ mySystemTable = SystemTable; ++ myImageHandle = ImageHandle; ++ + Status = SystemTable->BootServices->OpenProtocol ( + ImageHandle, + &gEfiShellParametersProtocolGuid, diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc -index 557b0ec0f3..bccbed89b5 100644 +index 5303a68959..7ccbce272b 100644 --- a/ShellPkg/ShellPkg.dsc +++ b/ShellPkg/ShellPkg.dsc @@ -27,6 +27,9 @@ - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf -+ ValLib|ShellPkg/Application/sysarch-acs/val/ValLib.inf -+ PalLib|ShellPkg/Application/sysarch-acs/pal/uefi_acpi/PalLib.inf -+ LibCFlat|ShellPkg/Application/sysarch-acs/mem_test/LibCFlat.inf - !if $(TARGET) == RELEASE - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf - !else -@@ -102,6 +105,7 @@ - ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf - ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf - ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf -+ ShellPkg/Application/sysarch-acs/apps/uefi/Mem.inf - - ShellPkg/Application/Shell/Shell.inf { - + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf ++ ValLib|ShellPkg/Application/sysarch-acs/val/ValLib.inf ++ PalLib|ShellPkg/Application/sysarch-acs/pal/uefi_acpi/PalLib.inf ++ LibCFlat|ShellPkg/Application/sysarch-acs/mem_test/LibCFlat.inf + !if $(TARGET) == RELEASE + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + !else +@@ -97,6 +100,7 @@ + ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf + ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf + ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf ++ ShellPkg/Application/sysarch-acs/apps/uefi/Mem.inf + + ShellPkg/Application/Shell/Shell.inf { +