/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module Name:\r
\r
EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService = NULL;\r
EFI_PLABEL mPlabel;\r
\r
+STATIC\r
EFI_STATUS\r
EFIAPI\r
DxeSalLibInitialize (\r
// virtual). So lets grap the physical PLABEL for the EsalEntryPoint and store it\r
// away. We cache it in a module global, so we can register the vitrual version.\r
//\r
- Status = gBS->LocateProtocol (&gEfiExtendedSalBootServiceProtocolGuid, NULL, &mEsalBootService);\r
+ Status = gBS->LocateProtocol (&gEfiExtendedSalBootServiceProtocolGuid, NULL, (VOID **) &mEsalBootService);\r
if (EFI_ERROR (Status)) {\r
mEsalBootService = NULL;\r
return EFI_SUCCESS;\r
return EFI_SUCCESS;\r
}\r
\r
-EFI_STATUS\r
-EFIAPI\r
-DxeSalLibConstructor (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- return DxeSalLibInitialize ();\r
-}\r
-\r
VOID\r
EFIAPI\r
DxeSalVirtualNotifyEvent (\r
Arguments:\r
\r
Event - The Event that is being processed\r
- \r
+\r
Context - Event Context\r
\r
-Returns: \r
+Returns:\r
\r
None\r
\r
--*/\r
{\r
- EfiConvertPointer (0x0, (VOID **) &mPlabel.EntryPoint);\r
- EfiConvertPointer (EFI_IPF_GP_POINTER, (VOID **) &mPlabel.GP);\r
+ UINT64 PhysicalEntryPoint;\r
+\r
+ PhysicalEntryPoint = mPlabel.EntryPoint;\r
+\r
+ EfiConvertPointer (0x0, (VOID **) &mPlabel.EntryPoint);\r
+ mPlabel.GP += mPlabel.EntryPoint - PhysicalEntryPoint;\r
\r
SetEsalVirtualEntryPoint (mPlabel.EntryPoint, mPlabel.GP);\r
}\r
\r
Arguments:\r
FunctionId - ID of function to register\r
- ClassGuid - GUID of function class \r
+ ClassGuid - GUID of function class\r
Function - Function to register under ClassGuid/FunctionId pair\r
ModuleGlobal - Module global for Function.\r
\r
-Returns: \r
+Returns:\r
EFI_SUCCESS - If ClassGuid/FunctionId Function was registered.\r
\r
--*/\r
This function is boot service only!\r
\r
Arguments:\r
- ClassGuid - GUID of function class \r
+ ClassGuid - GUID of function class\r
ModuleGlobal - Module global for Function.\r
- ... - SAL_INTERNAL_EXTENDED_SAL_PROC and FunctionId pairs. NULL \r
+ ... - SAL_INTERNAL_EXTENDED_SAL_PROC and FunctionId pairs. NULL\r
indicates the end of the list.\r
\r
-Returns: \r
+Returns:\r
EFI_SUCCESS - All members of ClassGuid registered\r
\r
--*/\r
\r
Routine Description:\r
\r
- Call module that is not linked direclty to this module. This code is IP \r
+ Call module that is not linked direclty to this module. This code is IP\r
relative and hides the binding issues of virtual or physical calling. The\r
function that gets dispatched has extra arguments that include the registered\r
module global and a boolean flag to indicate if the system is in virutal mode.\r
Arg7 - Argument 7 ClassGuid/FunctionId defined\r
Arg8 - Argument 8 ClassGuid/FunctionId defined\r
\r
-Returns: \r
+Returns:\r
Status of ClassGuid/FuncitonId\r
\r
--*/\r