VirtualBox

Changeset 39158 in vbox for trunk/src/VBox/Devices/EFI


Ignore:
Timestamp:
Nov 1, 2011 8:24:34 AM (13 years ago)
Author:
vboxsync
Message:

EFI: modifies thunk to boot firmware based on EDK2 r9572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Thunk/EfiThunk.asm

    r37955 r39158  
    199199
    200200        ;
     201        ; UEFI spec requires FPU initialization.
     202        ;
     203
     204        mov eax,cr4
     205        or eax, X86_CR4_OSFSXR|X86_CR4_OSXMMEEXCPT
     206        mov cr4,eax
     207        ;
    201208        ; Jump to 32-bit entry point of the firmware, interrupts still disabled.
    202209        ;
     
    205212        ; around all it wants for all we care.
    206213        ;
     214
    207215        mov     eax,[0xfffff000 + DEVEFIINFO.fFlags]
    208216        and      eax, DEVEFI_INFO_FLAGS_AMD64
    209217        jnz trampoline_64
     218        xor     eax,eax
     219        xor     edi,edi
    210220        mov     ebp, [0xfffff000 + DEVEFIINFO.PhysFwVol]
    211         mov     esi, [0xfffff000 + DEVEFIINFO.pfnFirmwareEP]
    212         mov     edi, [0xfffff000 + DEVEFIINFO.pfnPeiEP]
     221        ;mov     esi, [0xfffff000 + DEVEFIINFO.pfnFirmwareEP]
     222        ;mov     edi, [0xfffff000 + DEVEFIINFO.pfnPeiEP]
    213223        jmp     [0xfffff000 + DEVEFIINFO.pfnFirmwareEP]
    214224        jmp     HaltForEver
     
    281291
    282292        mov eax,cr4
    283         or eax, X86_CR4_PAE|X86_CR4_OSFSXR|X86_CR4_OSXMMEEXCPT
     293        or eax, X86_CR4_PAE
    284294        mov cr4,eax
    285295
     
    301311efi_64:
    302312        mov     ebp, [0xff009] ;  DEVEFIINFO.PhysFwVol
    303         mov     esi, [0xff000]; + DEVEFIINFO.pfnFirmwareEP]
    304         mov     edi, [0xff000 + 0x28]; + DEVEFIINFO.pfnPeiEP]
     313        ;mov     esi, [0xff000]; + DEVEFIINFO.pfnFirmwareEP]
     314        ;mov     edi, [0xff000 + 0x28]; + DEVEFIINFO.pfnPeiEP]
     315        xor     rax,rax
     316        xor     rdi,rdi
    305317        jmp     [0xff000]; + DEVEFIINFO.pfnFirmwareEP]
    306318        jmp     HaltForEver
Note: See TracChangeset for help on using the changeset viewer.

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