The DART has no fixed DMA budget (the platform's refusal is the limit,
logged), page descriptors grow with RAM, and kmemcheck is compiled only
in debug builds.
Conflicts, both sides kept: the shutdown hold still waits up to
DEXT_DMA_HOLD_DRAIN_MS for operations in flight, now without a budget
argument; test_iokit_dma keeps the in-flight hold, aperture gate and
large-mapping tests; the fence wait-any test keeps one 2 s bound.
kmemcheck painted canaries around every kmalloc and recorded it in a
table under a global lock, and checked both on kfree: a cost on every
allocation of the driver. It is a heap debugging aid, so it now
compiles only with DEBUG defined. A release build keeps a small header
(the payload's size for ksize, and the allocation to free) and goes
straight to the allocator: no canaries, no tracking, no lock.
kmemcheck_enabled() returns 0 and the checks find nothing.
km_clear_sensitive (the wipe in kfree_sensitive) is unchanged.
The define reaches only linuxu sources, never upstream objects: the
dext's linuxu objects include a generated build/gen/mlg_build_mode.h
that `make lib-dext DEBUG=1` fills in (rewritten only when the mode
changes, so they rebuild), and Xcode's Debug configuration defines
DEBUG=1 and passes it to that make. The host library the offline tests
link is always a debug build, and the tests whose leak or corruption
checks rely on kmemcheck build its sources with DEBUG=1.
make check-release builds lib-dext in release and fails if it carries
kmemcheck's symbols (scripts/check-release.sh, whose patterns are first
checked against a debug build), then runs test_kmem_release in both
modes: sizes, alignment, zeroing, ksize, kmemdup and caches behave the
same, and only the debug build reports a write past an object.
System Information builds a PCI GPU's entry from the IOPCIDevice merged
with the properties of its direct children, and properties a dext sets
with SetProperties() reach user space as top-level keys. The dext now
sets the keys it reads on its own service:
model the product name, from libdrm's table (Start)
VRAM,totalMB gmc.real_vram_size (after the probe)
ATY,EFIVersionB the VBIOS part number ("VBIOS Version")
rom-revision the VBIOS version string
so "Display" becomes "AMD Radeon AI Pro R9700" with its VRAM and VBIOS.
A device the table does not list gets no name; Metal and core-count keys
are not published because they would be false.
MacLinuxGPUDevice carries the rest of the identity (IDs, PCIe link, VRAM
type, CUs, ISA target, VBIOS details) and MacLinuxGPUDisplays the DRM
connectors with their monitors' EDID names and modes, updated by the
display operations and removed when the session closes. System
Information cannot list those monitors under this GPU (it only lists
IOFramebuffer kernel objects there), so MacLinuxGPUHost shows the GPU
with its monitors: "MacLinuxGPUHost device", and a GPU panel in its
window, both read from the IORegistry without a user client.
test-device-properties builds the property set with DriverKit container
substitutes, including every allocation failure; test-device-info checks
the host view.
display-pin-test [--seconds N] [--width W --height H] [--init] creates
an IOSurface, fills it with rt_surface_pattern(1), imports it once
(IMPORT: its pages as the structure input), and after the call has
returned rewrites it from the CPU every second. Each time the driver
reads it back with SDMA and through its own CPU view (VERIFY): the new
pattern must match exactly and the previous one must not. Then RELEASE,
after which the handle must be gone.
display-agent --create [--connector NAME] [--seconds N] [--init] mirrors
one connected monitor as a macOS display:
- a CGVirtualDisplay from the plan (name, IDs, size, primaries, the
monitor's progressive modes, hiDPI 0), with the private CoreGraphics
classes declared in CGVirtualDisplayPrivate.h;
- OUTPUT at the mode macOS picks for it;
- a ScreenCaptureKit stream of it in BGRA at that mode and refresh,
each capture surface imported once, each frame's dirty rectangles sent
with PRESENT;
- a mode chosen in System Settings relights the monitor at that mode;
- Ctrl-C, SIGTERM or --seconds end it: capture stopped, imports
released, the monitor's previous configuration restored (OFF), the
virtual display removed, and a summary of frames, average copy and
flip times, bytes copied and the agent's CPU time.
It needs Screen Recording permission and says so when it is missing. Any
failing step ends the run with its errno; nothing else is tried.
The frame replies (verify result, present stats) and the damage
conversion live in DisplayAgent.swift, covered by test-display-agent.
MacLinuxGPUHost display-agent --dry-run [--once] [--interval ms] [--init]
follows the GPU's connected monitors through an observer client. It polls
the cached connector state (selector 84 STATUS) and, when the hotplug
epoch moves, probes, reads each connected monitor's mode list (MODES)
and EDID (sysfs), and prints the CGVirtualDisplay it would create, then
the add, update and remove changes against what it had. It creates no
display; without --dry-run it refuses.
The plan takes the identity and colour from the EDID: the monitor name
(else PNP ID and product), the PNP ID word as vendor, the product, the
serial (or a stable hash of the serial string), the CIE primaries and
white point. It takes the modes from the driver's list for the link:
progressive only, duplicates dropped, preferred first, and the largest
mode as max pixels. The size comes from the driver's display_info (else
the EDID's). hiDPI is 0. A monitor with no valid EDID or no progressive
mode is reported and skipped.
The model (report/modes/EDID decoding, the plan, the agent's changes)
moves to host/DisplayAgent.swift, Foundation only, which the Xcode
target now builds; test-display-agent compiles it with a test of its
own. docs/macos-displays.md records what of the frame path exists.
Runs the unmodified upstream Linux amdgpu and amdkfd drivers on Apple
Silicon Macs inside a DriverKit system extension, for AMD GPUs attached
over Thunderbolt. The Linux sources come from a pinned submodule and are
compiled against linuxu, a userspace implementation of the Linux kernel
APIs they use. Includes the HSA runtime, the host installer app, the
setup and firmware fetch scripts, and the offline test suite.