]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
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 | EfiJump.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | This is the Setjump/Longjump pair for an IA32 processor.\r | |
19 | \r | |
20 | --*/\r | |
21 | \r | |
22 | #ifndef _EFI_JUMP_H_\r | |
23 | #define _EFI_JUMP_H_\r | |
24 | \r | |
25 | #include EFI_GUID_DEFINITION (PeiTransferControl)\r | |
26 | \r | |
27 | //\r | |
28 | // NOTE:Set/LongJump needs to have this buffer start\r | |
29 | // at 16 byte boundary. Either fix the structure\r | |
30 | // which call this buffer or fix inside SetJump/LongJump\r | |
31 | // Choosing 1K buffer storage for now\r | |
32 | //\r | |
33 | typedef struct {\r | |
34 | CHAR8 Buffer[1024];\r | |
35 | } EFI_JUMP_BUFFER;\r | |
36 | \r | |
37 | EFI_STATUS\r | |
38 | SetJump (\r | |
39 | IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r | |
40 | IN EFI_JUMP_BUFFER *Jump\r | |
41 | )\r | |
42 | /*++\r | |
43 | \r | |
44 | Routine Description:\r | |
45 | \r | |
46 | SetJump stores the current register set in the area pointed to\r | |
47 | by "save". It returns zero. Subsequent calls to "LongJump" will\r | |
48 | restore the registers and return non-zero to the same location.\r | |
49 | On entry, r32 contains the pointer to the jmp_buffer\r | |
50 | \r | |
51 | Arguments:\r | |
52 | \r | |
53 | This - Calling context\r | |
54 | Jump - Jump buffer\r | |
55 | \r | |
56 | Returns:\r | |
57 | \r | |
58 | Status code\r | |
59 | \r | |
60 | --*/\r | |
61 | ;\r | |
62 | \r | |
63 | EFI_STATUS\r | |
64 | LongJump (\r | |
65 | IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r | |
66 | IN EFI_JUMP_BUFFER *Jump\r | |
67 | )\r | |
68 | /*++\r | |
69 | \r | |
70 | Routine Description:\r | |
71 | \r | |
72 | LongJump initializes the register set to the values saved by a\r | |
73 | previous 'SetJump' and jumps to the return location saved by that\r | |
74 | 'SetJump'. This has the effect of unwinding the stack and returning\r | |
75 | for a second time to the 'SetJump'.\r | |
76 | \r | |
77 | Arguments:\r | |
78 | \r | |
79 | This - Calling context\r | |
80 | Jump - Jump buffer\r | |
81 | \r | |
82 | Returns:\r | |
83 | \r | |
84 | Status code\r | |
85 | \r | |
86 | --*/\r | |
87 | ;\r | |
88 | \r | |
89 | VOID\r | |
90 | RtPioICacheFlush (\r | |
91 | IN VOID *StartAddress,\r | |
92 | IN UINTN SizeInBytes\r | |
93 | )\r | |
94 | /*++\r | |
95 | \r | |
96 | Routine Description:\r | |
97 | \r | |
98 | Flushing the CPU instruction cache.\r | |
99 | \r | |
100 | Arguments:\r | |
101 | \r | |
102 | StartAddress - Start address to flush\r | |
103 | SizeInBytes - Length in bytes to flush\r | |
104 | \r | |
105 | Returns:\r | |
106 | \r | |
107 | None\r | |
108 | \r | |
109 | --*/\r | |
110 | ;\r | |
111 | \r | |
112 | #endif\r |