]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c
BaseTools/BinToPcd: Fix Python 2.7.x compatibility issue
[mirror_edk2.git] / ArmPkg / Drivers / ArmCrashDumpDxe / ArmCrashDumpDxe.c
1 /** @file
2
3 Copyright (c) 2017, Linaro, Ltd. All rights reserved.<BR>
4
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include <PiDxe.h>
16 #include <Library/DebugLib.h>
17 #include <Library/DefaultExceptionHandlerLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
19 #include <Protocol/Cpu.h>
20
21 STATIC EFI_CPU_ARCH_PROTOCOL *mCpu;
22
23 EFI_STATUS
24 EFIAPI
25 ArmCrashDumpDxeInitialize (
26 IN EFI_HANDLE ImageHandle,
27 IN EFI_SYSTEM_TABLE *SystemTable
28 )
29 {
30 EFI_STATUS Status;
31
32 Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&mCpu);
33 ASSERT_EFI_ERROR(Status);
34
35 return mCpu->RegisterInterruptHandler (mCpu,
36 EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS,
37 &DefaultExceptionHandler);
38 }