Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/CapsulePei/X64
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c
r48674 r58459 2 2 The X64 entrypoint is used to process capsule in long mode. 3 3 4 Copyright (c) 2011 , Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 14 14 15 15 #include <Library/DebugLib.h> 16 #include <Library/BaseMemoryLib.h> 17 #include <Library/CpuExceptionHandlerLib.h> 18 #include <Library/DebugAgentLib.h> 16 19 #include "CommonHeader.h" 20 21 #define EXCEPTION_VECTOR_NUMBER 0x22 17 22 18 23 /** … … 33 38 ) 34 39 { 35 EFI_STATUS Status; 40 EFI_STATUS Status; 41 IA32_DESCRIPTOR Ia32Idtr; 42 IA32_DESCRIPTOR X64Idtr; 43 IA32_IDT_GATE_DESCRIPTOR IdtEntryTable[EXCEPTION_VECTOR_NUMBER]; 44 45 // 46 // Save the IA32 IDT Descriptor 47 // 48 AsmReadIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr); 49 50 // 51 // Setup X64 IDT table 52 // 53 ZeroMem (IdtEntryTable, sizeof (IA32_IDT_GATE_DESCRIPTOR) * EXCEPTION_VECTOR_NUMBER); 54 X64Idtr.Base = (UINTN) IdtEntryTable; 55 X64Idtr.Limit = (UINT16) (sizeof (IA32_IDT_GATE_DESCRIPTOR) * EXCEPTION_VECTOR_NUMBER - 1); 56 AsmWriteIdtr ((IA32_DESCRIPTOR *) &X64Idtr); 57 58 // 59 // Setup the default CPU exception handlers 60 // 61 Status = InitializeCpuExceptionHandlers (NULL); 62 ASSERT_EFI_ERROR (Status); 63 64 // 65 // Initialize Debug Agent to support source level debug 66 // 67 InitializeDebugAgent (DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64, (VOID *) &Ia32Idtr, NULL); 36 68 37 69 // … … 47 79 ReturnContext->ReturnStatus = Status; 48 80 81 // 82 // Disable interrupt of Debug timer, since the new IDT table cannot work in long mode 83 // 84 SaveAndSetDebugTimerInterrupt (FALSE); 85 // 86 // Restore IA32 IDT table 87 // 88 AsmWriteIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr); 89 49 90 // 50 91 // Finish to coalesce capsule, and return to 32-bit mode.
Note:
See TracChangeset
for help on using the changeset viewer.