An EL2 monitor/hypervisor and toolchain that boots macOS 27 on the ASUS A16 (Snapdragon X2 Elite), with an Adreno Metal plug-in and IOGPU kext, and air2ir3, an AIR to Mesa ir3 shader compiler. MIT, with GPL-2.0 components listed in LICENSE and THIRD_PARTY_NOTICES.md. No Apple, Qualcomm, ASUS or Microsoft binaries are included.
18 lines
860 B
Python
Executable File
18 lines
860 B
Python
Executable File
#!/usr/bin/env python3
|
|
# SPDX-License-Identifier: MIT
|
|
from pathlib import Path
|
|
import runpy
|
|
import unittest
|
|
A=runpy.run_path(str(Path(__file__).with_name('inspect-map-conflict-contract.py')))
|
|
class Contract(unittest.TestCase):
|
|
def test_images(self):self.assertEqual(A['inspect']()['guest_result'],6)
|
|
def test_instruction_mutations(self):
|
|
for name,base in [('SPTM_WORDS',0xfffffff000000000),('KERNEL_WORDS',0xfffffe0000000000)]:
|
|
words=A[name];expected={base|pc:word for pc,word in words}
|
|
for pc,word in words:
|
|
for bit in range(32):
|
|
changed=dict(expected);changed[base|pc]=word^(1<<bit)
|
|
with self.subTest(pc=pc,bit=bit),self.assertRaises(ValueError):
|
|
A['require_words'](changed.__getitem__,words,base)
|
|
if __name__=='__main__':unittest.main()
|