Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys efiboot: Boot parameters can be set via installboot(8).
details: https://anonhg.NetBSD.org/src/rev/330694e39e9f
branches: trunk
changeset: 353311:330694e39e9f
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sat Apr 29 00:05:35 2017 +0000
description:
efiboot: Boot parameters can be set via installboot(8).
diffstat:
sys/arch/i386/stand/efiboot/Makefile.efiboot | 4 ++--
sys/arch/i386/stand/efiboot/bootia32/efibootia32.c | 4 +---
sys/arch/i386/stand/efiboot/bootia32/start.S | 18 +++++++++++++++++-
sys/arch/i386/stand/efiboot/bootx64/efibootx64.c | 4 +---
sys/arch/i386/stand/efiboot/bootx64/start.S | 18 +++++++++++++++++-
sys/sys/bootblock.h | 3 ++-
6 files changed, 40 insertions(+), 11 deletions(-)
diffs (143 lines):
diff -r 55855af0af0a -r 330694e39e9f sys/arch/i386/stand/efiboot/Makefile.efiboot
--- a/sys/arch/i386/stand/efiboot/Makefile.efiboot Fri Apr 28 19:01:01 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/Makefile.efiboot Sat Apr 29 00:05:35 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.8 2017/04/08 19:53:21 christos Exp $
+# $NetBSD: Makefile.efiboot,v 1.9 2017/04/29 00:05:35 nonaka Exp $
S= ${.CURDIR}/../../../../..
@@ -10,7 +10,7 @@
SOURCES?= start.S conf.c devopen.c efiboot.c self_reloc.c
LIBI386SRCS= boot.c biosdisk.c bootinfo.c bootinfo_biosgeom.c
-LIBI386SRCS+= bootmenu.c boot_params.S diskbuf.c exec.c menuutils.c
+LIBI386SRCS+= bootmenu.c diskbuf.c exec.c menuutils.c
LIBI386SRCS+= panic.c parseutils.c pread.c
LIBI386SRCS+= eficons.c efidelay.c efidisk.c efidisk_ll.c efigetsecs.c
LIBI386SRCS+= efimemory.c
diff -r 55855af0af0a -r 330694e39e9f sys/arch/i386/stand/efiboot/bootia32/efibootia32.c
--- a/sys/arch/i386/stand/efiboot/bootia32/efibootia32.c Fri Apr 28 19:01:01 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/bootia32/efibootia32.c Sat Apr 29 00:05:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efibootia32.c,v 1.2 2017/02/21 10:53:37 nonaka Exp $ */
+/* $NetBSD: efibootia32.c,v 1.3 2017/04/29 00:05:35 nonaka Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -30,8 +30,6 @@
#include <sys/bootblock.h>
-struct x86_boot_params boot_params;
-
void startprog32_start(physaddr_t, uint32_t, uint32_t *, physaddr_t,
physaddr_t, physaddr_t, u_long, void *);
extern void (*startprog32)(physaddr_t, uint32_t, uint32_t *, physaddr_t,
diff -r 55855af0af0a -r 330694e39e9f sys/arch/i386/stand/efiboot/bootia32/start.S
--- a/sys/arch/i386/stand/efiboot/bootia32/start.S Fri Apr 28 19:01:01 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/bootia32/start.S Sat Apr 29 00:05:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: start.S,v 1.1 2017/01/24 11:09:14 nonaka Exp $ */
+/* $NetBSD: start.S,v 1.2 2017/04/29 00:05:35 nonaka Exp $ */
/*-
* Copyright (c) 2008-2010 Rui Paulo <rpaulo%FreeBSD.org@localhost>
@@ -29,6 +29,7 @@
*/
#include <machine/asm.h>
+#include <sys/bootblock.h>
.text
.align 16
@@ -72,3 +73,18 @@
.long 0
.long 10
.word 0
+
+ /* boot parameters */
+ .text
+ .code16
+ .align 512
+.Lfake_bootxx:
+ jmp 1f
+ .balign 4
+ .long X86_BOOT_MAGIC_EFI /* checked by installboot */
+ .globl _C_LABEL(boot_params)
+_C_LABEL(boot_params): /* space for patchable variables */
+ .long 1f - boot_params /* length of this data area */
+#include <boot_params.S>
+ . = .Lfake_bootxx + 0x80 /* Space for patching unknown params */
+1:
diff -r 55855af0af0a -r 330694e39e9f sys/arch/i386/stand/efiboot/bootx64/efibootx64.c
--- a/sys/arch/i386/stand/efiboot/bootx64/efibootx64.c Fri Apr 28 19:01:01 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/bootx64/efibootx64.c Sat Apr 29 00:05:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efibootx64.c,v 1.2 2017/02/11 10:23:39 nonaka Exp $ */
+/* $NetBSD: efibootx64.c,v 1.3 2017/04/29 00:05:35 nonaka Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -30,8 +30,6 @@
#include <sys/bootblock.h>
-struct x86_boot_params boot_params;
-
void startprog64_start(physaddr_t, physaddr_t, physaddr_t, u_long,
void *, physaddr_t);
extern void (*startprog64)(physaddr_t, physaddr_t, physaddr_t, u_long,
diff -r 55855af0af0a -r 330694e39e9f sys/arch/i386/stand/efiboot/bootx64/start.S
--- a/sys/arch/i386/stand/efiboot/bootx64/start.S Fri Apr 28 19:01:01 2017 +0000
+++ b/sys/arch/i386/stand/efiboot/bootx64/start.S Sat Apr 29 00:05:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: start.S,v 1.1 2017/01/24 11:09:14 nonaka Exp $ */
+/* $NetBSD: start.S,v 1.2 2017/04/29 00:05:35 nonaka Exp $ */
/*-
* Copyright (C) 1999 Hewlett-Packard Co.
@@ -39,6 +39,7 @@
*/
#include <machine/asm.h>
+#include <sys/bootblock.h>
.text
.align 16
@@ -77,3 +78,18 @@
.long 0
.long 10
.word 0
+
+ /* boot parameters */
+ .text
+ .code16
+ .align 512
+.Lfake_bootxx:
+ jmp 1f
+ .balign 4
+ .long X86_BOOT_MAGIC_EFI /* checked by installboot */
+ .globl _C_LABEL(boot_params)
+_C_LABEL(boot_params): /* space for patchable variables */
+ .long 1f - boot_params /* length of this data area */
+#include <boot_params.S>
+ . = .Lfake_bootxx + 0x80 /* Space for patching unknown params */
+1:
diff -r 55855af0af0a -r 330694e39e9f sys/sys/bootblock.h
--- a/sys/sys/bootblock.h Fri Apr 28 19:01:01 2017 +0000
+++ b/sys/sys/bootblock.h Sat Apr 29 00:05:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootblock.h,v 1.57 2014/09/14 17:39:06 nonaka Exp $ */
+/* $NetBSD: bootblock.h,v 1.58 2017/04/29 00:05:35 nonaka Exp $ */
/*-
* Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -1089,6 +1089,7 @@
#define X86_BOOT_MAGIC_2 X86_BOOT_MAGIC(2) /* bootxx.S */
#define X86_BOOT_MAGIC_PXE X86_BOOT_MAGIC(3) /* start_pxe.S */
#define X86_BOOT_MAGIC_FAT X86_BOOT_MAGIC(4) /* fatboot.S */
+#define X86_BOOT_MAGIC_EFI X86_BOOT_MAGIC(5) /* efiboot/start.S */
#define X86_MBR_GPT_MAGIC 0xedb88320 /* gpt.S */
/* values for bp_flags */
Home |
Main Index |
Thread Index |
Old Index