diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-07-13 03:36:02 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-07-13 03:36:02 +0000 |
commit | 87309e1fb22b5882e84817b5c2caf90d982c68e3 (patch) | |
tree | 9fd3eb631ba46fd06bea894a2c6231f29ba076d7 /sys | |
parent | 07a8b6f9545c2ed7df49149f08adfdc77b31ff34 (diff) |
libsa/itecons.c
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hppa/stand/boot/conf.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/Makefile | 8 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/exec_hppa.c | 12 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/itecons.c | 17 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/libsa.h | 6 |
5 files changed, 30 insertions, 21 deletions
diff --git a/sys/arch/hppa/stand/boot/conf.c b/sys/arch/hppa/stand/boot/conf.c index 42f1fe95cd9..c5f089435ed 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.1 1998/06/23 18:46:41 mickey Exp $ */ +/* $OpenBSD: conf.c,v 1.2 1998/07/13 03:35:56 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -38,11 +38,17 @@ #include <lib/libsa/nfs.h> #include <lib/libsa/netif.h> #endif +#include <lib/libsa/exec.h> #include <dev/cons.h> const char version[] = "0.01"; int debug; +struct x_sw execsw[] = { + { "elf", elf_probe, elf_load }, + { "" , NULL, NULL }, +}; + struct fs_ops file_system[] = { { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat, ufs_readdir }, diff --git a/sys/arch/hppa/stand/libsa/Makefile b/sys/arch/hppa/stand/libsa/Makefile index d4187b9b3fc..954fe3e4c5e 100644 --- a/sys/arch/hppa/stand/libsa/Makefile +++ b/sys/arch/hppa/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 1998/06/23 18:46:42 mickey Exp $ +# $OpenBSD: Makefile,v 1.2 1998/07/13 03:35:57 mickey Exp $ # $NOWHERE: Makefile,v 2.1 1998/06/22 19:34:45 mickey Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -17,13 +17,13 @@ NOPIC=nopic #AS+= -a # hppa stuff -SRCS= machdep.c pdc.c itecons.c dk.c dev_hppa.c exec_hppa.c time.c \ +SRCS= alloca.S machdep.c pdc.c itecons.c dk.c dev_hppa.c exec_hppa.c time.c \ ct.c dk.c cache_s.s cache_c.c # stand routines -SRCS+= alloc.c exit.c exec.c getfile.c gets.c globals.c strcmp.c strlen.c \ +SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \ strncmp.c memcmp.c memcpy.c memset.c printf.c strerror.c strncpy.c \ - strtol.c ctime.c + strtol.c ctime.c exec.new.c exec_elf.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/exec_hppa.c b/sys/arch/hppa/stand/libsa/exec_hppa.c index 9cafb12b97c..2f96984051f 100644 --- a/sys/arch/hppa/stand/libsa/exec_hppa.c +++ b/sys/arch/hppa/stand/libsa/exec_hppa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_hppa.c,v 1.1 1998/06/23 18:46:42 mickey Exp $ */ +/* $OpenBSD: exec_hppa.c,v 1.2 1998/07/13 03:35:59 mickey Exp $ */ /* $NOWHERE: exec_hppa.c,v 2.2 1998/06/22 19:34:46 mickey Exp $ */ /* @@ -41,16 +41,18 @@ #include <stand/boot/bootarg.h> #include <sys/disklabel.h> #include "libsa.h" +#include <lib/libsa/exec.h> #define round_to_size(x) (((int)(x) + sizeof(int) - 1) & ~(sizeof(int) - 1)) -typedef void (*startfuncp) __P((int, int, int, caddr_t)) +typedef void (*startfuncp) __P((int, int, caddr_t)) __attribute__ ((noreturn)); void -machdep_start(startaddr, howto, loadaddr, ssym, esym) - char *startaddr, *loadaddr, *ssym, *esym; +machdep_exec(xp, howto, loadaddr) + struct x_param *xp; int howto; + void *loadaddr; { size_t ac = BOOTARG_LEN; caddr_t av = (caddr_t)BOOTARG_OFF; @@ -59,6 +61,6 @@ machdep_start(startaddr, howto, loadaddr, ssym, esym) fcacheall(); /* stack and the gung is ok at this point, so, no need for asm setup */ - (*(startfuncp)startaddr)(BOOTARG_APIVER, round_to_size(esym), ac, av); + (*(startfuncp)(loadaddr + xp->xp_entry)) (BOOTARG_APIVER, ac, av); /* not reached */ } diff --git a/sys/arch/hppa/stand/libsa/itecons.c b/sys/arch/hppa/stand/libsa/itecons.c index a361e3b9c0e..842c2f5df35 100644 --- a/sys/arch/hppa/stand/libsa/itecons.c +++ b/sys/arch/hppa/stand/libsa/itecons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: itecons.c,v 1.2 1998/07/08 21:34:35 mickey Exp $ */ +/* $OpenBSD: itecons.c,v 1.3 1998/07/13 03:36:00 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -169,20 +169,17 @@ ite_getc(dev) return(0x100); if (stash) { - if (dev & 0x80) - return stash; - else { - c = stash; + c = stash; + if (!(dev & 0x80)) stash = 0; - return stash; - } + return c; } do { err = (*kyiodc)(KY_HPA, IODC_IO_CONSIN, KY_SPA, KY_LAYER, pdcbuf, 0, cnbuf, 1, 0); l = pdcbuf[0]; - stash = c = cnbuf[0]; + c = cnbuf[0]; #ifdef DEBUG if (debug && err < 0) printf("KBD input error: %d", err); @@ -206,8 +203,8 @@ ite_getc(dev) if (debug > 3) printf("kbd: \'%c\' (0x%x)\n", c, c); #endif - if (!(dev & 0x80)) - stash = 0; + if (dev & 0x80) + stash = c; return (c); } diff --git a/sys/arch/hppa/stand/libsa/libsa.h b/sys/arch/hppa/stand/libsa/libsa.h index ca32c5c6598..3cc05e993c2 100644 --- a/sys/arch/hppa/stand/libsa/libsa.h +++ b/sys/arch/hppa/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.2 1998/07/08 19:31:13 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.3 1998/07/13 03:36:01 mickey Exp $ */ /* $NOWHERE: libsa.h,v 2.2 1998/06/22 19:34:47 mickey Exp $ */ /* @@ -33,6 +33,10 @@ #include <lib/libsa/stand.h> +#define EXEC_ELF +/* #define EXEC_ECOFF */ +/* #define EXEC_SOM */ + #define DEFAULT_KERNEL_ADDRESS 0x12000 void pdc_init __P((void)); |