summaryrefslogtreecommitdiff
path: root/sys/boot/alpha/libalpha
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
commit76b5366091f76c9bc73570149ef5055648fc2c39 (patch)
tree590d020e0f2a5bea6e09d66d951a674443b21d67 /sys/boot/alpha/libalpha
parent4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff)
This commit was manufactured by cvs2svn to create tagrelease/3.0.0
'RELENG_3_0_0_RELEASE'.
Diffstat (limited to 'sys/boot/alpha/libalpha')
-rw-r--r--sys/boot/alpha/libalpha/Makefile4
-rw-r--r--sys/boot/alpha/libalpha/srmdisk.c41
-rw-r--r--sys/boot/alpha/libalpha/start.S15
3 files changed, 15 insertions, 45 deletions
diff --git a/sys/boot/alpha/libalpha/Makefile b/sys/boot/alpha/libalpha/Makefile
index 4928647b7548..a82febf2e2a3 100644
--- a/sys/boot/alpha/libalpha/Makefile
+++ b/sys/boot/alpha/libalpha/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.5 1998/10/14 09:53:25 peter Exp $
+# $Id: Makefile,v 1.4 1998/09/26 10:51:37 dfr Exp $
LIB= alpha
NOPIC= true
@@ -14,7 +14,7 @@ CFLAGS+= -DDEBUG
CFLAGS+= -I${.CURDIR}/../../common -mno-fp-regs \
-I${.CURDIR}/../../.. -I.
-#CFLAGS+= -DDISK_DEBUG
+CFLAGS+= -DDISK_DEBUG
#CPPFLAGS+= -DNO_DISKLABEL
#CPPFLAGS+= -DSAVE_MEMORY
diff --git a/sys/boot/alpha/libalpha/srmdisk.c b/sys/boot/alpha/libalpha/srmdisk.c
index 6b7d17b8e76d..f7427bdb493f 100644
--- a/sys/boot/alpha/libalpha/srmdisk.c
+++ b/sys/boot/alpha/libalpha/srmdisk.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: srmdisk.c,v 1.3 1998/11/02 23:28:10 msmith Exp $
+ * $Id$
*/
/*
@@ -46,7 +46,6 @@
#include <machine/stdarg.h>
#include <machine/prom.h>
-#include "bootstrap.h"
#include "libalpha.h"
#define SRMDISK_SECSIZE 512
@@ -62,16 +61,18 @@
static int bd_init(void);
static int bd_strategy(void *devdata, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize);
-static int bd_realstrategy(void *devdata, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize);
static int bd_open(struct open_file *f, void *vdev);
static int bd_close(struct open_file *f);
-static void bd_print(int verbose);
struct open_disk {
int od_fd;
int od_unit; /* our unit number */
int od_boff; /* block offset from beginning of SRM disk */
int od_flags;
+#define BD_MODEMASK 0x3
+#define BD_MODEINT13 0x0
+#define BD_MODEEDD1 0x1
+#define BD_MODEEDD3 0x2
#define BD_FLOPPY (1<<2)
u_char od_buf[BUFSIZE]; /* transfer buffer (do we want/need this?) */
};
@@ -83,8 +84,7 @@ struct devsw srmdisk = {
bd_strategy,
bd_open,
bd_close,
- noioctl,
- bd_print
+ noioctl
};
/*
@@ -120,23 +120,6 @@ bd_init(void)
}
/*
- * Print information about disks
- */
-static void
-bd_print(int verbose)
-{
- int i;
- char line[80];
-
- for (i = 0; i < nbdinfo; i++) {
- sprintf(line, " disk%d: SRM drive %s", i, bdinfo[i].bd_name);
- pager_output(line);
- /* XXX more detail? */
- pager_output("\n");
- }
-}
-
-/*
* Attempt to open the disk described by (dev) for use by (f).
*
* Note that the philosophy here is "give them exactly what
@@ -324,17 +307,7 @@ bd_close(struct open_file *f)
}
static int
-bd_strategy(void *devdata, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize)
-{
- struct bcache_devdata bcd;
-
- bcd.dv_strategy = bd_realstrategy;
- bcd.dv_devdata = devdata;
- return(bcache_strategy(&bcd, rw, dblk, size, buf, rsize));
-}
-
-static int
-bd_realstrategy(void *devdata, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize)
+bd_strategy(void *devdata, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
prom_return_t ret;
struct open_disk *od = (struct open_disk *)devdata;
diff --git a/sys/boot/alpha/libalpha/start.S b/sys/boot/alpha/libalpha/start.S
index 39c3e48952c6..53063aba11ee 100644
--- a/sys/boot/alpha/libalpha/start.S
+++ b/sys/boot/alpha/libalpha/start.S
@@ -1,5 +1,5 @@
/*
- * $Id: start.S,v 1.1.1.1 1998/08/21 03:17:42 msmith Exp $
+ * $Id$
* From: $NetBSD: start.S,v 1.4 1998/03/28 00:54:15 cgd Exp $
*/
@@ -51,15 +51,16 @@ NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
Lstartgp:
LDGP(pv)
+#ifndef PRIMARY_BOOTBLOCK
+ lda sp,start /* start stack below text */
+ lda sp,-ENTRY_FRAME(sp)
+#endif
+
lda a0,_edata
lda a1,_end
subq a1,a0,a1
CALL(bzero)
-#if defined(NETBOOT) || defined(LOADER)
- lda sp,stack + 8192 - ENTRY_FRAME
-#endif
-
CALL(main) /* transfer to C */
XLEAF(_rtt, 0)
@@ -82,7 +83,3 @@ LEAF(cpu_number, 0)
call_pal PAL_VMS_mfpr_whami
RET
END(cpu_number)
-
-#if defined(NETBOOT) || defined(LOADER)
-BSS(stack, 8192)
-#endif