arm: apple: Add M1 Pro/Max support
authorMark Kettenis <kettenis@openbsd.org>
Tue, 8 Feb 2022 21:00:09 +0000 (22:00 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 21 Feb 2022 13:35:12 +0000 (08:35 -0500)
commita89fea7fd101212cbd0583ba7fa152009afb7a52
tree4b261182f7ea095fd5c4ba111d936308dea808c9
parent55e9cef1432ffd42559874b2a469729f20b627d9
arm: apple: Add M1 Pro/Max support

Choose the memory map based on the compatible property from the
device tree passed to us by m1n1. Since DRAM on the M1 Pro/Max
starts at a different address avoid hardcoding the top of usable
memory. Also make sure that the addresses entered into the memory
map are page aligned such that we don't crash in dcache_enable().

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Tested on: Macbook M1 Max
Tested-by: Janne Grunau <j@jannau.net>
arch/arm/mach-apple/board.c