From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c | 32 ++++++++++++++ .../Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc | 50 ++++++++++++++++++++++ .../Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf | 34 +++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c create mode 100644 roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc create mode 100644 roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf (limited to 'roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe') diff --git a/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c b/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c new file mode 100644 index 000000000..137dd787e --- /dev/null +++ b/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c @@ -0,0 +1,32 @@ +/** @file + + Copyright (c) 2017, Linaro, Ltd. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include + +STATIC EFI_CPU_ARCH_PROTOCOL *mCpu; + +EFI_STATUS +EFIAPI +ArmCrashDumpDxeInitialize ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&mCpu); + ASSERT_EFI_ERROR(Status); + + return mCpu->RegisterInterruptHandler (mCpu, + EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS, + &DefaultExceptionHandler); +} diff --git a/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc b/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc new file mode 100644 index 000000000..2818ce65d --- /dev/null +++ b/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc @@ -0,0 +1,50 @@ +#/** @file +# +# Copyright (c) 2017, Linaro Ltd. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#**/ + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + PLATFORM_NAME = ArmCrashDumpDxe + PLATFORM_GUID = 8dc3c2f8-988e-4e32-8fb7-0df43f6d0d8a + PLATFORM_VERSION = 0.1 + DSC_SPECIFICATION = 0x00010019 + OUTPUT_DIRECTORY = Build/ArmCrashDumpDxe + SUPPORTED_ARCHITECTURES = AARCH64 + BUILD_TARGETS = DEBUG + SKUID_IDENTIFIER = DEFAULT + +[PcdsFixedAtBuild] + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x27 + +[LibraryClasses] + ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf + DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf + + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + +[Components.common] + ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf diff --git a/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf b/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf new file mode 100644 index 000000000..4dc92a1d6 --- /dev/null +++ b/roms/edk2/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf @@ -0,0 +1,34 @@ +#/** @file +# +# Copyright (c) 2017, Linaro, Ltd. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#**/ + +[Defines] + INF_VERSION = 0x00010018 + BASE_NAME = ArmCrashDumpDxe + FILE_GUID = 0bda00b0-05d6-4bb8-bfc7-058ad13615cf + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = ArmCrashDumpDxeInitialize + +[Sources] + ArmCrashDumpDxe.c + +[Packages] + ArmPkg/ArmPkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + DebugLib + DefaultExceptionHandlerLib + UefiBootServicesTableLib + UefiDriverEntryPoint + +[Protocols] + gEfiCpuArchProtocolGuid + +[Depex] + gEfiCpuArchProtocolGuid -- cgit 1.2.3-korg