]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchInterruptDefs.h
UefiCpuPkg CpuExceptionHandlerLib: use FixedPcdGetSize() as the macro value
[mirror_edk2.git] / UefiCpuPkg / Library / CpuExceptionHandlerLib / Ia32 / ArchInterruptDefs.h
1 /** @file
2 Ia32 arch definition for CPU Exception Handler Library.
3
4 Copyright (c) 2013 - 2018, 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_IA32 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_IA32 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 OldFlags;
38 UINTN OldCs;
39 UINTN OldIp;
40 UINTN ExceptionData;
41 UINT8 HookAfterStubHeaderCode[HOOKAFTER_STUB_SIZE];
42 } RESERVED_VECTORS_DATA;
43
44 #define CPU_TSS_DESC_SIZE \
45 (sizeof (IA32_TSS_DESCRIPTOR) * \
46 (FixedPcdGetSize (PcdCpuStackSwitchExceptionList) + 1))
47
48 #define CPU_TSS_SIZE \
49 (sizeof (IA32_TASK_STATE_SEGMENT) * \
50 (FixedPcdGetSize (PcdCpuStackSwitchExceptionList) + 1))
51
52 #endif