summaryrefslogtreecommitdiff
path: root/arch/arm/mach-apple/rtkit.c
AgeCommit message (Collapse)Author
2025-06-14arm: apple: rtkit: add missing header linux/bug.h and linux/bitops.hChristian Marangi
The GENMASK/GENMASK_ULL macro requires inclusion of linux/bitops.h header. It does currently work as bitfield.h includes it indirectly but this will change when bitfield.h will be synced with new Linux version. Also raw printf require linux/bug.h header (also currently included indirectly by bitfield.h) Explicitly include the headers to fix future compilation error. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-28arm: apple: rtkit: Add endpoint field to buffersHector Martin
To be used for special-case oslog support in rtkit-helper. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2025-04-28arm: apple: rtkit: Add OSLog buffer supportHector Martin
This will work for u-boot itself, but needs a special workaround in the MTP driver for Linux handoff to work. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2025-04-28arm: apple: rtkit: Add default buffer handlersHector Martin
For devices without specific buffer methods, just assume we can give them raw memory pointers when they request a buffer. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2025-04-28arm: apple: rtkit: Add support for AP power & syslogsHector Martin
This is required for MTP to work properly Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06arm: apple: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from all mach-apple files and when needed add missing include files directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-23arm: apple: Increase RTKit timeoutsJanne Grunau
Timeouts are not expected to happen and are handled as fatal errors. Increase all timeouts to 1 second as defensive measure to avoid relying on the timing behaviour of certain firmware versions or configurations. Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Tested-by: Mark Kettenis <kettenis@openbsd.org>
2022-06-23arm: apple: nvme: Add SART support and RTKit buffer managementJanne Grunau
The NVMe firmware in the macOS 13 beta blocks or crashes with u-boot's current minimal RTKit implementation. It does not provide buffers for the firmware's buffer requests. The ANS2 firmware included in macOS 11 and 12 tolerates this. The firmware included in the first macOS 13 beta requires buffers for the crashlog and ioreport endpoints to function. In the case of the NVMe the buffers are physical memory. Access to physical memory is guarded by what Apple calls SART. Import m1n1's SART driver (exclusively used for the NVMe controller). Implement buffer management helpers for RTKit. These are generic since other devices (none in u-boot so far) require different handling. Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Tested-by: Mark Kettenis <kettenis@openbsd.org>
2022-03-28arm: apple: Increase RTKit timeoutHector Martin
The firmware on larger NVMe drives needs more than 100ms to come up. Change the timeout to 1s. Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-10arm: apple: Add RTKit supportMark Kettenis
Most Apple IOPs run a firmware that is based on what Apple calls RTKit. RTKit implements a common mailbox protocol. This code provides an implementation of the AP side of this protocol, providing a function to initialize RTKit-based firmwares as well as a function to do a clean shutdown of this firmware. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on: Macbook Air M1 Tested-by: Simon Glass <sjg@chromium.org>