CVS commit: src/sys/stand/efiboot/bootaa64

2021-01-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan  9 13:19:27 UTC 2021

Modified Files:
src/sys/stand/efiboot/bootaa64: efibootaa64.c

Log Message:
Flush from kernel start, not the entry point.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/stand/efiboot/bootaa64/efibootaa64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/bootaa64/efibootaa64.c
diff -u src/sys/stand/efiboot/bootaa64/efibootaa64.c:1.4 src/sys/stand/efiboot/bootaa64/efibootaa64.c:1.5
--- src/sys/stand/efiboot/bootaa64/efibootaa64.c:1.4	Sat Jan  9 13:15:15 2021
+++ src/sys/stand/efiboot/bootaa64/efibootaa64.c	Sat Jan  9 13:19:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: efibootaa64.c,v 1.4 2021/01/09 13:15:15 jmcneill Exp $	*/
+/*	$NetBSD: efibootaa64.c,v 1.5 2021/01/09 13:19:27 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -56,7 +56,7 @@ efi_boot_kernel(u_long marks[MARK_MAX])
 	fdt_start = (u_long)efi_fdt_data();
 	fdt_size = efi_fdt_size();
 
-	aarch64_dcache_wbinv_range(kernel_entry, kernel_size);
+	aarch64_dcache_wbinv_range(kernel_start, kernel_size);
 	if (efi_fdt_size() > 0) {
 		aarch64_dcache_wbinv_range(fdt_start, fdt_size);
 	}



CVS commit: src/sys/stand/efiboot/bootaa64

2021-01-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan  9 13:15:15 UTC 2021

Modified Files:
src/sys/stand/efiboot/bootaa64: efibootaa64.c

Log Message:
Style fixes, NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/stand/efiboot/bootaa64/efibootaa64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/bootaa64/efibootaa64.c
diff -u src/sys/stand/efiboot/bootaa64/efibootaa64.c:1.3 src/sys/stand/efiboot/bootaa64/efibootaa64.c:1.4
--- src/sys/stand/efiboot/bootaa64/efibootaa64.c:1.3	Sat Nov 28 14:02:09 2020
+++ src/sys/stand/efiboot/bootaa64/efibootaa64.c	Sat Jan  9 13:15:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: efibootaa64.c,v 1.3 2020/11/28 14:02:09 jmcneill Exp $	*/
+/*	$NetBSD: efibootaa64.c,v 1.4 2021/01/09 13:15:15 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -47,18 +47,22 @@ efi_dcache_flush(u_long start, u_long si
 void
 efi_boot_kernel(u_long marks[MARK_MAX])
 {
-	void (*kernel_entry)(register_t, register_t, register_t, register_t);
-	u_long kernel_size;
+	u_long kernel_start, kernel_size, kernel_entry;
+	u_long fdt_start, fdt_size;
 
-	kernel_entry = (void *)marks[MARK_ENTRY];
-	kernel_size = marks[MARK_END] - marks[MARK_START];
-
-	aarch64_dcache_wbinv_range((u_long)kernel_entry, kernel_size);
-	if (efi_fdt_size() > 0)
-		aarch64_dcache_wbinv_range((u_long)efi_fdt_data(), efi_fdt_size());
+	kernel_start = marks[MARK_START];
+	kernel_size = marks[MARK_END] - kernel_start;
+	kernel_entry = marks[MARK_ENTRY];
+	fdt_start = (u_long)efi_fdt_data();
+	fdt_size = efi_fdt_size();
+
+	aarch64_dcache_wbinv_range(kernel_entry, kernel_size);
+	if (efi_fdt_size() > 0) {
+		aarch64_dcache_wbinv_range(fdt_start, fdt_size);
+	}
 	aarch64_icache_inv_all();
 
-	aarch64_exec_kernel((paddr_t)marks[MARK_ENTRY], (paddr_t)efi_fdt_data());
+	aarch64_exec_kernel((paddr_t)kernel_entry, (paddr_t)fdt_start);
 }
 
 /*



CVS commit: src/sys/stand/efiboot/bootaa64

2020-09-10 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Sep 10 14:30:15 UTC 2020

Modified Files:
src/sys/stand/efiboot/bootaa64: Makefile

Log Message:
bootaa64: explicitly set GNUEFIARCH and LIBGNUEFI_ARCH to aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/stand/efiboot/bootaa64/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/bootaa64/Makefile
diff -u src/sys/stand/efiboot/bootaa64/Makefile:1.9 src/sys/stand/efiboot/bootaa64/Makefile:1.10
--- src/sys/stand/efiboot/bootaa64/Makefile:1.9	Tue Sep  8 16:34:43 2020
+++ src/sys/stand/efiboot/bootaa64/Makefile	Thu Sep 10 14:30:14 2020
@@ -1,8 +1,10 @@
-# $NetBSD: Makefile,v 1.9 2020/09/08 16:34:43 jmcneill Exp $
+# $NetBSD: Makefile,v 1.10 2020/09/10 14:30:14 jakllsch Exp $
 
 PROG=		bootaa64.efi
 OBJFMT=		binary
 NEWVERSWHAT=	"efiboot (arm64)"
+GNUEFIARCH=	aarch64
+LIBGNUEFI_ARCH=	aarch64
 
 EXTRA_SOURCES=	efibootaa64.c
 EXTRA_SOURCES+=	cache.S



CVS commit: src/sys/stand/efiboot/bootaa64

2020-09-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep  8 16:34:43 UTC 2020

Modified Files:
src/sys/stand/efiboot/bootaa64: Makefile

Log Message:
Be explicit about building for little endian. This allows efiboot to be
built with the aarch64eb toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/bootaa64/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/bootaa64/Makefile
diff -u src/sys/stand/efiboot/bootaa64/Makefile:1.8 src/sys/stand/efiboot/bootaa64/Makefile:1.9
--- src/sys/stand/efiboot/bootaa64/Makefile:1.8	Sun Jun 21 17:24:26 2020
+++ src/sys/stand/efiboot/bootaa64/Makefile	Tue Sep  8 16:34:43 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2020/06/21 17:24:26 jmcneill Exp $
+# $NetBSD: Makefile,v 1.9 2020/09/08 16:34:43 jmcneill Exp $
 
 PROG=		bootaa64.efi
 OBJFMT=		binary
@@ -7,12 +7,14 @@ NEWVERSWHAT=	"efiboot (arm64)"
 EXTRA_SOURCES=	efibootaa64.c
 EXTRA_SOURCES+=	cache.S
 
-COPTS+=		-mgeneral-regs-only -fno-jump-tables
+COPTS+=		-mgeneral-regs-only -mlittle-endian -fno-jump-tables
+AFLAGS+=	-mlittle-endian
 CFLAGS+=	-DEFIBOOT_ALIGN=0x20
 CFLAGS+=	-DEFIBOOT_RUNTIME_ADDRESS=0x8000L
 CFLAGS+=	-DEFIBOOT_RUNTIME_SIZE=0x4000UL
 CFLAGS+=	-DEFIBOOT_ACPI
 CFLAGS+=	-DEFIBOOT_MODULE_MACHINE=\"evbarm\"
+LDFLAGS+=	-EL
 
 .include "${.CURDIR}/../Makefile.efiboot"
 



CVS commit: src/sys/stand/efiboot/bootaa64

2018-08-27 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug 27 22:40:51 UTC 2018

Modified Files:
src/sys/stand/efiboot/bootaa64: Makefile

Log Message:
Add release target


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/stand/efiboot/bootaa64/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/bootaa64/Makefile
diff -u src/sys/stand/efiboot/bootaa64/Makefile:1.1 src/sys/stand/efiboot/bootaa64/Makefile:1.2
--- src/sys/stand/efiboot/bootaa64/Makefile:1.1	Fri Aug 24 02:01:06 2018
+++ src/sys/stand/efiboot/bootaa64/Makefile	Mon Aug 27 22:40:51 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/08/24 02:01:06 jmcneill Exp $
+# $NetBSD: Makefile,v 1.2 2018/08/27 22:40:51 jmcneill Exp $
 
 PROG=		bootaa64.efi
 OBJFMT=		binary
@@ -12,3 +12,6 @@ CFLAGS+=	-DEFIBOOT_ALIGN=0x20
 
 .include "${.CURDIR}/../Makefile.efiboot"
 
+release: check_RELEASEDIR
+	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
+		${RELEASEDIR}/${MACHINE}/installation/misc