VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103777
Message:

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/Ia32/AsmFuncs.S

    r58464 r58466  
    2121
    2222#------------------------------------------------------------------------------
    23 # 
     23#
    2424# VOID
    2525# EFIAPI
     
    3535    movw    %ax, %es
    3636    movw    %ax, %fs
    37     movw    %ax, %gs 
     37    movw    %ax, %gs
    3838    ret
  • trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/Ia32/AsmFuncs.asm

    r58464 r58466  
    3939  mov     fs, ax
    4040  mov     gs, ax
    41   mov     ss, ax   
     41  mov     ss, ax
    4242  ret
    4343AsmSetDataSelectors   ENDP
  • trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c

    r58459 r58466  
    113113    UINT64  Accessed:1;               // 0 = Not accessed, 1 = Accessed (set by CPU)
    114114    UINT64  Dirty:1;                  // 0 = Not Dirty, 1 = written by processor on access to page
    115     UINT64  MustBe1:1;                // Must be 1 
     115    UINT64  MustBe1:1;                // Must be 1
    116116    UINT64  Global:1;                 // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
    117117    UINT64  Available:3;              // Available for use by system software
     
    137137    UINT64  Accessed:1;               // 0 = Not accessed, 1 = Accessed (set by CPU)
    138138    UINT64  Dirty:1;                  // 0 = Not Dirty, 1 = written by processor on access to page
    139     UINT64  MustBe1:1;                // Must be 1 
     139    UINT64  MustBe1:1;                // Must be 1
    140140    UINT64  Global:1;                 // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
    141141    UINT64  Available:3;              // Available for use by system software
     
    156156/**
    157157  a ASM function to transfer control to OS.
    158  
     158
    159159  @param  S3WakingVector  The S3 waking up vector saved in ACPI Facs table
    160   @param  AcpiLowMemoryBase a buffer under 1M which could be used during the transfer             
     160  @param  AcpiLowMemoryBase a buffer under 1M which could be used during the transfer
    161161**/
    162162typedef
     
    464464
    465465  //
    466   // NOTE: Because Debug Timer interrupt and system interrupts will be disabled 
     466  // NOTE: Because Debug Timer interrupt and system interrupts will be disabled
    467467  // in BootScriptExecuteDxe, the rest code in S3ResumeBootOs() cannot be halted
    468468  // by soft debugger.
     
    581581/**
    582582  Restore S3 page table because we do not trust ACPINvs content.
    583   If BootScriptExector driver will not run in 64-bit mode, this function will do nothing. 
     583  If BootScriptExector driver will not run in 64-bit mode, this function will do nothing.
    584584
    585585  @param S3NvsPageTableAddress   PageTableAddress in ACPINvs
     
    623623    PageMap = (PAGE_MAP_AND_DIRECTORY_POINTER *)S3NvsPageTableAddress;
    624624    S3NvsPageTableAddress += SIZE_4KB;
    625    
     625
    626626    Page1GSupport = FALSE;
    627627    if (PcdGetBool(PcdUse1GPageTable)) {
     
    634634      }
    635635    }
    636    
     636
    637637    //
    638638    // Get physical address bits supported.
     
    650650      }
    651651    }
    652    
     652
    653653    //
    654654    // IA-32e paging translates 48-bit linear addresses to 52-bit physical addresses.
     
    677677      NumberOfPdpEntriesNeeded = 512;
    678678    }
    679    
     679
    680680    PageMapLevel4Entry = PageMap;
    681681    PageAddress        = 0;
     
    687687      PageDirectoryPointerEntry = (PAGE_MAP_AND_DIRECTORY_POINTER *)S3NvsPageTableAddress;
    688688      S3NvsPageTableAddress += SIZE_4KB;
    689    
     689
    690690      //
    691691      // Make a PML4 Entry
     
    697697      if (Page1GSupport) {
    698698        PageDirectory1GEntry = (VOID *) PageDirectoryPointerEntry;
    699    
     699
    700700        for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectory1GEntry++, PageAddress += SIZE_1GB) {
    701701          //
     
    712712          // Each Directory Pointer entries points to a page of Page Directory entires.
    713713          // So allocate space for them and fill them in in the IndexOfPageDirectoryEntries loop.
    714           //       
     714          //
    715715          PageDirectoryEntry = (PAGE_TABLE_ENTRY *)S3NvsPageTableAddress;
    716716          S3NvsPageTableAddress += SIZE_4KB;
    717    
     717
    718718          //
    719719          // Fill in a Page Directory Pointer Entries
     
    722722          PageDirectoryPointerEntry->Bits.ReadWrite = 1;
    723723          PageDirectoryPointerEntry->Bits.Present = 1;
    724    
     724
    725725          for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectoryEntry++, PageAddress += SIZE_2MB) {
    726726            //
     
    782782    //
    783783    // Send SMI to APs
    784     //   
     784    //
    785785    SendSmiIpiAllExcludingSelf ();
    786786    //
     
    797797    if (!EFI_ERROR (Status)) {
    798798      DEBUG ((EFI_D_ERROR, "Close all SMRAM regions before executing boot script\n"));
    799  
     799
    800800      for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
    801801        Status = SmmAccess->Close ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
     
    803803
    804804      DEBUG ((EFI_D_ERROR, "Lock all SMRAM regions before executing boot script\n"));
    805  
     805
    806806      for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
    807807        Status = SmmAccess->Lock ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
     
    817817    //
    818818    // On some platform, such as ECP, a dispatch node in boot script table may execute a 32-bit PEIM which may need PeiServices
    819     // pointer. So PeiServices need preserve in (IDTBase- sizeof (UINTN)). 
     819    // pointer. So PeiServices need preserve in (IDTBase- sizeof (UINTN)).
    820820    //
    821821    IdtDescriptor = (IA32_DESCRIPTOR *) (UINTN) (AcpiS3Context->IdtrProfile);
    822822    //
    823823    // Make sure the newly allcated IDT align with 16-bytes
    824     // 
     824    //
    825825    IdtBuffer = AllocatePages (EFI_SIZE_TO_PAGES((IdtDescriptor->Limit + 1) + 16));
    826826    ASSERT (IdtBuffer != NULL);
     
    828828    // Additional 16 bytes allocated to save IA32 IDT descriptor and Pei Service Table Pointer
    829829    // IA32 IDT descriptor will be used to setup IA32 IDT table for 32-bit Framework Boot Script code
    830     // 
     830    //
    831831    ZeroMem (IdtBuffer, 16);
    832832    AsmReadIdtr ((IA32_DESCRIPTOR *)IdtBuffer);
     
    863863  //
    864864  AsmReadIdtr (&PeiS3ResumeState->Idtr);
    865  
     865
    866866  //
    867867  // Report Status Code to indicate S3 boot script execution
     
    10001000  DEBUG (( EFI_D_ERROR, "Waking Vector = %x\n", ((EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) (AcpiS3Context->AcpiFacsTable)))->FirmwareWakingVector));
    10011001  DEBUG (( EFI_D_ERROR, "AcpiS3Context->AcpiFacsTable = %x\n", AcpiS3Context->AcpiFacsTable));
    1002   DEBUG (( EFI_D_ERROR, "AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile)); 
     1002  DEBUG (( EFI_D_ERROR, "AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile));
    10031003  DEBUG (( EFI_D_ERROR, "AcpiS3Context->S3NvsPageTableAddress = %x\n", AcpiS3Context->S3NvsPageTableAddress));
    10041004  DEBUG (( EFI_D_ERROR, "AcpiS3Context->S3DebugBufferAddress = %x\n", AcpiS3Context->S3DebugBufferAddress));
     
    10891089      //
    10901090      // update segment selectors per the new GDT.
    1091       //     
     1091      //
    10921092      AsmSetDataSelectors (DATA_SEGEMENT_SELECTOR);
    10931093      //
     
    11231123
    11241124  This routine is to install EFI_PEI_S3_RESUME2_PPI.
    1125  
     1125
    11261126  @param  FileHandle              Handle of the file being invoked.
    11271127  @param  PeiServices             Pointer to PEI Services table.
  • trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/X64/AsmFuncs.S

    r58464 r58466  
    2121
    2222#------------------------------------------------------------------------------
    23 # 
     23#
    2424# VOID
    2525# EFIAPI
     
    3434    movw    %cx, %es
    3535    movw    %cx, %fs
    36     movw    %cx, %gs 
     36    movw    %cx, %gs
    3737    ret
  • trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/X64/AsmFuncs.asm

    r58464 r58466  
    3535  mov     fs, cx
    3636  mov     gs, cx
    37   mov     ss, cx   
     37  mov     ss, cx
    3838  ret
    3939AsmSetDataSelectors   ENDP
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette