Changeset 108931 in vbox for trunk/src/VBox/VMM/testcase
- Timestamp:
- Apr 10, 2025 12:25:42 PM (4 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168440
- Location:
- trunk/src/VBox/VMM/testcase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstPGMAllGst-armv8.cpp
r108926 r108931 143 143 PCTSTMEMCHUNK pChunk = (PCTSTMEMCHUNK)RTAvlrU64RangeGet(&g_MmuCfg.TreeMem, GCPhys); 144 144 if (!pChunk) 145 { 146 *ppv = (void *)&g_abRTZero64K[0]; /* This ASSUMES that the page table walking code will never access beyond the end of this page. */ 147 return VINF_SUCCESS; 148 } 145 return VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS; 149 146 150 147 uint64_t const off = GCPhys - pChunk->Core.Key; … … 289 286 switch (enmType) 290 287 { 288 case RTJSONVALTYPE_TRUE: 289 case RTJSONVALTYPE_FALSE: 290 { 291 if (paBitfields[idx].cBits == 1) 292 u64 |= (enmType == RTJSONVALTYPE_TRUE ? 1 : 0) << paBitfields[idx].offBitfield; 293 else 294 RTTestFailed(hTest, "Bitfield '%s' is more than 1 bit wide", paBitfields[idx].pszName); 295 296 break; 297 } 291 298 case RTJSONVALTYPE_INTEGER: 292 299 { … … 299 306 } 300 307 else if ( i64Tmp < 0 301 || (uint64_t)i64Tmp > (RT_BIT_64(paBitfields[idx].cBits) - 1)) 308 || ( paBitfields[idx].cBits < 64 309 && (uint64_t)i64Tmp > (RT_BIT_64(paBitfields[idx].cBits) - 1))) 302 310 { 303 311 RTTestFailed(hTest, "Value of \"%s\" is out of bounds, got %#RX64, maximum is %#RX64", … … 539 547 break; 540 548 } 549 case RTJSONVALTYPE_OBJECT: 550 { 551 static const TSTCFGNAMEDVALUE s_aApPerm[] = 552 { 553 { "PRW", 0 }, 554 { "UPRW", 1 }, 555 { "PR", 2 }, 556 { "UPR", 3 }, 557 { NULL, 0 } 558 }; 559 static const TSTCFGBITFIELD s_aTblBitfields[] = 560 { 561 #define BITFIELD_CREATE_BOOL(a_Name, a_offBit) \ 562 { a_Name, a_offBit, 1, NULL } 563 564 { "Raw", 0, 64, NULL }, 565 { "SwUse", 55, 4, NULL }, 566 BITFIELD_CREATE_BOOL("UXN", 54), 567 BITFIELD_CREATE_BOOL("PXN", 53), 568 { "PhysAddr", 0, 64, NULL }, 569 BITFIELD_CREATE_BOOL("AF", 10), 570 { "AP", 6, 2, &s_aApPerm[0] }, 571 BITFIELD_CREATE_BOOL("T", 1), 572 BITFIELD_CREATE_BOOL("V", 0), 573 { NULL, 0, 0, NULL } 574 575 #undef BITFIELD_CREATE_BOOL 576 }; 577 578 uint64_t u64Val = 0; 579 rc = tstMmuCfgReadBitfieldU64(hTest, hMemObj, &s_aTblBitfields[0], &u64Val); 580 if (RT_SUCCESS(rc)) 581 rc = tstTestcaseMmuMemoryWrite(hTest, pMmuCfg, GCPhysAddr, &u64Val, sizeof(u64Val)); 582 break; 583 } 541 584 default: 542 585 RTTestFailed(hTest, "Memory object has an invalid type %d\n", enmType); -
trunk/src/VBox/VMM/testcase/tstPGMAllGst-armv8.json
r108926 r108931 58 58 AddressSpace: 59 59 { 60 0x0: 0x0000000000001fff,61 0x1000: 0x0000c000000000fd,60 0x0: { PhysAddr: 0x1000, T: 1, V: 1}, 61 0x1000: { UXN: 0, PXN: 0, PhysAddr: 0x0000c00000000000, AP: 'UPR', T: 0, V: 1}, 62 62 }, 63 63
Note:
See TracChangeset
for help on using the changeset viewer.