Revision: 16482
          http://sourceforge.net/p/edk2/code/16482
Author:   vanjeff
Date:     2014-12-08 02:26:07 +0000 (Mon, 08 Dec 2014)
Log Message:
-----------
Properly support GCC - pass 'I' (int) rather than 'L' (long) to struct.unpack.

(Sync patches r16474 and r16475 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <[email protected]>
Reviewed-by: "Rangarajan, Ravi P" <[email protected]>
Reviewed-by: "Ma, Maurice" <[email protected]>
Reviewed-by: "Mudusuru, Giri P" <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/16474
    http://sourceforge.net/p/edk2/code/16475

Modified Paths:
--------------
    branches/UDK2014.SP1/IntelFspPkg/Include/FspApi.h
    
branches/UDK2014.SP1/IntelFspPkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
    branches/UDK2014.SP1/IntelFspPkg/Tools/GenCfgOpt.py
    branches/UDK2014.SP1/IntelFspWrapperPkg/Library/BaseFspApiLib/FspApiLib.c

Modified: branches/UDK2014.SP1/IntelFspPkg/Include/FspApi.h
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/Include/FspApi.h   2014-12-08 02:24:49 UTC 
(rev 16481)
+++ branches/UDK2014.SP1/IntelFspPkg/Include/FspApi.h   2014-12-08 02:26:07 UTC 
(rev 16482)
@@ -185,7 +185,7 @@
 **/
 typedef
 FSP_STATUS
-(FSPAPI *FSP_NOTFY_PHASE) (
+(FSPAPI *FSP_NOTIFY_PHASE) (
   IN NOTIFY_PHASE_PARAMS *NotifyPhaseParamPtr
   );
 

Modified: 
branches/UDK2014.SP1/IntelFspPkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
===================================================================
--- 
branches/UDK2014.SP1/IntelFspPkg/Library/BaseFspPlatformLib/FspPlatformNotify.c 
    2014-12-08 02:24:49 UTC (rev 16481)
+++ 
branches/UDK2014.SP1/IntelFspPkg/Library/BaseFspPlatformLib/FspPlatformNotify.c 
    2014-12-08 02:26:07 UTC (rev 16482)
@@ -38,7 +38,7 @@
 };
 
 
-UINT32  mFspNotfifySequence[] = {
+UINT32  mFspNotifySequence[] = {
   EnumInitPhaseAfterPciEnumeration,
   EnumInitPhaseReadyToBoot
 };
@@ -46,23 +46,23 @@
 /**
   Install FSP notification.
 
-  @param[in] NotificatonCode  FSP notification code
+  @param[in] NotificationCode  FSP notification code
 
   @retval EFI_SUCCESS            Notify FSP successfully
-  @retval EFI_INVALID_PARAMETER  NotificatonCode is invalid
+  @retval EFI_INVALID_PARAMETER  NotificationCode is invalid
 
 **/
 EFI_STATUS
 EFIAPI
 FspNotificationHandler (
-  IN  UINT32     NotificatonCode
+  IN  UINT32     NotificationCode
   )
 {
   EFI_STATUS                Status;
 
   Status   = EFI_SUCCESS;
 
-  switch (NotificatonCode) {
+  switch (NotificationCode) {
   case EnumInitPhaseAfterPciEnumeration:
     //
     // Do POST PCI initialization if needed
@@ -134,20 +134,20 @@
   )
 {
   EFI_STATUS                 Status;
-  UINT32                     NotificatonValue;
-  UINT32                     NotificatonCount;
+  UINT32                     NotificationValue;
+  UINT32                     NotificationCount;
   UINT8                      Count;
 
-  NotificatonCount = 0;
-  while (NotificatonCount < sizeof(mFspNotfifySequence) / sizeof(UINT32)) {
+  NotificationCount = 0;
+  while (NotificationCount < sizeof(mFspNotifySequence) / sizeof(UINT32)) {
 
-    Count = (UINT8)((NotificatonCount << 1) & 0x07);
+    Count = (UINT8)((NotificationCount << 1) & 0x07);
     SetFspMeasurePoint (FSP_PERF_ID_API_NOTIFY_POSTPCI_ENTRY + Count);
 
-    NotificatonValue = ((NOTIFY_PHASE_PARAMS *)(UINTN)GetFspApiParameter 
())->Phase;
-    DEBUG ((DEBUG_INFO, "FSP Got Notification. Notification Value : 0x%08X\n", 
NotificatonValue));
+    NotificationValue = ((NOTIFY_PHASE_PARAMS *)(UINTN)GetFspApiParameter 
())->Phase;
+    DEBUG ((DEBUG_INFO, "FSP Got Notification. Notification Value : 0x%08X\n", 
NotificationValue));
 
-    if (mFspNotfifySequence[NotificatonCount] != NotificatonValue) {
+    if (mFspNotifySequence[NotificationCount] != NotificationValue) {
       //
       // Notify code does not follow the predefined order
       //
@@ -156,12 +156,12 @@
       //
       // Process Notification and Give control back to the boot loader 
framework caller
       //
-      Status = FspNotificationHandler (NotificatonValue);
+      Status = FspNotificationHandler (NotificationValue);
       SetFspApiReturnStatus(Status);
       if (!EFI_ERROR(Status)) {
-        NotificatonCount++;
+        NotificationCount++;
         SetFspApiReturnStatus(EFI_SUCCESS);
-        if (NotificatonValue == EnumInitPhaseReadyToBoot) {
+        if (NotificationValue == EnumInitPhaseReadyToBoot) {
           break;
         }
       }

Modified: branches/UDK2014.SP1/IntelFspPkg/Tools/GenCfgOpt.py
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/Tools/GenCfgOpt.py 2014-12-08 02:24:49 UTC 
(rev 16481)
+++ branches/UDK2014.SP1/IntelFspPkg/Tools/GenCfgOpt.py 2014-12-08 02:26:07 UTC 
(rev 16482)
@@ -615,7 +615,7 @@
                 BinFd = open(BinFile, "rb")
                 IdStr    = BinFd.read(0x08)
                 ImageId  = struct.unpack('Q', IdStr)
-                ImageRev = struct.unpack('L', BinFd.read(0x04))
+                ImageRev = struct.unpack('I', BinFd.read(0x04))
                 BinFd.close()
 
                 HeaderFd.write("#define VPD_IMAGE_ID    0x%016X        /* '%s' 
*/\n" % (ImageId[0], IdStr))

Modified: 
branches/UDK2014.SP1/IntelFspWrapperPkg/Library/BaseFspApiLib/FspApiLib.c
===================================================================
--- branches/UDK2014.SP1/IntelFspWrapperPkg/Library/BaseFspApiLib/FspApiLib.c   
2014-12-08 02:24:49 UTC (rev 16481)
+++ branches/UDK2014.SP1/IntelFspWrapperPkg/Library/BaseFspApiLib/FspApiLib.c   
2014-12-08 02:26:07 UTC (rev 16482)
@@ -117,10 +117,10 @@
   IN NOTIFY_PHASE_PARAMS *NotifyPhaseParams
   )
 {
-  FSP_NOTFY_PHASE     NotifyPhaseApi;
+  FSP_NOTIFY_PHASE    NotifyPhaseApi;
   FSP_STATUS          FspStatus;
 
-  NotifyPhaseApi = (FSP_NOTFY_PHASE)(UINTN)(FspHeader->ImageBase + 
FspHeader->NotifyPhaseEntryOffset);
+  NotifyPhaseApi = (FSP_NOTIFY_PHASE)(UINTN)(FspHeader->ImageBase + 
FspHeader->NotifyPhaseEntryOffset);
   FspStatus = Execute32BitCode ((UINTN)NotifyPhaseApi, 
(UINTN)NotifyPhaseParams);
 
   return FspStatus;


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to