Commit Graph

67 Commits

Author SHA1 Message Date
uwe fcfce86d87 Fix printf formats in -DDEBUG_PROM to make it compile.
XXX: print daddr_t after casting it to int since libsa is not built
with LIBSA_PRINTF_LONGLONG_SUPPORT by default.
2010-09-02 03:14:42 +00:00
christos 7709732cb2 factor out the floppy detection code. 2010-08-25 20:16:48 +00:00
christos f2b34c1443 Don't LOAD_BACKWARDS for floppies. 2010-08-25 18:11:54 +00:00
snj febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +00:00
tsutsui 1bc6608553 Don't try to read disklabel to check FS_RAID on floppy boot since
reopening floppy could cause Data Access Exception later.
Fixes PR port-sparc/42186, ok'ed by mrg@.
2009-10-18 06:24:21 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
tsutsui 69cf32a782 Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
 numbers in seconds returned by the machine dependent getsecs() function
 which are used to measure relative time

saseconds_t (currently int):
 numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
2009-01-12 11:32:43 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui abb05145d7 Add support booting from UFS2 partition for sparc.
Tested on tme emulating SS2.

Closes PR port-sparc/36068.
2008-04-05 06:39:08 +00:00
uwe 4c3c91e691 De-__P. ANSIify.
Same object code is generated (except in prf.c, where putchar argument
type was changed to int to match the prototype and one instrcution
changes accordingly).

strategy() in ofdev.c was not ANSIified in this sweep, b/c that
changes code generated at call sites!
2006-07-13 20:03:34 +00:00
jdc 4e27372d03 Add support to the 2nd stage boot loader for booting from RAID
partitions.  We do this by checking the NetBSD label to see if the
boot partition is of type RAID.  If so, we offset reads from the
disk so that the kernel image can be read.

Note that with this code, sun4 machines (with PROM monitor) will only
boot from RAID if the RAID partition is the first one on the disk.

Tested on a SPARCstation 20, a SPARCstation 2 and a 4/330.
2006-06-20 05:41:59 +00:00
mrg 433f408f95 struct filesystem is now struct fs_ops, since i don't know when. 2006-05-20 07:07:40 +00:00
uwe 6f95f80c91 It's free -> dealloc, not free -> size_t (hi, Christos :). 2006-01-25 22:42:16 +00:00
christos 606bb2caed free -> dealloc
unsigned -> size_t for alloc/dealloc
2006-01-25 18:28:25 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej 15adcb96b8 Move common Sun ID PROM definitions into <dev/sun/idprom.h>. 2005-06-19 20:00:28 +00:00
martin 0ad90d21c9 Do not rely on strings to which pointers are returned by promlib functions
to persist accross further promlib calls.
This fixes (at least) bootjs.net.
2005-04-27 07:59:47 +00:00
pk dca752e34a Make pmap_map() work on sun4 machines.
Thanks to Matthew and Julian for finding this.
2005-01-23 17:04:26 +00:00
pk 24bb95542f Add openfirmware() entry point. 2004-03-23 15:36:08 +00:00
pk 0c91b926ac Replace myetheraddr() by prom_getether(). Convert the file descriptor to
deivce tree node (if possible) to support the "local-mac-address' property.
2004-03-15 23:57:27 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
pk 48b10bb77d pmap_map_srmmu: use the `map-pages' Forth word to let prom map all pages
at once.
2003-10-24 09:48:08 +00:00
mrg 8a8d2aa063 sprinkle some: libkern.h, some -ffreestanding and some cast-y goodness,
all for the pleasure of the gcc 3 :-)
2003-07-30 15:58:36 +00:00
pk 95ca576fc1 pmap_map(): round up size to compute # of pages. 2003-07-10 09:00:33 +00:00
uwe 5fe7a8a85c Only JavaStations have OFW, so set cpu type to CPU_SUN4M in is_openfirm. 2003-06-28 00:59:09 +00:00
uwe 94e7210074 Drop redundant argument to printf("\n"). Obvious pasto. 2003-06-27 21:27:24 +00:00
hannken f2746edc5b Explicit cast for netif.
Approved by: Matthias Drochner <drochner@netbsd.org>
2003-03-13 12:02:54 +00:00
pk 1b5340d327 Add support for large kernels by searching for a physical memory segment
to fit it in. As a bonus, the kernel is now also mapped to the virtual
address (i.e. KERNBASE) it is linked at.
2003-03-01 13:01:55 +00:00
pk 4eb3db09d9 Move all `ID prom' stuff into the prom library. 2003-02-26 17:39:05 +00:00
pk dd87308a05 Note which network boot protocol we're trying. 2003-02-25 08:06:29 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
lukem aaa7dba035 - Enable NFS_BOOT_DHCP (as well as the existing NFS_BOOT_BOOTPARAM).
DHCP/Bootp is tried before bootparams in the MI nfs mountroot code.
- Change the order in boot.net from "bootparams then bootp" to
  "bootp then bootparams", to be consistent with the MI nfs mountroot code.

(Consistency with other NetBSD ports is good, and things still work
for sites that run bootparams but not dhcp/bootp, although I'd argue that
dhcp/bootp is much easier to setup and manage and is easier to debug
than our rpc.bootparamd...)

Per discussion with Paul Kranenburg and Matt Green.
2002-05-14 14:27:33 +00:00
lukem 37d1d9cf41 decommission old installboot; it doesn't work on bootxx anymore anyway. 2002-05-07 12:32:52 +00:00
uwe 8390d1903a Skip relocation if OpenFirmware already loaded us at the right address. 2001-11-21 21:38:00 +00:00
thorpej f16413a699 Rather than using nlist(3), use a magic structure with a magic
number that installboot(8) can search for.  Suggested by cgd@netbsd.org.
2001-10-30 05:13:09 +00:00
eeh 98ecb5b215 getprop* -> PROM_getprop* 2001-09-26 20:53:05 +00:00
mrg ca351acf50 avoid an unused variable warning 2001-08-05 03:03:16 +00:00
uwe 43adc87035 Save OpenFirmware client interface handler in romp, where it is
expected to be.  GC unused opf_romp variable.
2001-05-20 17:28:16 +00:00
pk 0929f3662e * Missing PROM_OPENFIRM: case in getdevtype() and prom_getether().
* In getdevtype(), use prom_instance_to_package() to get to the device node.

From Valeriy E. Ushakov on port-sparc@netbsd.org.
2001-04-04 15:41:46 +00:00
pk 13e03d4b43 On V0 proms, read the `idprom' property at the root node to get to the
station's ethernet address.
2001-01-18 12:50:10 +00:00
pk 4bddbd7e5f Align the DVMA mapping on NBPSG boundaries. 2000-10-31 23:28:11 +00:00
pk 44f6bd0d7f When relocating, there's no need to copy the BSS area. 2000-10-19 00:16:03 +00:00
jdolecek ab07c9d5a9 switch to sys/conf/newvers_stand.sh for generation of version file
sync the message in boot/version with other ports using newvers_stand.sh
2000-07-21 22:02:54 +00:00
fvdl 51e81216d1 Rearrange previous slightly to avoid getting values that are too low;
the only goal here is to leave some space for the stack.
2000-06-18 23:03:45 +00:00
fvdl 8dde6d4336 Account for the stack when computing the base va. This makes the
bootblocks work again on the 4/110.
2000-06-18 02:25:17 +00:00
pk cd955cb171 dvma_init: avoid integer variable overflow 2000-04-14 14:14:47 +00:00
pk 59742052ea Determine base address at run time. 2000-02-15 14:09:59 +00:00
pk 9bb753bb2e Nuke unused code. 2000-02-15 12:18:05 +00:00
pk d76bf6c906 Try both the BOOTPARAMS and BOOTP protocol (in that order). This also
takes care of PR#8738.
2000-01-22 12:34:57 +00:00
pk a96dbfa190 Remove inclusion of unused headers. 1999-11-08 23:29:05 +00:00