A guest bundle built before 11-18 sends RgfxRenderPipelineCreate at 464 bytes with its private state after it. A host since then reads the record at 496 bytes, so it took that state's sample mask, UINT64_MAX, as the pipeline's tessellation partition mode and refused WindowServer's pipelines: after an update whose guest still ran the old bundle, WindowServer restarted at every boot. The wire stayed at version 2 through that change, so the kext let the old bundle in. Three records changed size at version 2, which the size table from the last commit names: RgfxVideoCaps (776 to 1552 bytes), RgfxRenderPipelineCreate (464 to 496) and RgfxPoolBlock (40 to 48). No register, region offset or message number moved after 11-05, the day version 2 began, and every other change since then was a feature the guest takes, a tail after a record, or a reserved field put to use. The wire is now version 3, and the table pins every record's size there. What the guest sees: VERSION reads 3. Kexts and option ROMs built before this commit leave the device, and name both versions: macOS then drives the display through the firmware's framebuffer and WindowServer composites in software, so an old guest comes up with a desktop instead of looping. Kexts of version 3 register no accelerator for a bundle of version 2 on disk, and RgfxGate replaces it on the same boot before they register. reims-ctl's start already makes a VM's OpenCore image again with its own kexts where the image holds other builds. The peer traces read VERSION 3, and design.md lists the versions and the size rule. The option ROM and both kext sets are rebuilt in the next commit.
90 lines
3.6 KiB
Plaintext
90 lines
3.6 KiB
Plaintext
read MAGIC = 0x58464752
|
|
read VERSION = 0x3
|
|
read REGION_SIZE_HI = 0x0
|
|
read REGION_SIZE_LO = 0x40000000
|
|
read FEATURES_LO = 0x33804
|
|
read FEATURES_HI = 0x0
|
|
write STATUS = 0x0
|
|
write STATUS = 0x1
|
|
read STATUS = 0x1
|
|
header ring0.submit +0x80=0x1
|
|
header ring0.complete +0xc0=0x1
|
|
header ring0.submit +0x80=0x1
|
|
header ring0.complete +0xc0=0x1
|
|
post ring0 BLOCK_GRANT seqno=1 size=40 0x1 0x8400000 0x9000
|
|
write DOORBELL = 0x0
|
|
post ring0 BLOCK_GRANT seqno=2 size=40 0x1 0x8409000 0x9000
|
|
write DOORBELL = 0x0
|
|
post ring0 QUEUE_CREATE seqno=3 size=56 0x10000000001 0x8400000 0x8409000 0x800000008000 0x0
|
|
write DOORBELL = 0x0
|
|
take ring0 COMPLETE seqno=3 size=24 0x0
|
|
post ring0 FENCE_CREATE seqno=4 size=24 0x10000000002
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=5 size=24 0x10000000003
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=6 size=24 0x10000000004
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=7 size=24 0x10000000005
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=8 size=24 0x10000000006
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=9 size=24 0x10000000007
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=10 size=24 0x10000000008
|
|
write DOORBELL = 0x0
|
|
post ring0 FENCE_CREATE seqno=11 size=24 0x10000000009
|
|
write DOORBELL = 0x0
|
|
header ring0.submit +0x00=0x148 +0x40=0x148 +0x80=0x1
|
|
header ring0.complete +0x00=0x18 +0x40=0x18 +0xc0=0x1
|
|
header queue1.submit +0x80=0x1
|
|
header queue1.complete +0xc0=0x1
|
|
post queue1 COMMAND_BUFFER seqno=1 size=40 0x10000000001 0x1000000000a 0x0
|
|
write DOORBELL = 0x8400000
|
|
take queue1 CB_SCHEDULED seqno=1 size=24 0x1000000000a
|
|
take queue1 CB_COMPLETE seqno=1 size=48 0x1000000000a T T 0x0
|
|
header ring0.submit +0x00=0x148 +0x40=0x148 +0x80=0x1
|
|
header ring0.complete +0x00=0x18 +0x40=0x18 +0xc0=0x1
|
|
header queue1.submit +0x00=0x28 +0x40=0x28 +0x80=0x1
|
|
header queue1.complete +0x00=0x48 +0x08=0x1 +0x40=0x48 +0xc0=0x1
|
|
post queue1 COMMAND_BUFFER seqno=2 size=104 0x10000000001 0x1000000000b 0x40 0x800000003 0x1000003018 0x10000000002 0x800000004 0x800000002 0x1000002015 0x10000000003 0x800000004
|
|
write DOORBELL = 0x8400000
|
|
take queue1 CB_SCHEDULED seqno=2 size=24 0x1000000000b
|
|
take queue1 CB_COMPLETE seqno=2 size=48 0x1000000000b T T 0x0
|
|
header ring0.submit +0x00=0x148 +0x40=0x148 +0x80=0x1
|
|
header ring0.complete +0x00=0x18 +0x40=0x18 +0xc0=0x1
|
|
header queue1.submit +0x00=0x90 +0x40=0x90 +0x80=0x1
|
|
header queue1.complete +0x00=0x90 +0x08=0x2 +0x40=0x90 +0xc0=0x1
|
|
post ring0 OBJECT_DESTROY seqno=12 size=24 0x10000000001
|
|
write DOORBELL = 0x0
|
|
post ring0 BLOCK_RELEASE seqno=13 size=40 0x1 0x8400000 0x9000
|
|
write DOORBELL = 0x0
|
|
take ring0 COMPLETE seqno=13 size=24 0x0
|
|
post ring0 BLOCK_RELEASE seqno=14 size=40 0x1 0x8409000 0x9000
|
|
write DOORBELL = 0x0
|
|
take ring0 COMPLETE seqno=14 size=24 0x0
|
|
post ring0 OBJECT_DESTROY seqno=15 size=24 0x10000000002
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=16 size=24 0x10000000003
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=17 size=24 0x10000000004
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=18 size=24 0x10000000005
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=19 size=24 0x10000000006
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=20 size=24 0x10000000007
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=21 size=24 0x10000000008
|
|
write DOORBELL = 0x0
|
|
post ring0 OBJECT_DESTROY seqno=22 size=24 0x10000000009
|
|
write DOORBELL = 0x0
|
|
header ring0.submit +0x00=0x270 +0x40=0x270 +0x80=0x1
|
|
header ring0.complete +0x00=0x48 +0x40=0x48 +0xc0=0x1
|
|
post ring0 CONTEXT_CLOSE seqno=23 size=24 0x1
|
|
write DOORBELL = 0x0
|
|
take ring0 COMPLETE seqno=23 size=24 0x0
|
|
header ring0.submit +0x00=0x288 +0x40=0x288 +0x80=0x1
|
|
header ring0.complete +0x00=0x60 +0x40=0x60 +0xc0=0x1
|
|
write STATUS = 0x0
|
|
read STATUS = 0x0
|