1 /** @file
2   X64 arch definition for CPU Exception Handler Library.
3 
4   Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
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 #ifndef _ARCH_CPU_INTERRUPT_DEFS_H_
16 #define _ARCH_CPU_INTERRUPT_DEFS_H_
17 
18 typedef struct {
19   EFI_SYSTEM_CONTEXT_X64  SystemContext;
20   BOOLEAN                 ExceptionDataFlag;
21   UINTN                   OldIdtHandler;
22 } EXCEPTION_HANDLER_CONTEXT;
23 
24 //
25 // Register Structure Definitions
26 //
27 typedef struct {
28   EFI_STATUS_CODE_DATA      Header;
29   EFI_SYSTEM_CONTEXT_X64    SystemContext;
30 } CPU_STATUS_CODE_TEMPLATE;
31 
32 typedef struct {
33   SPIN_LOCK   SpinLock;
34   UINT32      ApicId;
35   UINT32      Attribute;
36   UINTN       ExceptonHandler;
37   UINTN       OldSs;
38   UINTN       OldSp;
39   UINTN       OldFlags;
40   UINTN       OldCs;
41   UINTN       OldIp;
42   UINTN       ExceptionData;
43   UINT8       HookAfterStubHeaderCode[HOOKAFTER_STUB_SIZE];
44 } RESERVED_VECTORS_DATA;
45 
46 #endif
47