From fce67685cc278da736f10e7721fddc91cbdac471 Mon Sep 17 00:00:00 2001 From: vprabhal Date: Wed, 14 Mar 2007 23:43:34 +0000 Subject: 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@2467 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Library/EdkFvbServiceLib/Ipf/Fvb.c | 40 ++++++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/EdkModulePkg/Library/EdkFvbServiceLib/Ipf/Fvb.c b/EdkModulePkg/Library/EdkFvbServiceLib/Ipf/Fvb.c index 2436303483..fe596e6a36 100644 --- a/EdkModulePkg/Library/EdkFvbServiceLib/Ipf/Fvb.c +++ b/EdkModulePkg/Library/EdkFvbServiceLib/Ipf/Fvb.c @@ -82,7 +82,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService (&Guid, Read, Instance, Lba, Offset, (UINT64) NumBytes, (UINT64) Buffer, 0, 0).Status; } @@ -115,7 +118,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService (&Guid, Write, Instance, Lba, Offset, (UINT64) NumBytes, (UINT64) Buffer, 0, 0).Status; } @@ -139,7 +145,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService (&Guid, EraseBlock, Instance, Lba, 0, 0, 0, 0, 0).Status; } @@ -165,7 +174,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService (&Guid, SetVolumeAttributes, Instance, (UINT64) Attributes, 0, 0, 0, 0, 0).Status; } @@ -194,7 +206,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService (&Guid, SetVolumeAttributes, Instance, (UINT64) Attributes, 0, 0, 0, 0, 0).Status; } @@ -221,7 +236,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService (&Guid, GetPhysicalAddress, Instance, (UINT64) BaseAddress, 0, 0, 0, 0, 0).Status; } @@ -255,7 +273,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService ( &Guid, @@ -296,7 +317,10 @@ Returns: --*/ { - EFI_GUID Guid = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID; + EFI_GUID Guid; + + *((UINT64 *) &Guid) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO; + *(((UINT64 *)&Guid) + 1) = EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI; return EfiCallEsalService ( &Guid, -- cgit v1.2.3