3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 #include <FrameworkDxe.h>
23 #include <Protocol/Cpu.h>
24 #include <Protocol/Legacy8259.h>
26 #include <Protocol/LegacyBios.h>
29 #include <Library/BaseLib.h>
30 #include <Library/BaseMemoryLib.h>
31 #include <Library/DebugLib.h>
32 #include <Library/PrintLib.h>
33 #include <Library/UefiBootServicesTableLib.h>
35 #define CPU_EXCEPTION_DEBUG_OUTPUT 1
36 #define CPU_EXCEPTION_VGA_SWITCH 0
38 #define INTERRUPT_VECTOR_NUMBER 0x100
43 //#define LEFT_JUSTIFY 0x01
44 #define PREFIX_SIGN 0x02
45 #define PREFIX_BLANK 0x04
46 //#define COMMA_TYPE 0x08
47 #define LONG_TYPE 0x10
48 //#define PREFIX_ZERO 0x20
49 #define OUTPUT_UNICODE 0x40
50 //#define RADIX_HEX 0x80
51 #define FORMAT_UNICODE 0x100
52 #define PAD_TO_WIDTH 0x200
53 #define ARGUMENT_UNICODE 0x400
54 #define PRECISION 0x800
55 #define ARGUMENT_REVERSED 0x1000
58 // Function declarations
63 IN EFI_HANDLE ImageHandle
,
64 IN EFI_SYSTEM_TABLE
*SystemTable
69 CpuFlushCpuDataCache (
70 IN EFI_CPU_ARCH_PROTOCOL
*This
,
71 IN EFI_PHYSICAL_ADDRESS Start
,
73 IN EFI_CPU_FLUSH_TYPE FlushType
79 IN EFI_CPU_ARCH_PROTOCOL
*This
85 IN EFI_CPU_ARCH_PROTOCOL
*This
90 CpuGetInterruptState (
91 IN EFI_CPU_ARCH_PROTOCOL
*This
,
98 IN EFI_CPU_ARCH_PROTOCOL
*This
,
99 IN EFI_CPU_INIT_TYPE InitType
104 CpuRegisterInterruptHandler (
105 IN EFI_CPU_ARCH_PROTOCOL
*This
,
106 IN EFI_EXCEPTION_TYPE InterruptType
,
107 IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
113 IN EFI_CPU_ARCH_PROTOCOL
*This
,
114 IN UINT32 TimerIndex
,
115 OUT UINT64
*TimerValue
,
116 OUT UINT64
*TimerPeriod OPTIONAL
121 CpuSetMemoryAttributes(
122 IN EFI_CPU_ARCH_PROTOCOL
*This
,
123 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
129 InstallInterruptHandler (
131 VOID (*Handler
)(VOID
)
135 SystemExceptionHandler (