Changeset 95485 in vbox for trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Timestamp:
- Jul 3, 2022 1:58:25 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152099
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ExtCtxSetMm.c
r95399 r95485 33 33 34 34 #undef Bs3ExtCtxSetMm 35 BS3_CMN_DEF(bool, Bs3ExtCtxSetMm,(PBS3EXTCTX pExtCtx, uint8_t iReg, uint64_t uValue ))35 BS3_CMN_DEF(bool, Bs3ExtCtxSetMm,(PBS3EXTCTX pExtCtx, uint8_t iReg, uint64_t uValue, BS3EXTCTXTOPMM enmTop)) 36 36 { 37 37 AssertCompileMembersAtSameOffset(BS3EXTCTX, Ctx.x87.aRegs, BS3EXTCTX, Ctx.x.x87.aRegs); … … 41 41 case BS3EXTCTXMETHOD_FXSAVE: 42 42 case BS3EXTCTXMETHOD_XSAVE: 43 /* pxor mm1, mm2 on 10980XE sets mm1's sign and exponent to all 1's. */44 pExtCtx->Ctx.x87.aRegs[iReg].au16[4] = UINT16_MAX;45 pExtCtx->Ctx.x87.aRegs[iReg].mmx = uValue;43 pExtCtx->Ctx.x87.aRegs[iReg].mmx = uValue; 44 if (enmTop == BS3EXTCTXTOPMM_SET || enmTop == BS3EXTCTXTOPMM_ZERO) 45 pExtCtx->Ctx.x87.aRegs[iReg].au16[4] = enmTop == BS3EXTCTXTOPMM_SET ? UINT16_MAX : 0; 46 46 return true; 47 47 48 48 case BS3EXTCTXMETHOD_ANCIENT: 49 pExtCtx->Ctx.Ancient.regs[iReg].au16[4] = UINT16_MAX; /* see above */ 50 pExtCtx->Ctx.Ancient.regs[iReg].mmx = uValue; 49 pExtCtx->Ctx.Ancient.regs[iReg].mmx = uValue; 50 if (enmTop == BS3EXTCTXTOPMM_SET || enmTop == BS3EXTCTXTOPMM_ZERO) 51 pExtCtx->Ctx.Ancient.regs[iReg].au16[4] = enmTop == BS3EXTCTXTOPMM_SET ? UINT16_MAX : 0; 51 52 return true; 52 53 } -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r95481 r95485 2989 2989 BS3_CMN_PROTO_STUB(uint64_t, Bs3ExtCtxGetMm,(PCBS3EXTCTX pExtCtx, uint8_t iReg)); 2990 2990 2991 /** What to do about the 16-bit above the MM QWORD. */ 2992 typedef enum BS3EXTCTXTOPMM 2993 { 2994 /** Invalid zero value. */ 2995 BS3EXTCTXTOPMM_INVALID = 0, 2996 /** Set to 0FFFFh like real CPUs typically does when updating an MM register. */ 2997 BS3EXTCTXTOPMM_SET, 2998 /** Set to zero. */ 2999 BS3EXTCTXTOPMM_ZERO, 3000 /** Don't change the value, leaving it as-is. */ 3001 BS3EXTCTXTOPMM_AS_IS, 3002 /** End of valid values. */ 3003 BS3EXTCTXTOPMM_END 3004 } BS3EXTCTXTOPMM; 3005 2991 3006 /** 2992 3007 * Sets the value of YMM register number @a iReg in @a pExtCtx to @a pValue. … … 2996 3011 * @param iReg The register to set. 2997 3012 * @param uValue The new register value. 2998 */ 2999 BS3_CMN_PROTO_STUB(bool, Bs3ExtCtxSetMm,(PBS3EXTCTX pExtCtx, uint8_t iReg, uint64_t uValue)); 3013 * @param enmTop What to do about the 16-bit value above the MM 3014 * QWord. 3015 */ 3016 BS3_CMN_PROTO_STUB(bool, Bs3ExtCtxSetMm,(PBS3EXTCTX pExtCtx, uint8_t iReg, uint64_t uValue, BS3EXTCTXTOPMM enmTop)); 3000 3017 3001 3018 /**
Note:
See TracChangeset
for help on using the changeset viewer.