]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/Processor.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / Ipf / Processor.c
1 /*++
2
3 Copyright (c) 2004, 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 "PeiHob.h"
23 #include EFI_GUID_DEFINITION (PeiFlushInstructionCache)
24 #include EFI_GUID_DEFINITION (PeiTransferControl)
25
26 EFI_STATUS
27 WinNtFlushInstructionCacheFlush (
28 IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,
29 IN EFI_PHYSICAL_ADDRESS Start,
30 IN UINT64 Length
31 );
32
33 EFI_PEI_TRANSFER_CONTROL_PROTOCOL mTransferControl = {
34 (EFI_PEI_TRANSFER_CONTROL_SET_JUMP) SetJump,
35 (EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) LongJump,
36 sizeof (EFI_JUMP_BUFFER)
37 };
38
39 EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL mFlushInstructionCache = {
40 WinNtFlushInstructionCacheFlush
41 };
42
43 EFI_STATUS
44 InstallEfiPeiTransferControl (
45 IN OUT EFI_PEI_TRANSFER_CONTROL_PROTOCOL **This
46 )
47 /*++
48
49 Routine Description:
50
51 Installs the pointer to the transfer control mechanism
52
53 Arguments:
54
55 This - Pointer to transfer control mechanism.
56
57 Returns:
58
59 EFI_SUCCESS - Successfully installed.
60
61 --*/
62 {
63 *This = &mTransferControl;
64 return EFI_SUCCESS;
65 }
66
67 EFI_STATUS
68 InstallEfiPeiFlushInstructionCache (
69 IN OUT EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL **This
70 )
71 /*++
72
73 Routine Description:
74
75 Installs the pointer to the flush instruction cache mechanism
76
77 Arguments:
78
79 This - Pointer to flush instruction cache mechanism.
80
81 Returns:
82
83 EFI_SUCCESS - Successfully installed
84
85 --*/
86 {
87 *This = &mFlushInstructionCache;
88 return EFI_SUCCESS;
89 }
90
91 EFI_STATUS
92 WinNtFlushInstructionCacheFlush (
93 IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,
94 IN EFI_PHYSICAL_ADDRESS Start,
95 IN UINT64 Length
96 )
97 /*++
98
99 Routine Description:
100
101 This routine would provide support for flushing the CPU instruction cache.
102
103 Arguments:
104
105 This - Pointer to CPU Architectural Protocol interface
106 Start - Start adddress in memory to flush
107 Length - Length of memory to flush
108
109 Returns:
110
111 Status
112 EFI_SUCCESS
113
114 --*/
115 {
116 RtPioICacheFlush ((UINT8 *) Start, (UINTN) Length);
117 return EFI_SUCCESS;
118 }