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