Reserve arguments 2-4 for SunOS loaders; pass DDB stuff in args 5 and 6.

This commit is contained in:
pk 1995-06-25 23:26:21 +00:00
parent 008504e597
commit 2321aeb62a
2 changed files with 10 additions and 7 deletions

View File

@ -2453,18 +2453,20 @@ dostart:
#ifdef DDB
/*
* First, check for DDB arguments. The loader passes `_esym' in %o1.
* A DDB magic number is passed in %o2 to allow for bootloaders
* First, check for DDB arguments. The loader passes `_esym' in %o4.
* A DDB magic number is passed in %o5 to allow for bootloaders
* that know nothing about DDB symbol loading conventions.
* Note: we don't touch %o1-%o3; SunOS bootloaders seem to use them
* for their own mirky business.
*/
set 0x44444230, %l3
cmp %o2, %l3 ! chk magic
cmp %o5, %l3 ! chk magic
bne 1f
tst %o1 ! do we have the symbols?
tst %o4 ! do we have the symbols?
bz 1f
nop
sethi %hi(_esym - KERNBASE), %l3 ! store _esym
st %o1, [%l3 + %lo(_esym - KERNBASE)]
st %o4, [%l3 + %lo(_esym - KERNBASE)]
1:
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.10 1995/02/22 08:18:18 mycroft Exp $ */
/* $NetBSD: boot.c,v 1.11 1995/06/25 23:26:21 pk Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@ -149,7 +149,8 @@ copyunix(io, addr)
printf("=0x%x\n", addr);
#define DDB_MAGIC ( ('D'<<24) | ('D'<<16) | ('B'<<8) | ('0') )
(*entry)(promvec, esym, DDB_MAGIC);
/* Note: args 2-4 not used due to conflicts with SunOS loaders */
(*entry)(promvec, 0, 0, 0, esym, DDB_MAGIC);
return;
shread:
printf("Short read\n");