-/* $OpenBSD: OSFpal.c,v 1.8 2013/12/22 18:31:29 miod Exp $ */
+/* $OpenBSD: OSFpal.c,v 1.9 2023/01/16 07:29:32 deraadt Exp $ */
/* $NetBSD: OSFpal.c,v 1.8 2001/07/22 15:17:30 wiz Exp $ */
/*
paddr_t ptbr_save;
+void switch_palcode(void);
+
void
OSFpal()
{
-/* $OpenBSD: boot.c,v 1.29 2021/01/29 16:22:34 deraadt Exp $ */
+/* $OpenBSD: boot.c,v 1.30 2023/01/16 07:29:34 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.10 1997/01/18 01:58:33 cgd Exp $ */
/*
return (error);
}
+void init_prom_calls(void);
+void OSFpal(void);
+void halt(void);
+
int
main()
{
-/* $OpenBSD: devopen.c,v 1.8 2003/06/02 23:27:44 millert Exp $ */
+/* $OpenBSD: devopen.c,v 1.9 2023/01/16 07:29:35 deraadt Exp $ */
/* $NetBSD: devopen.c,v 1.1 1995/11/23 02:39:37 cgd Exp $ */
/*-
* Decode the string 'fname', open the device and return the remaining
* file name if any.
*/
+int
devopen(f, fname, file)
struct open_file *f;
const char *fname;
-/* $OpenBSD: disk.c,v 1.19 2020/12/09 18:10:17 krw Exp $ */
+/* $OpenBSD: disk.c,v 1.20 2023/01/16 07:29:35 deraadt Exp $ */
/* $NetBSD: disk.c,v 1.6 1997/04/06 08:40:33 cgd Exp $ */
/*
ret.bits = prom_getenv(PROM_E_BOOTED_DEV, devname, sizeof(devname));
devlen = ret.u.retval;
- ret.bits = prom_open(devname, devlen);
+ ret.bits = prom_open((u_int64_t)devname, devlen);
if (ret.u.status == 2)
return (ENXIO);
if (ret.u.status == 3)
-/* $OpenBSD: bootxx.c,v 1.10 2004/07/05 19:59:17 deraadt Exp $ */
+/* $OpenBSD: bootxx.c,v 1.11 2023/01/16 07:29:32 deraadt Exp $ */
/* $NetBSD: bootxx.c,v 1.4 1997/01/18 00:28:59 cgd Exp $ */
/*
#include "bbinfo.h"
-extern _end, start;
+extern long _end, start;
struct bbinfoloc desc = {
0xbabefacedeadbeef,
ret.bits = prom_getenv(PROM_E_BOOTED_DEV, devname, sizeof(devname));
devlen = ret.u.retval;
- ret.bits = prom_open(devname, devlen);
+ ret.bits = prom_open((u_int64_t)devname, devlen);
if (ret.u.status)
return 0;
return 1;
}
+void puts(char *);
+
int
load_file(bbinfop, loadaddr)
struct bbinfo *bbinfop;
return (rv);
}
+void init_prom_calls(void);
+
int
main()
{
loadaddr = (char *)SECONDARY_LOAD_ADDRESS;
if (!load_file(bbinfop, loadaddr)) {
puts("\nLOAD FAILED!\n\n");
- return;
+ return 1;
}
#if 0
entry = (void (*)())loadaddr;
(*entry)();
puts("SECONDARY BOOT BLOCK RETURNED!\n");
+ return 1;
}
+
-/* $OpenBSD: dev_net.c,v 1.6 2023/01/04 09:24:14 jsg Exp $ */
+/* $OpenBSD: dev_net.c,v 1.7 2023/01/16 07:29:35 deraadt Exp $ */
/* $NetBSD: dev_net.c,v 1.4 1997/04/06 08:41:24 cgd Exp $ */
/*
static int netdev_sock = -1;
static int netdev_opens;
+int net_getparams(int);
+int nfs_mount(int, struct in_addr, char *);
+
/*
* Called by devopen after it sets f->f_dev to our devsw entry.
* This opens the low-level device and sets f->f_devdata.
-/* $OpenBSD: getsecs.c,v 1.3 2011/06/05 21:49:36 miod Exp $ */
+/* $OpenBSD: getsecs.c,v 1.4 2023/01/16 07:29:35 deraadt Exp $ */
#include <sys/param.h>
#include "include/rpb.h"
#include "include/prom.h"
+
+long alpha_rpcc(void);
+
int
getsecs()
{
-/* $OpenBSD: if_prom.c,v 1.8 2017/09/08 05:36:51 deraadt Exp $ */
+/* $OpenBSD: if_prom.c,v 1.9 2023/01/16 07:29:35 deraadt Exp $ */
/* $NetBSD: if_prom.c,v 1.9 1997/04/06 08:41:26 cgd Exp $ */
/*
}
extern char *strchr();
+void halt(void);
+const char *ether_sprintf(const u_char *);
void
prom_init(struct iodesc *desc, void *machdep_hint)
gotit:
printf("boot: ethernet address: %s\n", ether_sprintf(desc->myea));
- ret.bits = prom_open(devname, devlen + 1);
+ ret.bits = prom_open((u_int64_t)devname, devlen + 1);
if (ret.u.status) {
printf("prom_init: open failed: %d\n", ret.u.status);
goto reallypunt;
-/* $OpenBSD: prom.c,v 1.8 2010/05/14 21:08:28 naddy Exp $ */
+/* $OpenBSD: prom.c,v 1.9 2023/01/16 07:29:32 deraadt Exp $ */
/* $NetBSD: prom.c,v 1.2 1996/11/25 16:18:16 cgd Exp $ */
/*
prom_return_t ret;
for (;;) {
- ret.bits = prom_dispatch(PROM_R_GETC, console);
+ ret.bits = prom_dispatch(PROM_R_GETC, console, 0, 0, 0);
if (ret.u.status == 0 || ret.u.status == 1)
return (ret.u.retval);
}
cbuf = '\r';
do {
ret.bits = prom_dispatch(PROM_R_PUTS, console,
- &cbuf, 1);
+ (u_int64_t)&cbuf, 1, 0);
} while ((ret.u.retval & 1) == 0);
cbuf = '\n';
} else
cbuf = c;
do {
- ret.bits = prom_dispatch(PROM_R_PUTS, console, &cbuf, 1);
+ ret.bits = prom_dispatch(PROM_R_PUTS, console,
+ (u_int64_t)&cbuf, 1, 0);
} while ((ret.u.retval & 1) == 0);
}
static char abuf[128] __attribute__ ((aligned (8)));
prom_return_t ret;
- ret.bits = prom_dispatch(PROM_R_GETENV, id, abuf, 128);
+ ret.bits = prom_dispatch(PROM_R_GETENV, id, (u_int64_t)abuf, 128, 0);
if (ret.u.status & 0x4)
ret.u.retval = 0;
len--;
-/* $OpenBSD: puts.c,v 1.3 1996/10/30 22:40:35 niklas Exp $ */
+/* $OpenBSD: puts.c,v 1.4 2023/01/16 07:29:32 deraadt Exp $ */
+void putchar(char);
+
void
puts(s)
char *s;