VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 8:17:18 PM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

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

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/Thunk16.asm

    r48674 r58459  
    44;------------------------------------------------------------------------------
    55;
    6 ; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
     6; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
    77; This program and the accompanying materials
    88; are licensed and made available under the terms and conditions of the BSD License
     
    158158    mov     fs, ecx
    159159    mov     gs, ecx
    160     mov     cr0, eax
    161     mov     cr4, ebp                    ; real mode starts at next instruction
     160    mov     cr0, eax                    ; real mode starts at next instruction
     161                                        ;  which (per SDM) *must* be a far JMP.
     162    DB      0eah
     163_RealAddr DW 0,0                       ; filled in by InternalAsmThunk16
     164
     165    mov     cr4, ebp
    162166    mov     ss, esi                     ; set up 16-bit stack segment
    163167    xchg    sp, bx                      ; set up 16-bit stack pointer
    164     DB      66h
    165     call    @Base                       ; push eip
    166 @Base:
    167     pop     bp                          ; ebp <- address of @Base
    168     DB      67h                         ; address size override
    169     push    [esp + sizeof (IA32_REGS) + 2]
    170     lea     eax, [esi + (@RealMode - @Base)]
    171     push    eax
    172     retf
    173 @RealMode:
    174     mov     cs:[esi + (SavedSs - @Base)], edx
    175     mov     cs:[esi + (SavedEsp - @Base)], bx
    176     DB      66h
    177     lidt    fword ptr cs:[esi + (_16Idtr - @Base)]
     168
     169;   mov     bp, [esp + sizeof(IA32_REGS)
     170    DB      67h
     171    mov     ebp, [esp + sizeof(IA32_REGS)] ; BackFromUserCode address from stack
     172
     173;   mov     cs:[bp + (SavedSs - _BackFromUserCode)], dx
     174    mov     cs:[esi + (SavedSs - _BackFromUserCode)], edx
     175
     176;   mov     cs:[bp + (SavedEsp - _BackFromUserCode)], ebx
     177    DB      2eh, 66h, 89h, 9eh
     178    DW      SavedEsp - _BackFromUserCode
     179
     180;   lidt    cs:[bp + (_16Idtr - _BackFromUserCode)]
     181    DB      2eh, 66h, 0fh, 01h, 9eh
     182    DW      _16Idtr - _BackFromUserCode
     183
    178184    popaw                               ; popad actually
    179185    pop     ds
     
    231237    mov     ax, cx
    232238    stosd                               ; [edi] <- return address of user code
     239    add     eax, _RealAddr + 4 - _BackFromUserCode
     240    mov     dword ptr [edx + (_RealAddr - SavedCr0)], eax
    233241    sgdt    fword ptr [edx + (SavedGdt - SavedCr0)]
    234242    sidt    fword ptr [esp + 36]        ; save IDT stack in argument space
     
    238246    mov     ebp, cr4
    239247    mov     [edx + (SavedCr4 - SavedCr0)], ebp
    240     and     ebp, 300h                   ; clear all but PCE and OSFXSR bits
     248    and     ebp, NOT 30h                ; clear PAE, PSE bits
    241249    push    10h
    242250    pop     ecx                         ; ecx <- selector for data segments
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