VirtualBox

Ignore:
Timestamp:
Sep 27, 2013 11:03:53 AM (11 years ago)
Author:
vboxsync
Message:

EFI: EFI image load events, EFI debug points, always disabled frame-pointer optimizations on MSFT. Some cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVariable/InitVariable.c

    r48674 r48727  
    5858    UINT32 idxBuffer = 0;
    5959    for (idxBuffer = 0; idxBuffer < cbBuffer; ++idxBuffer)
    60         pu8Buffer[idxBuffer] = ASMInU8(EFI_VARIABLE_OP);
     60        pu8Buffer[idxBuffer] = ASMInU8(EFI_PORT_VARIABLE_OP);
    6161    return idxBuffer;
    6262}
     
    6464DECLINLINE(void) VBoxWriteNVRAMU32Param(UINT32 u32CodeParam, UINT32 u32Param)
    6565{
    66     ASMOutU32(EFI_VARIABLE_OP, u32CodeParam);
    67     ASMOutU32(EFI_VARIABLE_PARAM, u32Param);
     66    ASMOutU32(EFI_PORT_VARIABLE_OP, u32CodeParam);
     67    ASMOutU32(EFI_PORT_VARIABLE_PARAM, u32Param);
    6868}
    6969
     
    7272    UINT32 idxParam = 0;
    7373    for (idxParam = 0; idxParam < cbParam; ++idxParam)
    74         ASMOutU8(EFI_VARIABLE_PARAM, pbParam[idxParam]);
     74        ASMOutU8(EFI_PORT_VARIABLE_PARAM, pbParam[idxParam]);
    7575    return idxParam;
    7676}
     
    8181    UINTN cwcName = StrLen(pwszName);
    8282
    83     ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16);
     83    ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16);
    8484    for (i = 0; i <= cwcName; i++)
    85         ASMOutU16(EFI_VARIABLE_PARAM, pwszName[i]);
     85        ASMOutU16(EFI_PORT_VARIABLE_PARAM, pwszName[i]);
    8686}
    8787
    8888DECLINLINE(UINT32) VBoxWriteNVRAMGuidParam(const EFI_GUID *pGuid)
    8989{
    90     ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID);
     90    ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID);
    9191    return VBoxWriteNVRAMByteArrayParam((UINT8 *)pGuid, sizeof(EFI_GUID));
    9292}
     
    9999    VBoxWriteNVRAMU32Param(EFI_VM_VARIABLE_OP_START, u32Operation);
    100100
    101     while ((u32Rc = ASMInU32(EFI_VARIABLE_OP)) == EFI_VARIABLE_OP_STATUS_BSY)
     101    while ((u32Rc = ASMInU32(EFI_PORT_VARIABLE_OP)) == EFI_VARIABLE_OP_STATUS_BSY)
    102102    {
    103103#if 0
     
    166166         */
    167167        UINT32 VarLen;
    168         ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE_LENGTH);
    169         VarLen = ASMInU32(EFI_VARIABLE_OP);
     168        ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE_LENGTH);
     169        VarLen = ASMInU32(EFI_PORT_VARIABLE_OP);
    170170        LogFlowFuncMarkVar(*DataSize, "%d");
    171171        LogFlowFuncMarkVar(VarLen, "%d");
     
    177177             */
    178178            *DataSize = VarLen;
    179             ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE);
     179            ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE);
    180180            VBoxReadNVRAM((UINT8 *)Data, VarLen);
    181181
    182182            if (Attributes)
    183183            {
    184                 ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_ATTRIBUTE);
    185                 *Attributes = ASMInU32(EFI_VARIABLE_OP);
     184                ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_ATTRIBUTE);
     185                *Attributes = ASMInU32(EFI_PORT_VARIABLE_OP);
    186186                LogFlowFuncMarkVar(Attributes, "%x");
    187187            }
     
    271271         */
    272272        UINT32      cwcName;
    273         ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_LENGTH_UTF16);
    274         cwcName = ASMInU32(EFI_VARIABLE_OP);
     273        ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_LENGTH_UTF16);
     274        cwcName = ASMInU32(EFI_PORT_VARIABLE_OP);
    275275        if ((cwcName + 1) * 2 <= *VariableNameSize) /* ASSUMES byte size is specified */
    276276        {
     
    280280             * Read back the result.
    281281             */
    282             ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID);
     282            ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID);
    283283            VBoxReadNVRAM((UINT8 *)VendorGuid, sizeof(EFI_GUID));
    284284
    285             ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16);
     285            ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16);
    286286            for (i = 0; i < cwcName; i++)
    287                 VariableName[i] = ASMInU16(EFI_VARIABLE_OP);
     287                VariableName[i] = ASMInU16(EFI_PORT_VARIABLE_OP);
    288288            VariableName[i] = '\0';
    289289
     
    356356    VBoxWriteNVRAMU32Param(EFI_VM_VARIABLE_OP_VALUE_LENGTH, (UINT32)DataSize);
    357357    /* fill value bytes */
    358     ASMOutU32(EFI_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE);
     358    ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE);
    359359    VBoxWriteNVRAMByteArrayParam(Data, (UINT32)DataSize);
    360360    /* start fetch operation */
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