
Hi Mark,
On Tue, 21 Sept 2021 at 10:09, Mark Kettenis mark.kettenis@xs4all.nl wrote:
From: Bin Meng bmeng.cn@gmail.com Date: Tue, 21 Sep 2021 23:53:10 +0800
On Tue, Sep 21, 2021 at 8:42 PM Tom Rini trini@konsulko.com wrote:
On Sun, Sep 19, 2021 at 10:33:25PM +0200, Mark Kettenis wrote:
From: Bin Meng bmeng.cn@gmail.com Date: Sun, 19 Sep 2021 09:17:07 +0800
Hi Mark,
On Sun, Sep 19, 2021 at 9:04 AM Bin Meng bmeng.cn@gmail.com wrote:
Hi Mark,
On Sat, Sep 18, 2021 at 9:55 PM Mark Kettenis kettenis@openbsd.org wrote: > > Add support for Apple's M1 SoC that is used in "Apple Silicon" > Macs. This builds a basic U-Boot that can be used as a payload > for the m1n1 boot loader being developed by the Asahi Linux > project. > > Signed-off-by: Mark Kettenis kettenis@openbsd.org > --- > arch/arm/Kconfig | 22 ++++ > arch/arm/Makefile | 1 + > arch/arm/mach-apple/Kconfig | 18 ++++ > arch/arm/mach-apple/Makefile | 4 + > arch/arm/mach-apple/board.c | 158 ++++++++++++++++++++++++++++ > arch/arm/mach-apple/lowlevel_init.S | 16 +++ > configs/apple_m1_defconfig | 14 +++ > include/configs/apple.h | 38 +++++++ > 8 files changed, 271 insertions(+) > create mode 100644 arch/arm/mach-apple/Kconfig > create mode 100644 arch/arm/mach-apple/Makefile > create mode 100644 arch/arm/mach-apple/board.c > create mode 100644 arch/arm/mach-apple/lowlevel_init.S > create mode 100644 configs/apple_m1_defconfig > create mode 100644 include/configs/apple.h >
[..]
> diff --git a/arch/arm/mach-apple/lowlevel_init.S b/arch/arm/mach-apple/lowlevel_init.S > new file mode 100644 > index 0000000000..0f5313163e > --- /dev/null > +++ b/arch/arm/mach-apple/lowlevel_init.S > @@ -0,0 +1,16 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * (C) Copyright 2021 Mark Kettenis kettenis@openbsd.org > + */ > + > +.align 8 > +.global fw_dtb_pointer > +fw_dtb_pointer: > + .quad 0
Is this filled in by m1n1?
Sorry I misread, so this is passed by m1n1 and filled in by U-Boot. I think we should stop using CONFIG_OF_BOARD, and for such case we should use CONFIG_OF_PRIOR_STAGE.
Yes, CONFIG_OF_PRIOR_STAGE would work as well. But Tom was talking about removing that option in favour of CONFIG_OF_BOARD the other day.
Yes. I was even looking for some feedback from you, Bin, on converting some boards from CONFIG_OF_PRIOR_STAGE to CONFIG_OF_BOARD. It seems like CONFIG_OF_PRIOR_STAGE is a subset of CONFIG_OF_BOARD, at the cost of possibly a few bytes.
Ah, I thought we wanted to do the other way around, by removing CONFIG_OF_BOARD, and convert that to CONFIG_OF_PRIORI_STAGE?
I must say that I see some logic in keeping both, where CONFIG_OF_BOARD indicates that the device tree is somehow stored on the board and U-Boot has to run some code to fetch it, and CONFIG_OF_PRIOR_STAGE is used when the device tree is provided by firmware that runs before U-Boot.
In that case I obviously should use CONFIG_OF_PRIOR_STAGE here.
Well see Ilias' series where he proposed going with OF_BOARD!
Tested on: Macbook Air M1 Tested-by: Simon Glass sjg@chromium.org
Regards, Simon