]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/Processor.c
Maintainers.txt: Remove EdkCompatibilityPkg information
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / X64 / Processor.c
CommitLineData
3eb9473e 1/*++\r
2\r
3e99020d 3Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
4ea9375a 4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 Processor.c\r
16\r
17Abstract:\r
18\r
19--*/\r
20\r
21#include "Tiano.h"\r
22#include "EfiJump.h"\r
23#include EFI_GUID_DEFINITION (PeiFlushInstructionCache)\r
24#include EFI_GUID_DEFINITION (PeiTransferControl)\r
25\r
26//\r
27// Prototypes\r
28//\r
29EFI_STATUS\r
30EFIAPI\r
31TransferControlSetJump (\r
32 IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r
4b79797e 33 IN VOID *Jump\r
3eb9473e 34 );\r
35\r
36EFI_STATUS\r
37EFIAPI\r
38TransferControlLongJump (\r
39 IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r
4b79797e 40 IN VOID *Jump\r
3eb9473e 41 );\r
42\r
43EFI_STATUS\r
44EFIAPI\r
45FlushInstructionCacheFlush (\r
46 IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,\r
47 IN EFI_PHYSICAL_ADDRESS Start,\r
48 IN UINT64 Length\r
49 );\r
50\r
51//\r
52// Table declarations\r
53//\r
54EFI_PEI_TRANSFER_CONTROL_PROTOCOL mTransferControl = {\r
55 TransferControlSetJump,\r
56 TransferControlLongJump,\r
57 sizeof (EFI_JUMP_BUFFER)\r
58};\r
59\r
60EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL mFlushInstructionCache = {\r
61 FlushInstructionCacheFlush\r
62};\r
63\r
64\r
65EFI_STATUS\r
66EFIAPI\r
67InstallEfiPeiTransferControl(\r
68 IN OUT EFI_PEI_TRANSFER_CONTROL_PROTOCOL **This\r
69 )\r
70/*++\r
71\r
72Routine Description:\r
73\r
74 Installs the pointer to the transfer control mechanism\r
75\r
76Arguments:\r
77\r
78 This - Pointer to transfer control mechanism.\r
79\r
80Returns:\r
81\r
82 This - Pointer to transfer control mechanism.\r
83\r
84--*/\r
85{\r
86 *This = &mTransferControl;\r
3eb9473e 87 return EFI_SUCCESS;\r
88}\r
89\r
90\r
91EFI_STATUS\r
92EFIAPI\r
93InstallEfiPeiFlushInstructionCache (\r
94 IN OUT EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL **This\r
95 )\r
96/*++\r
97\r
98Routine Description:\r
99\r
100 Installs the pointer to the flush instruction cache mechanism\r
101\r
102Arguments:\r
103\r
104 This - Pointer to flush instruction cache mechanism.\r
105\r
106Returns:\r
107\r
108 This - Pointer to flush instruction cache mechanism.\r
109\r
110--*/\r
111{\r
112 *This = &mFlushInstructionCache;\r
3eb9473e 113 return EFI_SUCCESS;\r
114}\r
115\r
116\r
117EFI_STATUS\r
118EFIAPI\r
119FlushInstructionCacheFlush (\r
120 IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,\r
121 IN EFI_PHYSICAL_ADDRESS Start,\r
122 IN UINT64 Length\r
123 )\r
124/*++\r
125\r
126Routine Description:\r
127\r
128 This routine would provide support for flushing the CPU instruction cache.\r
129 In the case of IA32, this flushing is not necessary and is thus not implemented.\r
130\r
131Arguments:\r
132\r
133 Pointer to CPU Architectural Protocol interface\r
134 Start adddress in memory to flush\r
135 Length of memory to flush\r
136\r
137Returns:\r
138\r
139 Status\r
140 EFI_SUCCESS\r
141\r
142--*/\r
143{\r
144 return EFI_SUCCESS;\r
145}\r
146\r