head	1.13;
access;
symbols
	netbsd-11-0-RC3:1.13
	netbsd-11-0-RC2:1.13
	netbsd-11-0-RC1:1.13
	perseant-exfatfs-base-20250801:1.13
	netbsd-11:1.13.0.2
	netbsd-11-base:1.13
	netbsd-10-1-RELEASE:1.12
	perseant-exfatfs-base-20240630:1.12
	perseant-exfatfs:1.12.0.10
	perseant-exfatfs-base:1.12
	netbsd-9-4-RELEASE:1.5.6.1
	netbsd-10-0-RELEASE:1.12
	netbsd-10-0-RC6:1.12
	netbsd-10-0-RC5:1.12
	netbsd-10-0-RC4:1.12
	netbsd-10-0-RC3:1.12
	netbsd-10-0-RC2:1.12
	thorpej-ifq:1.12.0.8
	thorpej-ifq-base:1.12
	thorpej-altq-separation:1.12.0.6
	thorpej-altq-separation-base:1.12
	netbsd-10-0-RC1:1.12
	netbsd-10:1.12.0.4
	netbsd-10-base:1.12
	bouyer-sunxi-drm:1.12.0.2
	bouyer-sunxi-drm-base:1.12
	netbsd-9-3-RELEASE:1.5.6.1
	thorpej-i2c-spi-conf2:1.10.0.16
	thorpej-i2c-spi-conf2-base:1.10
	thorpej-futex2:1.10.0.14
	thorpej-futex2-base:1.10
	thorpej-cfargs2:1.10.0.12
	thorpej-cfargs2-base:1.10
	cjep_sun2x-base1:1.10
	cjep_sun2x:1.10.0.10
	cjep_sun2x-base:1.10
	cjep_staticlib_x-base1:1.10
	netbsd-9-2-RELEASE:1.5.6.1
	cjep_staticlib_x:1.10.0.8
	cjep_staticlib_x-base:1.10
	thorpej-i2c-spi-conf:1.10.0.6
	thorpej-i2c-spi-conf-base:1.10
	thorpej-cfargs:1.10.0.4
	thorpej-cfargs-base:1.10
	thorpej-futex:1.10.0.2
	thorpej-futex-base:1.10
	netbsd-9-1-RELEASE:1.5.6.1
	bouyer-xenpvh-base2:1.7
	phil-wifi-20200421:1.7
	bouyer-xenpvh-base1:1.7
	phil-wifi-20200411:1.7
	bouyer-xenpvh:1.7.0.4
	bouyer-xenpvh-base:1.7
	is-mlppp:1.7.0.2
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	ad-namecache-base3:1.7
	netbsd-9-0-RELEASE:1.5.6.1
	netbsd-9-0-RC2:1.5.6.1
	ad-namecache-base2:1.7
	ad-namecache-base1:1.6
	ad-namecache:1.6.0.2
	ad-namecache-base:1.6
	netbsd-9-0-RC1:1.5
	phil-wifi-20191119:1.6
	netbsd-9:1.5.0.6
	netbsd-9-base:1.5
	phil-wifi:1.5.0.4
	phil-wifi-20190609:1.5
	isaki-audio2:1.5.0.2
	isaki-audio2-base:1.5
	pgoyette-compat-merge-20190127:1.2.2.4
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.2
	pgoyette-compat:1.2.0.2
	pgoyette-compat-0906:1.2;
locks; strict;
comment	@# @;


1.13
date	2024.12.07.19.29.04;	author jmcneill;	state Exp;
branches;
next	1.12;
commitid	ngcu2NiEOIBEwBAF;

1.12
date	2022.04.02.11.16.07;	author skrll;	state Exp;
branches
	1.12.10.1;
next	1.11;
commitid	BKaSFdcyvRWOfCyD;

1.11
date	2021.10.06.10.13.19;	author jmcneill;	state Exp;
branches;
next	1.10;
commitid	nKGy0D9CEhJjGJbD;

1.10
date	2020.09.10.14.30.14;	author jakllsch;	state Exp;
branches;
next	1.9;
commitid	pLloqY0kRGFLFvnC;

1.9
date	2020.09.08.16.34.43;	author jmcneill;	state Exp;
branches;
next	1.8;
commitid	UwAeAkOBzSQAqgnC;

1.8
date	2020.06.21.17.24.26;	author jmcneill;	state Exp;
branches;
next	1.7;
commitid	CDskb5QEyTf9f7dC;

1.7
date	2020.01.25.11.24.20;	author jmcneill;	state Exp;
branches;
next	1.6;
commitid	BupAYHNbX07r04UB;

1.6
date	2019.09.23.13.42.37;	author christos;	state Exp;
branches
	1.6.2.1;
next	1.5;
commitid	6ImXbYN9X0dSK8EB;

1.5
date	2018.10.28.10.17.47;	author jmcneill;	state Exp;
branches
	1.5.4.1
	1.5.6.1;
next	1.4;
commitid	3RFTHpAwSRQxeIXA;

1.4
date	2018.10.21.00.57.38;	author jmcneill;	state Exp;
branches;
next	1.3;
commitid	7DAs7Asd34njmLWA;

1.3
date	2018.10.12.22.08.04;	author jmcneill;	state Exp;
branches;
next	1.2;
commitid	ns0ygkxJ7S8FEIVA;

1.2
date	2018.08.27.22.40.51;	author jmcneill;	state Exp;
branches
	1.2.2.1;
next	1.1;
commitid	aQKDszySg0v1lOPA;

1.1
date	2018.08.24.02.01.06;	author jmcneill;	state Exp;
branches;
next	;
commitid	FZoTG6fU7UmjzjPA;

1.12.10.1
date	2025.08.02.05.57.54;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.6.2.1
date	2020.01.25.22.38.52;	author ad;	state Exp;
branches;
next	;
commitid	ethRERRmx7bMJ7UB;

1.5.4.1
date	2018.10.28.10.17.47;	author christos;	state dead;
branches;
next	1.5.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.5.4.2
date	2019.06.10.22.09.56;	author christos;	state Exp;
branches;
next	1.5.4.3;
commitid	jtc8rnCzWiEEHGqB;

1.5.4.3
date	2020.04.08.14.09.02;	author martin;	state Exp;
branches;
next	1.5.4.4;
commitid	Qli2aW9E74UFuA3C;

1.5.4.4
date	2020.04.13.08.05.20;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.5.6.1
date	2020.01.26.11.21.59;	author martin;	state Exp;
branches;
next	;
commitid	gkv5hVV0e8ANXbUB;

1.2.2.1
date	2018.08.27.22.40.51;	author pgoyette;	state dead;
branches;
next	1.2.2.2;
commitid	HCi1bXD317XIK0RA;

1.2.2.2
date	2018.09.06.06.56.47;	author pgoyette;	state Exp;
branches;
next	1.2.2.3;
commitid	HCi1bXD317XIK0RA;

1.2.2.3
date	2018.10.20.06.58.46;	author pgoyette;	state Exp;
branches;
next	1.2.2.4;
commitid	mTSoqZEZ4arHnFWA;

1.2.2.4
date	2018.11.26.01.52.52;	author pgoyette;	state Exp;
branches;
next	;
commitid	Zj4q5SspGdKXto1B;


desc
@@


1.13
log
@efiboot: Use 1:1 PA to VA mappings for RT services.

UEFI firmware on Snapdragon X Elite devices crashes when
SetVirtualAddressMap is called with runtime mappings that are not 1:1.
Always do this on arm64 as it won't interfere with KVA and will help us
avoid avoid a very common class of firmware bugs.
@
text
@# $NetBSD: Makefile,v 1.12 2022/04/02 11:16:07 skrll Exp $

PROG=		bootaa64.efi
OBJFMT=		binary
NEWVERSWHAT=	"efiboot (arm64)"
GNUEFIARCH=	aarch64
LIBGNUEFI_ARCH=	aarch64
OBJCOPY_FORMAT=	-O binary

EFIBOOT_ACPI=	yes
EFIBOOT_FDT=	yes

EXTRA_SOURCES=	efibootaa64.c
EXTRA_SOURCES+=	cache.S

COPTS+=		-mgeneral-regs-only -mlittle-endian -fno-jump-tables
AFLAGS+=	-mlittle-endian
CFLAGS+=	-DEFIBOOT_ALIGN=0x200000
CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0	# 1:1 PA to VA mappings
CFLAGS+=	-DEFIBOOT_MODULE_MACHINE=\"evbarm\"
LDFLAGS+=	-EL

.include "${.CURDIR}/../Makefile.efiboot"

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
@


1.12
log
@Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2021/10/06 10:13:19 jmcneill Exp $
d19 1
a19 2
CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0x0000000200200000UL
CFLAGS+=	-DEFIBOOT_RUNTIME_SIZE=0xfe00000UL
@


1.12.10.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2024/12/07 19:29:04 jmcneill Exp $
d19 2
a20 1
CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0	# 1:1 PA to VA mappings
@


1.11
log
@efiboot: Make FDT support optional on a per-arch basis.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2020/09/10 14:30:14 jakllsch Exp $
d19 2
a20 2
CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0xffff800000000000L
CFLAGS+=	-DEFIBOOT_RUNTIME_SIZE=0x40000000UL
@


1.10
log
@bootaa64: explicitly set GNUEFIARCH and LIBGNUEFI_ARCH to aarch64
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2020/09/08 16:34:43 jmcneill Exp $
d8 4
a20 1
CFLAGS+=	-DEFIBOOT_ACPI
@


1.9
log
@Be explicit about building for little endian. This allows efiboot to be
built with the aarch64eb toolchain.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2020/06/21 17:24:26 jmcneill Exp $
d6 2
@


1.8
log
@Add module support.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2020/01/25 11:24:20 jmcneill Exp $
d10 2
a11 1
COPTS+=		-mgeneral-regs-only -fno-jump-tables
d17 1
@


1.7
log
@Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2019/09/23 13:42:37 christos Exp $
d15 1
@


1.6
log
@Consistently use ${RELEASEDIR}/${RELEASEMACHINE} instead of
${RELEASEDIR}/${MACHINE} (Paul Ripke)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2018/10/28 10:17:47 jmcneill Exp $
d5 1
a5 1
NEWVERSWHAT=	"EFI Boot (aarch64)"
@


1.6.2.1
log
@Sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2020/01/25 11:24:20 jmcneill Exp $
d5 1
a5 1
NEWVERSWHAT=	"efiboot (arm64)"
@


1.5
log
@Make EFI runtime services available to the kernel. Bump version to 1.5.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2018/10/21 00:57:38 jmcneill Exp $
d20 1
a20 1
		${RELEASEDIR}/${MACHINE}/installation/misc
@


1.5.6.1
log
@Pull up following revision(s) (requested by jmcneill in ticket #653):

	sys/stand/efiboot/prompt.c: revision 1.6
	sys/stand/efiboot/boot.c: revision 1.20
	sys/stand/efiboot/bootarm/Makefile: revision 1.4
	sys/stand/efiboot/efiacpi.c: revision 1.6
	sys/stand/efiboot/exec.c: revision 1.13
	sys/stand/efiboot/Makefile.efiboot: revision 1.10
	sys/stand/efiboot/bootaa64/Makefile: revision 1.7

Fix for disappearing counters on graphics consoles

Hide the twiddle while loading efiboot plist

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2018/10/28 10:17:47 jmcneill Exp $
d5 1
a5 1
NEWVERSWHAT=	"efiboot (arm64)"
@


1.5.4.1
log
@file Makefile was added on branch phil-wifi on 2019-06-10 22:09:56 +0000
@
text
@d1 20
@


1.5.4.2
log
@Sync with HEAD
@
text
@a0 20
# $NetBSD: Makefile,v 1.5 2018/10/28 10:17:47 jmcneill Exp $

PROG=		bootaa64.efi
OBJFMT=		binary
NEWVERSWHAT=	"EFI Boot (aarch64)"

EXTRA_SOURCES=	efibootaa64.c
EXTRA_SOURCES+=	cache.S

COPTS+=		-mgeneral-regs-only -fno-jump-tables
CFLAGS+=	-DEFIBOOT_ALIGN=0x200000
CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0xffff800000000000L
CFLAGS+=	-DEFIBOOT_RUNTIME_SIZE=0x40000000UL
CFLAGS+=	-DEFIBOOT_ACPI

.include "${.CURDIR}/../Makefile.efiboot"

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
		${RELEASEDIR}/${MACHINE}/installation/misc
@


1.5.4.3
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
# $NetBSD$
d5 1
a5 1
NEWVERSWHAT=	"efiboot (arm64)"
@


1.5.4.4
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d20 1
a20 1
		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
@


1.4
log
@Enable ACPI support.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2018/10/12 22:08:04 jmcneill Exp $
d12 2
@


1.3
log
@Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2018/08/27 22:40:51 jmcneill Exp $
d12 1
a12 1
#CFLAGS+=	-DEFIBOOT_ACPI
@


1.2
log
@Add release target
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2018/08/24 02:01:06 jmcneill Exp $
d12 1
@


1.2.2.1
log
@file Makefile was added on branch pgoyette-compat on 2018-09-06 06:56:47 +0000
@
text
@d1 17
@


1.2.2.2
log
@Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
@
text
@a0 17
# $NetBSD: Makefile,v 1.2 2018/08/27 22:40:51 jmcneill Exp $

PROG=		bootaa64.efi
OBJFMT=		binary
NEWVERSWHAT=	"EFI Boot (aarch64)"

EXTRA_SOURCES=	efibootaa64.c
EXTRA_SOURCES+=	cache.S

COPTS+=		-mgeneral-regs-only -fno-jump-tables
CFLAGS+=	-DEFIBOOT_ALIGN=0x200000

.include "${.CURDIR}/../Makefile.efiboot"

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
		${RELEASEDIR}/${MACHINE}/installation/misc
@


1.2.2.3
log
@Sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2018/10/12 22:08:04 jmcneill Exp $
a11 1
#CFLAGS+=	-DEFIBOOT_ACPI
@


1.2.2.4
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2018/10/28 10:17:47 jmcneill Exp $
d12 1
a12 3
CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0xffff800000000000L
CFLAGS+=	-DEFIBOOT_RUNTIME_SIZE=0x40000000UL
CFLAGS+=	-DEFIBOOT_ACPI
@


1.1
log
@Add MI EFI bootloader and AArch64 glue.
@
text
@d1 1
a1 1
# $NetBSD$
d15 3
@

