Revision: 17272
          http://sourceforge.net/p/edk2/code/17272
Author:   hwu1225
Date:     2015-04-30 01:44:42 +0000 (Thu, 30 Apr 2015)
Log Message:
-----------
Clean update API name for ASM function.

Add FSP_INFO_HEADER_SIGNATURE and FSP_INFO_EXTENDED_HEADER_SIGNATURE.

(Sync patch r17271 from main trunk.)

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

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

Modified Paths:
--------------
    branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm
    branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.s
    branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.asm
    branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.s
    branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.c
    branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.h
    branches/UDK2014.SP1/IntelFspPkg/Include/FspInfoHeader.h

Modified: branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm    
2015-04-30 01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm    
2015-04-30 01:44:42 UTC (rev 17272)
@@ -37,8 +37,8 @@
 ;
 ; Following functions will be provided in PlatformSecLib
 ;
-EXTERN   GetFspBaseAddress:PROC
-EXTERN   GetFspInfoHdr:PROC
+EXTERN   AsmGetFspBaseAddress:PROC
+EXTERN   AsmGetFspInfoHeader:PROC
 EXTERN   GetBootFirmwareVolumeOffset:PROC
 EXTERN   Loader2PeiSwitchStack:PROC
 EXTERN   LoadMicrocode(LoadMicrocodeDefault):PROC
@@ -506,7 +506,7 @@
   cmp    eax, 3   ; FspMemoryInit API
   jz     @F
 
-  call   GetFspInfoHdr
+  call   AsmGetFspInfoHeader
   jmp    Loader2PeiSwitchStack
 
 @@:
@@ -523,7 +523,7 @@
   ; Update the FspInfoHeader pointer
   ;
   push   eax
-  call   GetFspInfoHdr
+  call   AsmGetFspInfoHeader
   mov    [esp + 4], eax
   pop    eax
 
@@ -559,7 +559,7 @@
   ;
   ; Pass entry point of the PEI core
   ;
-  call    GetFspBaseAddress
+  call    AsmGetFspBaseAddress
   mov     edi, eax
   add     edi, PcdGet32 (PcdFspAreaSize) 
   sub     edi, 20h
@@ -573,7 +573,7 @@
   ; PcdFspAreaBaseAddress are the same. For FSP with mulitple FVs,
   ; they are different. The code below can handle both cases.
   ;
-  call    GetFspBaseAddress
+  call    AsmGetFspBaseAddress
   mov     edi, eax
   call    GetBootFirmwareVolumeOffset
   add     eax, edi

Modified: branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.s
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.s      
2015-04-30 01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.s      
2015-04-30 01:44:42 UTC (rev 17272)
@@ -215,8 +215,8 @@
 #
 # Following functions will be provided in PlatformSecLib
 #
-ASM_GLOBAL    ASM_PFX(GetFspBaseAddress)
-ASM_GLOBAL    ASM_PFX(GetFspInfoHdr)
+ASM_GLOBAL    ASM_PFX(AsmGetFspBaseAddress)
+ASM_GLOBAL    ASM_PFX(AsmGetFspInfoHeader)
 ASM_GLOBAL    ASM_PFX(GetBootFirmwareVolumeOffset)
 ASM_GLOBAL    ASM_PFX(Loader2PeiSwitchStack)
 
@@ -718,7 +718,7 @@
   jz      FspApiCommonL2
   cmpl    $0x03, %eax                        # FspMemoryInit API
   jz      FspApiCommonL2
-  call    ASM_PFX(GetFspInfoHdr)
+  call    ASM_PFX(AsmGetFspInfoHeader)
   jmp     Loader2PeiSwitchStack
 
 FspApiCommonL2:
@@ -735,7 +735,7 @@
   # Update the FspInfoHeader pointer
   #
   pushl  %eax
-  call   ASM_PFX(GetFspInfoHdr)
+  call   ASM_PFX(AsmGetFspInfoHeader)
   movl   %eax, 4(%esp)
   popl   %eax
 
@@ -773,7 +773,7 @@
   #
   # Pass entry point of the PEI core
   #
-  call    ASM_PFX(GetFspBaseAddress)
+  call    ASM_PFX(AsmGetFspBaseAddress)
   movl    %eax, %edi
   addl    PcdGet32(PcdFspAreaSize), %edi
   subl    $0x20, %edi
@@ -787,7 +787,7 @@
   # PcdFspAreaBaseAddress are the same. For FSP with mulitple FVs,
   # they are different. The code below can handle both cases.
   #
-  call    ASM_PFX(GetFspBaseAddress)
+  call    ASM_PFX(AsmGetFspBaseAddress)
   movl    %eax, %edi
   call    ASM_PFX(GetBootFirmwareVolumeOffset)
   addl    %edi, %eax

Modified: branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.asm
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.asm      
2015-04-30 01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.asm      
2015-04-30 01:44:42 UTC (rev 17272)
@@ -22,18 +22,18 @@
    DD    012345678h
 FspInfoHeaderRelativeOff    ENDP
 
-GetFspBaseAddress           PROC      NEAR    PUBLIC
-   mov   eax, GetFspBaseAddress
+AsmGetFspBaseAddress        PROC      NEAR    PUBLIC
+   mov   eax, AsmGetFspBaseAddress
    sub   eax, dword ptr [FspInfoHeaderRelativeOff]
    add   eax, 01Ch
    mov   eax, dword ptr [eax]
    ret
-GetFspBaseAddress           ENDP
+AsmGetFspBaseAddress        ENDP
 
-GetFspInfoHdr               PROC      NEAR    PUBLIC
-   mov   eax, GetFspBaseAddress
+AsmGetFspInfoHeader         PROC      NEAR    PUBLIC
+   mov   eax, AsmGetFspBaseAddress
    sub   eax, dword ptr [FspInfoHeaderRelativeOff]
    ret
-GetFspInfoHdr               ENDP
+AsmGetFspInfoHeader         ENDP
 
      END
\ No newline at end of file

Modified: branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.s
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.s        
2015-04-30 01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/FspSecCore/Ia32/FspHelper.s        
2015-04-30 01:44:42 UTC (rev 17272)
@@ -23,16 +23,16 @@
    .long    0x012345678
 
 
-ASM_GLOBAL ASM_PFX(GetFspBaseAddress)
-ASM_PFX(GetFspBaseAddress):
-   mov    $GetFspBaseAddress, %eax
+ASM_GLOBAL ASM_PFX(AsmGetFspBaseAddress)
+ASM_PFX(AsmGetFspBaseAddress):
+   mov    $AsmGetFspBaseAddress, %eax
    sub    $FspInfoHeaderRelativeOff, %eax
    add    $0x01C, %eax
    mov    (%eax), %eax
    ret
 
-ASM_GLOBAL ASM_PFX(GetFspInfoHdr)
-ASM_PFX(GetFspInfoHdr):
-   mov    $GetFspBaseAddress, %eax
+ASM_GLOBAL ASM_PFX(AsmGetFspInfoHeader)
+ASM_PFX(AsmGetFspInfoHeader):
+   mov    $AsmGetFspBaseAddress, %eax
    sub    $FspInfoHeaderRelativeOff, %eax
    ret

Modified: branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.c
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.c        2015-04-30 
01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.c        2015-04-30 
01:44:42 UTC (rev 17272)
@@ -32,7 +32,7 @@
   IA32_IDT_GATE_DESCRIPTOR *IdtGateDescriptor;
   FSP_INFO_HEADER          *FspInfoHeader;
 
-  FspInfoHeader     = (FSP_INFO_HEADER *)(GetFspBaseAddress() + 
FSP_INFO_HEADER_OFF);
+  FspInfoHeader     = (FSP_INFO_HEADER *)AsmGetFspInfoHeader();
   ExceptionHandler  = IdtEntryTemplate;
   IdtGateDescriptor = (IA32_IDT_GATE_DESCRIPTOR *)&ExceptionHandler;
   Entry = (IdtGateDescriptor->Bits.OffsetHigh << 16) | 
IdtGateDescriptor->Bits.OffsetLow;
@@ -171,7 +171,7 @@
   // Get FSP Header offset
   // It may have multiple FVs, so look into the last one for FSP header
   //
-  PeiFspData->FspInfoHeader      = (FSP_INFO_HEADER *)(GetFspBaseAddress() + 
FSP_INFO_HEADER_OFF);
+  PeiFspData->FspInfoHeader      = (FSP_INFO_HEADER *)AsmGetFspInfoHeader();
   SecGetPlatformData (PeiFspData);
 
   //

Modified: branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.h
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.h        2015-04-30 
01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/FspSecCore/SecFsp.h        2015-04-30 
01:44:42 UTC (rev 17272)
@@ -80,11 +80,23 @@
 **/
 UINT32
 EFIAPI
-GetFspBaseAddress (
+AsmGetFspBaseAddress (
   VOID
   );
 
 /**
+  This interface gets FspInfoHeader pointer
+
+  @return   FSP binary base address.
+
+**/
+UINT32
+EFIAPI
+AsmGetFspInfoHeader (
+  VOID
+  );
+
+/**
   This function gets the FSP UPD region offset in flash.
 
   @return the offset of the UPD region.

Modified: branches/UDK2014.SP1/IntelFspPkg/Include/FspInfoHeader.h
===================================================================
--- branches/UDK2014.SP1/IntelFspPkg/Include/FspInfoHeader.h    2015-04-30 
01:18:30 UTC (rev 17271)
+++ branches/UDK2014.SP1/IntelFspPkg/Include/FspInfoHeader.h    2015-04-30 
01:44:42 UTC (rev 17272)
@@ -29,6 +29,8 @@
 
 #define  OFFSET_IN_FSP_INFO_HEADER(x)  (UINT32)&((FSP_INFO_HEADER 
*)(UINTN)0)->x
 
+#define FSP_INFO_HEADER_SIGNATURE  SIGNATURE_32 ('F', 'S', 'P', 'H')
+
 #pragma pack(1)
 
 typedef struct  {
@@ -124,6 +126,8 @@
 ///
 /// Below structure is added in FSP version 2
 ///
+#define FSP_INFO_EXTENDED_HEADER_SIGNATURE  SIGNATURE_32 ('F', 'S', 'P', 'E')
+
 typedef struct  {
   ///
   /// Byte 0x00: Signature ('FSPE') for the FSP Extended Information Header


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to