summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/stand
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-12-26 18:53:00 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-12-26 18:53:00 +0000
commit05a292d3dbfa7b5411b7b1f5f94c87a60069ca3b (patch)
treeb7367f93b280f3aa971ac0e8aab39bb50283d318 /sys/arch/hppa/stand
parent0f40d94984cea8af6060b8a16632cc925b6df5e1 (diff)
Teach the hppa bootloader how to boot 64-bit kernels.
ok miod@, deraadt@
Diffstat (limited to 'sys/arch/hppa/stand')
-rw-r--r--sys/arch/hppa/stand/boot/conf.c4
-rw-r--r--sys/arch/hppa/stand/cdboot/Makefile4
-rw-r--r--sys/arch/hppa/stand/libsa/Makefile6
-rw-r--r--sys/arch/hppa/stand/libsa/elf32.c32
-rw-r--r--sys/arch/hppa/stand/libsa/elf64.c32
5 files changed, 71 insertions, 7 deletions
diff --git a/sys/arch/hppa/stand/boot/conf.c b/sys/arch/hppa/stand/boot/conf.c
index d1cc089585c..08dd737c21e 100644
--- a/sys/arch/hppa/stand/boot/conf.c
+++ b/sys/arch/hppa/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.19 2004/04/07 18:24:20 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.20 2007/12/26 18:52:59 kettenis Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -32,7 +32,7 @@
#include <lib/libsa/cd9660.h>
#include <dev/cons.h>
-const char version[] = "0.8";
+const char version[] = "0.9";
int debug = 0;
struct fs_ops file_system[] = {
diff --git a/sys/arch/hppa/stand/cdboot/Makefile b/sys/arch/hppa/stand/cdboot/Makefile
index 47a08cf0f62..aa88ec34006 100644
--- a/sys/arch/hppa/stand/cdboot/Makefile
+++ b/sys/arch/hppa/stand/cdboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2007/11/26 08:36:49 deraadt Exp $
+# $OpenBSD: Makefile,v 1.5 2007/12/26 18:52:59 kettenis Exp $
NOMAN= no man
S =${.CURDIR}/../../../..
@@ -14,7 +14,7 @@ SRCS+= srt0.S
SRCS= srt0.S cdboot.c
.PATH: ${.CURDIR}/../libsa
-SRCS+= pdc.c itecons.c dev_hppa.c dk.c
+SRCS+= pdc.c itecons.c dev_hppa.c dk.c elf32.c elf64.c
.PATH: ${S}/lib/libkern/arch/hppa ${S}/lib/libkern
SRCS+= milli.S strlen.c strlcpy.c
diff --git a/sys/arch/hppa/stand/libsa/Makefile b/sys/arch/hppa/stand/libsa/Makefile
index 9b492d42908..2beb2c20d9d 100644
--- a/sys/arch/hppa/stand/libsa/Makefile
+++ b/sys/arch/hppa/stand/libsa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.13 2003/06/08 14:25:05 miod Exp $
+# $OpenBSD: Makefile,v 1.14 2007/12/26 18:52:59 kettenis Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -17,11 +17,11 @@ NOPIC=nopic
# hppa stuff
SRCS= machdep.c pdc.c itecons.c dev_hppa.c time.c \
- ct.c dk.c lf.c lif.c cmd_hppa.c
+ ct.c dk.c lf.c lif.c cmd_hppa.c loadfile.c elf32.c elf64.c
# stand routines
SRCS+= alloc.c exit.c getfile.c gets.c globals.c \
- printf.c strerror.c strtol.c strchr.c ctime.c loadfile.c snprintf.c
+ printf.c strerror.c strtol.c strchr.c ctime.c snprintf.c
# io routines
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \
diff --git a/sys/arch/hppa/stand/libsa/elf32.c b/sys/arch/hppa/stand/libsa/elf32.c
new file mode 100644
index 00000000000..4bf83948ec6
--- /dev/null
+++ b/sys/arch/hppa/stand/libsa/elf32.c
@@ -0,0 +1,32 @@
+/* $OpenBSD: elf32.c,v 1.1 2007/12/26 18:52:59 kettenis Exp $ */
+
+/*
+ * Copyright (c) 2007 Tom Cosgrove <tom@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <lib/libkern/libkern.h>
+#include <lib/libsa/stand.h>
+
+#include <sys/param.h>
+#include <sys/exec.h>
+
+#include "../../../../lib/libsa/loadfile.h"
+
+#undef ELFSIZE
+#define ELFSIZE 32
+
+#include <sys/exec_elf.h>
+
+#include "../../../../lib/libsa/loadfile_elf.c"
diff --git a/sys/arch/hppa/stand/libsa/elf64.c b/sys/arch/hppa/stand/libsa/elf64.c
new file mode 100644
index 00000000000..fab232f3c29
--- /dev/null
+++ b/sys/arch/hppa/stand/libsa/elf64.c
@@ -0,0 +1,32 @@
+/* $OpenBSD: elf64.c,v 1.1 2007/12/26 18:52:59 kettenis Exp $ */
+
+/*
+ * Copyright (c) 2007 Tom Cosgrove <tom@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <lib/libkern/libkern.h>
+#include <lib/libsa/stand.h>
+
+#include <sys/param.h>
+#include <sys/exec.h>
+
+#include "../../../../lib/libsa/loadfile.h"
+
+#undef ELFSIZE
+#define ELFSIZE 64
+
+#include <sys/exec_elf.h>
+
+#include "../../../../lib/libsa/loadfile_elf.c"