On kboot, parse the ADT for SIO firmware parameters, set up the expected
data structures for SIO consumption in reserved memory, and pass those
in properties of the SIO FDT node.
Signed-off-by: Martin Povišer <povik@cutebit.org>
Make dt_device_set_reserved_mem take in an explicit iova instead of
reading it off from a DART. Add a separate 'from_dart' variety of the
function for getting the iova from DART.
Signed-off-by: Martin Povišer <povik@cutebit.org>
The new function parses ADT's segment-ranges and builds up nodes in
/reserved-memory representing the appropriate physical and device
address spans. This is to describe the memory placement of ASC firmware.
Signed-off-by: Martin Povišer <povik@cutebit.org>
Fixes a copy and paste error in 1b5dee2496 checking dart-dcp twice.
Fixes: 1b5dee2496 ("display: Map the framebuffer if it is not mapped")
Signed-off-by: Janne Grunau <j@jannau.net>
Additional L2 tables for dart-dcp/disp0 need to be from carveout memory
so they can kept after m1n1 exist. iboot has "pt-region-X" and "l2-tt-X"
in the ADT. For DCP on M2 we have to start installing them at "vm-base"
which is 0x8_0000_0000.
This probably causes problems on M2 Pro which uses 1 << 40 as vm-base
for dart-dcp0.
Signed-off-by: Janne Grunau <j@jannau.net>
When used with FLAG = 0, IOMFB replies with the current Shmem IOVA. It
is NULL on the first call and keeps the last set value. Updating it
seems to work without issues after shutdown.
Signed-off-by: Janne Grunau <j@jannau.net>
Allows m1n1 experiments and tracers not to care about the DART variant.
Required to trace and experiment with DCP sanely on M1 and M2.
Signed-off-by: Janne Grunau <j@jannau.net>
SMC provides buffer from its MMIO space. Since the macOS 13 SMC firmware
the firmware crashes when ACK-ing a GetBuf which provided a buffer.
Signed-off-by: Janne Grunau <j@jannau.net>
U-Boot is moving to a new set of tags to indicate devices that
should be bound/probed in early bootstrap phases. Add 'bootph-all'
tags from the new bindings such that probing the serial port
early on in U-Boot continues to work and doesn't hang the system.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
This is in preparation for the next commit to use "framebuffer" as
compatible string for the boot framebuffer. This is in line with a
proposed change for boot framebuffer handling on Nvidia Tegra SoCs.
It will allow removing simpledrm via
drm_aperture_remove_conflicting_framebuffers().
Signed-off-by: Janne Grunau <j@jannau.net>
This is in preparation for the next commit to use "framebuffer" as
compatible string for the boot framebuffer. This is in line with a
proposed change for boot framebuffer handling on Nvidia Tegra SoCs.
It will allow removing simpledrm via
drm_aperture_remove_conflicting_framebuffers().
Signed-off-by: Janne Grunau <j@jannau.net>
The main part of function will be used to add a reserved memory region
for the framebuffer from "/vram" instead of the carveout.
Signed-off-by: Janne Grunau <j@jannau.net>
This is to fix
OverflowError: Python int too large to convert to C ssize_t
in case the upper bound of a range is 1<<64.
Signed-off-by: Martin Povišer <povik@cutebit.org>