Changeset 48727 in vbox for trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVariable
- Timestamp:
- Sep 27, 2013 11:03:53 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVariable/InitVariable.c
r48674 r48727 58 58 UINT32 idxBuffer = 0; 59 59 for (idxBuffer = 0; idxBuffer < cbBuffer; ++idxBuffer) 60 pu8Buffer[idxBuffer] = ASMInU8(EFI_ VARIABLE_OP);60 pu8Buffer[idxBuffer] = ASMInU8(EFI_PORT_VARIABLE_OP); 61 61 return idxBuffer; 62 62 } … … 64 64 DECLINLINE(void) VBoxWriteNVRAMU32Param(UINT32 u32CodeParam, UINT32 u32Param) 65 65 { 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); 68 68 } 69 69 … … 72 72 UINT32 idxParam = 0; 73 73 for (idxParam = 0; idxParam < cbParam; ++idxParam) 74 ASMOutU8(EFI_ VARIABLE_PARAM, pbParam[idxParam]);74 ASMOutU8(EFI_PORT_VARIABLE_PARAM, pbParam[idxParam]); 75 75 return idxParam; 76 76 } … … 81 81 UINTN cwcName = StrLen(pwszName); 82 82 83 ASMOutU32(EFI_ VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16);83 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16); 84 84 for (i = 0; i <= cwcName; i++) 85 ASMOutU16(EFI_ VARIABLE_PARAM, pwszName[i]);85 ASMOutU16(EFI_PORT_VARIABLE_PARAM, pwszName[i]); 86 86 } 87 87 88 88 DECLINLINE(UINT32) VBoxWriteNVRAMGuidParam(const EFI_GUID *pGuid) 89 89 { 90 ASMOutU32(EFI_ VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID);90 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID); 91 91 return VBoxWriteNVRAMByteArrayParam((UINT8 *)pGuid, sizeof(EFI_GUID)); 92 92 } … … 99 99 VBoxWriteNVRAMU32Param(EFI_VM_VARIABLE_OP_START, u32Operation); 100 100 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) 102 102 { 103 103 #if 0 … … 166 166 */ 167 167 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); 170 170 LogFlowFuncMarkVar(*DataSize, "%d"); 171 171 LogFlowFuncMarkVar(VarLen, "%d"); … … 177 177 */ 178 178 *DataSize = VarLen; 179 ASMOutU32(EFI_ VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE);179 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE); 180 180 VBoxReadNVRAM((UINT8 *)Data, VarLen); 181 181 182 182 if (Attributes) 183 183 { 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); 186 186 LogFlowFuncMarkVar(Attributes, "%x"); 187 187 } … … 271 271 */ 272 272 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); 275 275 if ((cwcName + 1) * 2 <= *VariableNameSize) /* ASSUMES byte size is specified */ 276 276 { … … 280 280 * Read back the result. 281 281 */ 282 ASMOutU32(EFI_ VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID);282 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_GUID); 283 283 VBoxReadNVRAM((UINT8 *)VendorGuid, sizeof(EFI_GUID)); 284 284 285 ASMOutU32(EFI_ VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16);285 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_NAME_UTF16); 286 286 for (i = 0; i < cwcName; i++) 287 VariableName[i] = ASMInU16(EFI_ VARIABLE_OP);287 VariableName[i] = ASMInU16(EFI_PORT_VARIABLE_OP); 288 288 VariableName[i] = '\0'; 289 289 … … 356 356 VBoxWriteNVRAMU32Param(EFI_VM_VARIABLE_OP_VALUE_LENGTH, (UINT32)DataSize); 357 357 /* fill value bytes */ 358 ASMOutU32(EFI_ VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE);358 ASMOutU32(EFI_PORT_VARIABLE_OP, EFI_VM_VARIABLE_OP_VALUE); 359 359 VBoxWriteNVRAMByteArrayParam(Data, (UINT32)DataSize); 360 360 /* start fetch operation */
Note:
See TracChangeset
for help on using the changeset viewer.