]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/Processor.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / X64 / Processor.c
1 /*++
2
3 Copyright (c) 2005 - 2008, Intel Corporation. All rights reserved.<BR>
4 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
8
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.
11
12
13 Module Name:
14
15 Processor.c
16
17 Abstract:
18
19 --*/
20
21 #include "Tiano.h"
22 #include "EfiJump.h"
23 #include EFI_GUID_DEFINITION (PeiFlushInstructionCache)
24 #include EFI_GUID_DEFINITION (PeiTransferControl)
25
26 //
27 // Prototypes
28 //
29 EFI_STATUS
30 EFIAPI
31 TransferControlSetJump (
32 IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,
33 IN VOID *Jump
34 );
35
36 EFI_STATUS
37 EFIAPI
38 TransferControlLongJump (
39 IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,
40 IN VOID *Jump
41 );
42
43 EFI_STATUS
44 EFIAPI
45 FlushInstructionCacheFlush (
46 IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,
47 IN EFI_PHYSICAL_ADDRESS Start,
48 IN UINT64 Length
49 );
50
51 //
52 // Table declarations
53 //
54 EFI_PEI_TRANSFER_CONTROL_PROTOCOL mTransferControl = {
55 TransferControlSetJump,
56 TransferControlLongJump,
57 sizeof (EFI_JUMP_BUFFER)
58 };
59
60 EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL mFlushInstructionCache = {
61 FlushInstructionCacheFlush
62 };
63
64
65 EFI_STATUS
66 EFIAPI
67 InstallEfiPeiTransferControl(
68 IN OUT EFI_PEI_TRANSFER_CONTROL_PROTOCOL **This
69 )
70 /*++
71
72 Routine Description:
73
74 Installs the pointer to the transfer control mechanism
75
76 Arguments:
77
78 This - Pointer to transfer control mechanism.
79
80 Returns:
81
82 This - Pointer to transfer control mechanism.
83
84 --*/
85 {
86 *This = &mTransferControl;
87 mTransferControl.SetJump = TransferControlSetJump;
88 mTransferControl.LongJump = TransferControlLongJump;
89 return EFI_SUCCESS;
90 }
91
92
93 EFI_STATUS
94 EFIAPI
95 InstallEfiPeiFlushInstructionCache (
96 IN OUT EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL **This
97 )
98 /*++
99
100 Routine Description:
101
102 Installs the pointer to the flush instruction cache mechanism
103
104 Arguments:
105
106 This - Pointer to flush instruction cache mechanism.
107
108 Returns:
109
110 This - Pointer to flush instruction cache mechanism.
111
112 --*/
113 {
114 *This = &mFlushInstructionCache;
115 mFlushInstructionCache.Flush = FlushInstructionCacheFlush;
116 return EFI_SUCCESS;
117 }
118
119
120 EFI_STATUS
121 EFIAPI
122 FlushInstructionCacheFlush (
123 IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,
124 IN EFI_PHYSICAL_ADDRESS Start,
125 IN UINT64 Length
126 )
127 /*++
128
129 Routine Description:
130
131 This routine would provide support for flushing the CPU instruction cache.
132 In the case of IA32, this flushing is not necessary and is thus not implemented.
133
134 Arguments:
135
136 Pointer to CPU Architectural Protocol interface
137 Start adddress in memory to flush
138 Length of memory to flush
139
140 Returns:
141
142 Status
143 EFI_SUCCESS
144
145 --*/
146 {
147 return EFI_SUCCESS;
148 }
149