]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | //++\r |
2 | // Copyright (c) 2006, Intel Corporation \r | |
3 | // All rights reserved. This program and the accompanying materials \r | |
4 | // are licensed and made available under the terms and conditions of the BSD License \r | |
5 | // which accompanies this distribution. The full text of the license may be found at \r | |
6 | // http://opensource.org/licenses/bsd-license.php \r | |
7 | // \r | |
8 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
9 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
10 | // \r | |
11 | // Module Name:\r | |
12 | //\r | |
13 | // EsalLib.s\r | |
14 | //\r | |
15 | // Abstract:\r | |
16 | //\r | |
17 | //\r | |
18 | // Revision History:\r | |
19 | //\r | |
20 | //--\r | |
21 | \r | |
22 | .file "EsalLib.s"\r | |
23 | \r | |
24 | #include "IpfMacro.i"\r | |
25 | \r | |
26 | //\r | |
27 | // Exports\r | |
28 | //\r | |
1cb5cfc1 | 29 | .globl GetEsalEntryPoint\r |
878ddf1f | 30 | \r |
31 | \r | |
32 | //-----------------------------------------------------------------------------\r | |
33 | //++\r | |
34 | // GetEsalEntryPoint\r | |
35 | //\r | |
36 | // Return Esal global and PSR register.\r | |
37 | //\r | |
38 | // On Entry :\r | |
39 | //\r | |
40 | //\r | |
41 | // Return Value:\r | |
42 | // r8 = EFI_SAL_SUCCESS\r | |
43 | // r9 = Physical Plabel\r | |
44 | // r10 = Virtual Plabel\r | |
45 | // r11 = psr\r | |
46 | // \r | |
47 | // As per static calling conventions. \r | |
48 | // \r | |
49 | //--\r | |
50 | //---------------------------------------------------------------------------\r | |
51 | PROCEDURE_ENTRY (GetEsalEntryPoint)\r | |
52 | \r | |
53 | NESTED_SETUP (0,8,0,0)\r | |
54 | \r | |
55 | EsalCalcStart:\r | |
56 | mov r8 = ip;;\r | |
57 | add r8 = (EsalEntryPoint - EsalCalcStart), r8;;\r | |
58 | mov r9 = r8;;\r | |
59 | add r10 = 0x10, r8;;\r | |
60 | mov r11 = psr;;\r | |
61 | mov r8 = r0;;\r | |
62 | \r | |
63 | NESTED_RETURN\r | |
64 | \r | |
65 | PROCEDURE_EXIT (GetEsalEntryPoint)\r | |
66 | \r | |
67 | \r | |
68 | \r | |
69 | \r | |
70 | \r | |
71 | //-----------------------------------------------------------------------------\r | |
72 | //++\r | |
73 | // SetEsalPhysicalEntryPoint\r | |
74 | //\r | |
75 | // Set the dispatcher entry point\r | |
76 | //\r | |
77 | // On Entry:\r | |
78 | // in0 = Physical address of Esal Dispatcher\r | |
79 | // in1 = Physical GP\r | |
80 | //\r | |
81 | // Return Value: \r | |
82 | // r8 = EFI_SAL_SUCCESS\r | |
83 | // \r | |
84 | // As per static calling conventions. \r | |
85 | // \r | |
86 | //--\r | |
87 | //---------------------------------------------------------------------------\r | |
88 | PROCEDURE_ENTRY (SetEsalPhysicalEntryPoint)\r | |
89 | \r | |
90 | NESTED_SETUP (2,8,0,0)\r | |
91 | \r | |
92 | EsalCalcStart1:\r | |
93 | mov r8 = ip;;\r | |
94 | add r8 = (EsalEntryPoint - EsalCalcStart1), r8;;\r | |
95 | st8 [r8] = in0;;\r | |
96 | add r8 = 0x08, r8;;\r | |
97 | st8 [r8] = in1;;\r | |
98 | mov r8 = r0;;\r | |
99 | \r | |
100 | NESTED_RETURN\r | |
101 | \r | |
102 | PROCEDURE_EXIT (SetEsalPhysicalEntryPoint)\r | |
103 | \r | |
104 | \r | |
105 | //-----------------------------------------------------------------------------\r | |
106 | //++\r | |
107 | // SetEsalVirtualEntryPoint\r | |
108 | //\r | |
109 | // Register physical address of Esal globals.\r | |
110 | //\r | |
111 | // On Entry :\r | |
112 | // in0 = Virtual address of Esal Dispatcher\r | |
113 | // in1 = Virtual GP\r | |
114 | //\r | |
115 | // Return Value: \r | |
116 | // r8 = EFI_SAL_ERROR\r | |
117 | // \r | |
118 | // As per static calling conventions. \r | |
119 | // \r | |
120 | //--\r | |
121 | //---------------------------------------------------------------------------\r | |
122 | PROCEDURE_ENTRY (SetEsalVirtualEntryPoint)\r | |
123 | \r | |
124 | NESTED_SETUP (2,8,0,0)\r | |
125 | \r | |
126 | EsalCalcStart2:\r | |
127 | mov r8 = ip;;\r | |
128 | add r8 = (EsalEntryPoint - EsalCalcStart2), r8;;\r | |
129 | add r8 = 0x10, r8;;\r | |
130 | st8 [r8] = in0;;\r | |
131 | add r8 = 0x08, r8;;\r | |
132 | st8 [r8] = in1;;\r | |
133 | mov r8 = r0;;\r | |
134 | \r | |
135 | NESTED_RETURN\r | |
136 | \r | |
137 | PROCEDURE_EXIT (SetEsalVirtualEntryPoint)\r | |
138 | \r | |
139 | \r | |
140 | \r | |
141 | \r | |
142 | .align 32\r | |
143 | EsalEntryPoint: \r | |
144 | data8 0 // Physical Entry\r | |
145 | data8 0 // GP\r | |
146 | data8 0 // Virtual Entry\r | |
147 | data8 0 // GP\r | |
148 | \r | |
149 | \r |