From aa156393bf28ce3c44d84b773e398070d1f4fe79 Mon Sep 17 00:00:00 2001 From: vprabhal Date: Wed, 14 Mar 2007 23:45:03 +0000 Subject: [PATCH] changed the guid assignment from constant array to hi and low UINT64s (Intel compiler was using a global variable to assign an array which is not OK at run time) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2469 6f19259b-4bc3-4df7-8a09-765794883524 --- .../EdkUefiRuntimeLib/Ipf/RuntimeService.c | 50 +++++++++++++++---- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c index b4a56a23b3..0760bfa074 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeService.c @@ -45,7 +45,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_RESET_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_RESET_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_RESET_SERVICES_PROTOCOL_GUID_HI; EfiCallEsalService ( &Guid, @@ -91,7 +94,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService (&Guid, GetTime, (UINT64) Time, (UINT64) Capabilities, 0, 0, 0, 0, 0); return ReturnReg.Status; @@ -119,7 +125,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService (&Guid, SetTime, (UINT64) Time, 0, 0, 0, 0, 0, 0); return ReturnReg.Status; @@ -151,7 +160,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService (&Guid, GetWakeupTime, (UINT64) Enabled, (UINT64) Pending, (UINT64) Time, 0, 0, 0, 0); return ReturnReg.Status; @@ -182,7 +194,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_RTC_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService (&Guid, SetWakeupTime, (UINT64) Enable, (UINT64) Time, 0, 0, 0, 0, 0); return ReturnReg.Status; @@ -221,7 +236,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService ( &Guid, @@ -268,7 +286,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService ( &Guid, @@ -315,7 +336,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_VARIABLE_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService ( &Guid, @@ -353,7 +377,10 @@ Returns: --*/ { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_MTC_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_MTC_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_MTC_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService (&Guid, GetNextHighMonotonicCount, (UINT64) HighCount, 0, 0, 0, 0, 0, 0); return (EFI_STATUS) ReturnReg.Status; @@ -467,7 +494,10 @@ EfiSetVirtualAddressMap ( ) { SAL_RETURN_REGS ReturnReg; - EFI_GUID Guid = EFI_EXTENDED_SAL_VIRTUAL_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_VIRTUAL_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_VIRTUAL_SERVICES_PROTOCOL_GUID_HI; ReturnReg = EfiCallEsalService ( &Guid,