aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/apple
Commit message (Collapse)AuthorAgeFilesLines
* arm64/apple: Fix malloc size for per-CPU arrays in AIC attachWeixie Cui6 days1-2/+2
| | | | | | | | | | | sizeof(*sc->sc_ipimasks) * mp_maxid + 1 is parsed as (sizeof(*sc->sc_ipimasks) * mp_maxid) + 1, so the buffers were one byte short of a full (mp_maxid + 1) element count. Multiply by (mp_maxid + 1) for sc_ipimasks and sc_cpuids. Signed-off-by: Weixie Cui <cuiweixie@gmail.com> Reviewed-by: kevans, ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2112
* gpio: remove gpiobus_attach_busAhmad Khalifa2025-08-131-1/+2
| | | | | | | | | | | | Since gpiobus_attach_bus can attach the gpiobus child along with its children in the same bus pass, the parent controller's reference to gpiobus might not be set by the time the children need it. Instead, drivers should use gpiobus_add_bus and explicitly call bus_attach_children. Reviewed by: mmel, imp (older version) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51578
* gpio: attach gpiobus when the controller is readyAhmad Khalifa2025-07-041-10/+10
| | | | | | | | | | Only attach gpiobus when the controller is fully initialized. Children of gpiobus expect this to be the case. Reviewed by: mmel, imp, andrew Approved by: imp (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D51088
* arm64: add a GPIO driver for Apple SiliconKyle Evans2025-04-031-0/+469
| | | | | | | | | | This is a ported version of OpenBSD's work, modulo interrupt functionality. We won't need GPIO interrupts until we start to get closer to audio support, and the existing version is sufficient for, e.g., pcie. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D49630
* arm64: add a driver for the uart found on Apple Silicon machinesKyle Evans2025-04-022-0/+704
| | | | | | | | | | | | | | | | This is a revival of the old exynos4210 driver, with some additional bits to configure the apple "s5l" uart (which is actually slightly different to operate). This hasn't been tested on anything that would hit the non-s5l path, so banish it off to the apple/ domain until someone cares to confirm that none of the other hardware is broken -- it may be that nobody does, but the complexity isn't too bad: mostly the driver1 construct added to the uart_bas that we use to avoid having a whole bunch of shims for uart driver methods and hardcoded references to the cfg structs. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D48120
* arm64: apple: fix aic for !SMP configurationsKyle Evans2025-01-101-3/+2
| | | | | | | | Allocate sc_cpuids anyways, even if it's just a single entry, to minimize functional diff between SMP and !SMP. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D48289
* arm64: apple: re-align to recent standardsKyle Evans2024-12-172-3/+3
| | | | | | | | In the time these have lingered in my tree, we've started to drop the __FBSDID tags. Make sure we're using SPDX tags (and the correct one) as well. Reported by: mhorne
* arm64: add a driver for the Apple Interrupt ControllerKyle Evans2024-12-171-0/+779
| | | | | | | | | | | | | Some limited support for later multi-die SoC is included, but not at all tested and not expected to be functional yet. kevans needs to finish getting his serial boards constructed, as the beefiest AS machine that actually has multiple die to support in his fleet is currently a dedicated serial console. Reviewed by: andrew Co-authored-by: Andrew Turner <andrew@FreeBSD.org> Co-authored-by: Mike Karels <karels@FreeBSD.org> Differential Revision: https://reviews.freebsd.org/D48079
* arm64: add a driver for the Apple watchdogKyle Evans2024-12-171-0/+236
Ensure it's disarmed upon attach, provide basic reset functionality. Register definitions/usage obtained from OpenBSD. Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D39824