]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
4ea9375a HT |
3 | Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
3eb9473e | 5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | Processor.c\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | --*/\r | |
19 | \r | |
20 | #include "Tiano.h"\r | |
21 | #include "EfiJump.h"\r | |
22 | #include "PeiHob.h"\r | |
23 | #include EFI_GUID_DEFINITION (PeiFlushInstructionCache)\r | |
24 | #include EFI_GUID_DEFINITION (PeiTransferControl)\r | |
25 | \r | |
26 | EFI_STATUS\r | |
27 | WinNtFlushInstructionCacheFlush (\r | |
28 | IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,\r | |
29 | IN EFI_PHYSICAL_ADDRESS Start,\r | |
30 | IN UINT64 Length\r | |
31 | );\r | |
32 | \r | |
33 | EFI_PEI_TRANSFER_CONTROL_PROTOCOL mTransferControl = {\r | |
89f04816 | 34 | (EFI_PEI_TRANSFER_CONTROL_SET_JUMP) SetJump,\r |
35 | (EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) LongJump,\r | |
3eb9473e | 36 | sizeof (EFI_JUMP_BUFFER)\r |
37 | };\r | |
38 | \r | |
39 | EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL mFlushInstructionCache = {\r | |
40 | WinNtFlushInstructionCacheFlush\r | |
41 | };\r | |
42 | \r | |
43 | EFI_STATUS\r | |
44 | InstallEfiPeiTransferControl (\r | |
45 | IN OUT EFI_PEI_TRANSFER_CONTROL_PROTOCOL **This\r | |
46 | )\r | |
47 | /*++\r | |
48 | \r | |
49 | Routine Description:\r | |
50 | \r | |
51 | Installs the pointer to the transfer control mechanism\r | |
52 | \r | |
53 | Arguments:\r | |
54 | \r | |
55 | This - Pointer to transfer control mechanism.\r | |
56 | \r | |
57 | Returns:\r | |
58 | \r | |
59 | EFI_SUCCESS - Successfully installed.\r | |
60 | \r | |
61 | --*/\r | |
62 | {\r | |
63 | *This = &mTransferControl;\r | |
64 | return EFI_SUCCESS;\r | |
65 | }\r | |
66 | \r | |
67 | EFI_STATUS\r | |
68 | InstallEfiPeiFlushInstructionCache (\r | |
69 | IN OUT EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL **This\r | |
70 | )\r | |
71 | /*++\r | |
72 | \r | |
73 | Routine Description:\r | |
74 | \r | |
75 | Installs the pointer to the flush instruction cache mechanism\r | |
76 | \r | |
77 | Arguments:\r | |
78 | \r | |
79 | This - Pointer to flush instruction cache mechanism.\r | |
80 | \r | |
81 | Returns:\r | |
82 | \r | |
83 | EFI_SUCCESS - Successfully installed\r | |
84 | \r | |
85 | --*/\r | |
86 | {\r | |
87 | *This = &mFlushInstructionCache;\r | |
88 | return EFI_SUCCESS;\r | |
89 | }\r | |
90 | \r | |
91 | EFI_STATUS\r | |
92 | WinNtFlushInstructionCacheFlush (\r | |
93 | IN EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL *This,\r | |
94 | IN EFI_PHYSICAL_ADDRESS Start,\r | |
95 | IN UINT64 Length\r | |
96 | )\r | |
97 | /*++\r | |
98 | \r | |
99 | Routine Description:\r | |
100 | \r | |
101 | This routine would provide support for flushing the CPU instruction cache.\r | |
102 | \r | |
103 | Arguments:\r | |
104 | \r | |
105 | This - Pointer to CPU Architectural Protocol interface\r | |
106 | Start - Start adddress in memory to flush\r | |
107 | Length - Length of memory to flush\r | |
108 | \r | |
109 | Returns:\r | |
110 | \r | |
111 | Status\r | |
112 | EFI_SUCCESS\r | |
113 | \r | |
114 | --*/\r | |
115 | {\r | |
116 | RtPioICacheFlush ((UINT8 *) Start, (UINTN) Length);\r | |
117 | return EFI_SUCCESS;\r | |
118 | }\r |