Commit Graph

223740 Commits

Author SHA1 Message Date
tsutsui 1b293e5d49 Add support to pass boothowto and bootdev info from bootloader to kernel.
Bootloader side changes:
- make boot command parse boothowto flags (-ads etc.)
- pass boothowto and bootdev info to the kernel via %d7 and %d6
  as the old 4.4BSD/luna68k kernel expected
- remove unused and now unnecessary "howto" (how_to_boot) command
- export and tweak make_device() in devopen.c to prepare bootdev info
- remove unused and commented out get_boot_device()
2014-01-11 08:08:23 +00:00
tsutsui 1a578d633f Add support to pass boothowto and bootdev info from bootloader to kernel.
Kernel side changes:
- use %d7 (boothowto) and %d6 (bootdev) to pass info and also use
  old macro in <sys/reboot.h> as ancient 4.4BSD did for simplicity
- add <machine/bootinfo.h> to define values as API to pass these info
- save boothowto and bootdev in registers right after zero'ing bss
- add MD device_register(9) to check booted_device per passed bootdev info
- merge old bootarg checks in rootconf() and luna68k_init() with
  tweaks for backward compatibility
  (direct boot a.out kernel from ROM monitor without bootloader still works)
2014-01-11 08:07:16 +00:00
matt f536e5d427 Don't pass -Wl,-x to ${CC} since that strips symbols needed by ARM BE.
Let the OBJCOPY strip them.
2014-01-11 02:45:52 +00:00
tsutsui f080c57575 Use the same address as LUNA to probe LANCE on LUNA-II.
It looks the device is mapped at both regions.
4.4BSD/luna68k probes it at 0xf1000000, but UniOS-Mach for LUNA-II
attaches the lance at 0xf0000000.  It is probably because
the UniOS needs to map DS1220 NVRAM (mapped at 0xf1000004 and
used to store the MAC address) to the different kernel page,
but there is no reason for us to use different addresses.
(Note our bootloader already use the same address for both machines.)

This change will make (forthcoming) booted device check easier.
2014-01-11 01:43:22 +00:00
matt 50d26cbd5b Don't use ${LD} -x because it screws up ARM BE.
Use ${OBJCOPY} ${OBJCOPYLIBFLAGS} instead so that $a/$d/$t are preserved.
2014-01-11 00:30:23 +00:00
matt 383316f200 Using ${LD} -x screws up BE arm. Use ${OBJCOPY} ${OBJCOPYLIBFLAGS} instead
so the $a/$t/$d symbols are preserved.
2014-01-11 00:18:15 +00:00
matt 964e3f260f byte swap the insn on BE8 it's LE in memory but needs to be BE to decode. 2014-01-10 23:52:53 +00:00
gson 341c8e68ed Remove comment that no longer applies. 2014-01-10 20:38:11 +00:00
njoly 5298a5a891 Regen. 2014-01-10 20:10:43 +00:00
njoly cc84e6774d Add NetBSD futimes/lutimes syscalls which does not exists on Linux. 2014-01-10 20:10:23 +00:00
njoly c21d61a30f Regen. 2014-01-10 19:45:43 +00:00
njoly a022633d69 Do not redefine linux syscalls arguments, just use compat ones
instead.
Include linux_socketcall.h to bring missing socket syscall
arguments/prototypes on arches that have socketcall(2).
Finally, cleanup rump linux syscall wrapper, to remove linux syscall
argument/prototype local copy.
2014-01-10 19:44:47 +00:00
christos 81c8b4d072 use __func__, EXIT_{SUCCESS,FAILURE} 2014-01-10 18:37:18 +00:00
matt dd17f39af9 Make sure to start BE-8 programs with the PSR[E] set. 2014-01-10 18:03:26 +00:00
matt 5f4d36326b Flush out the PSR definitions. 2014-01-10 17:48:11 +00:00
jakllsch f5ce59053c fix style and whitespace nits 2014-01-10 17:40:51 +00:00
pedro 3089b1af6a Fix a comment describing the check performed by copyin(); the value
checked against VM_MAXUSER_ADDRESS is derived from the source address,
not the destination address. OK rmind@.
2014-01-10 16:47:07 +00:00
pedro 65d0f0003c Prevent a diagnostic assertion in tmpfs_rmdir() from being triggered
through an rmdir on ".." by moving it so it happens after the check for
empty directories; OK rmind@.
2014-01-10 16:42:38 +00:00
christos 21d590390b make it clean after itself, use standard rules files 2014-01-10 16:41:16 +00:00
christos c664e0f599 include bsd.own.mk 2014-01-10 16:36:29 +00:00
christos 760092e27b don't include bsd.sys.mk 2014-01-10 16:35:11 +00:00
wiz 6c4455e96a Bump date for previous. 2014-01-10 16:28:34 +00:00
christos fca2a7349b not so fast, let's fix the tree first. 2014-01-10 16:20:14 +00:00
christos b393459455 Add protection against direct inclusion of this file from other Makefiles.
This file is only intended to be included from the other rules files like
bsd.lib.mk or bsd.prog.mk. If you need things to be defined early, use
bsd.own.mk.
2014-01-10 16:16:57 +00:00
christos 6ee57b9ada add .INCLUDEDFROM{FILE,DIR} 2014-01-10 16:12:52 +00:00
christos 2296f9ab5c we never include bsd.sys.mk directly. 2014-01-10 15:54:59 +00:00
christos fa1b665884 don't need to include anything before bsd.lib.mk since we don't use any
variables
2014-01-10 15:54:29 +00:00
christos b3bbae0374 Fix NOMAN 2014-01-10 15:52:25 +00:00
christos 19004dce49 don't include bsd.sys.mk 2014-01-10 15:50:34 +00:00
martin 6f65a8d103 ACTIVE_CC can only be used after include of bsd.own.mk 2014-01-10 15:00:16 +00:00
joerg 048d4146f6 Use format strings. 2014-01-10 11:29:24 +00:00
tsutsui 25e766da30 Reorgenize boot device configuration. The idea is taken from OpenBSD/luna88k.
- remove kernel-like autoconfiguration to probe bootable devices
- initialize SCSI and Ethernet controllers statically instead
- reorganize device softc structures per autoconf removal
- probe and print all SCSI disks (but don't assign unit numbers)
- make sdopen() to recheck the device and allocate softc dynamically
- use controller number and SCSI target ID (ctlr * 10 + id) to specify
  the boot disk on the "boot" command arg
- bump version to denote changes

Now bootloader works as the following:
---
>> NetBSD/luna68k boot, Revision 1.8 (Wed Jan  8 22:13:12 JST 2014)
>> (based on Stinger ver 0.0 [Phase-31])

Machine model   = LUNA-II
Physical Memory = 0x4000000  (64 MB)

sc0 at 0xe1000000: async, parity, ID 7
 ID 3: TEAC FC-1     HGF  10 rev , 512 bytes/sect x 2879 sectors
 ID 6: IBM DPES-31080 rev S31Q, 512 bytes/sect x 2118143 sectors
sc1 at 0xe1000040: async, parity, ID 7
 ID 6: MELCO DSC-G rev 1.00, 512 bytes/sect x 62533295 sectors
le0: Am7990 LANCE Ethernet, mem at 0x71010000
le0: Ethernet address = 00:00:0a:03:42:77

Press return to boot now, any other key for boot menu
booting sd(16,0)netbsd - starting in 0 seconds.
auto-boot sd(16,0)netbsd
1911696+96040 [280480+159179]=0x255a30
 :
2014-01-10 11:12:03 +00:00
martin 99caaa63e9 In the strcat test, smash the stack more severely (this all may depend
on alignment and stack frame details).
The gcc folks disagree with this test in general:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59750
2014-01-10 10:45:34 +00:00
wiz 252a57e3a8 whitespace. 2014-01-10 09:43:15 +00:00
pooka bbfd34f128 give err() some reason to avoid:
sysctl.c:2713:5: error: zero-length gnu_printf format string [-Werror=format-zero-length]
2014-01-10 09:38:56 +00:00
christos c0cdf73e1c Add a cleanup routine because if a test fails, the script exits and the
rest of the code is not executed.
Note that the cleanup routine is executed in a separate shell so environment
variables are not propagated and need to be set again.
2014-01-10 01:43:55 +00:00
msaitoh 5010e7e4fc Sync with pcidev's change. Rename PCI_PRODUCT_MARVELL2_88SE9128 to
PCI_PRODUCT_MARVELL2_88SE912Z. No functional change.
2014-01-10 01:43:52 +00:00
msaitoh 9fecef6533 regen. 2014-01-10 01:42:20 +00:00
msaitoh 4165b90127 Rework for Marvell 88SE9128. Change the description of 0x9123 to
88SE912[38]. For 0x91a3, add '(unclear)' into the description.
FreeBSD, Linux and http://pci-ids.ucw.cz have no such device.
2014-01-10 01:39:48 +00:00
christos 558f21b60f Undo previous; unfortunately the cleanup routine gets called in a different
shell so it can't cleanup stuff set in the environment of the first shell.
There are 2 problems:
	- calling the test routine directly does not cleanup (not using
	  atf-run)
	- when using atf-run, the cleanup routine needs state from the
	  running code which can only be stored in files. This will never
	  allow us to run tests in parallel since we need to keep a known
	  place to pass state.
2014-01-10 01:39:32 +00:00
christos beed3378d3 Make cleanup work as documented; note there are no tests testing that cleanup
works.
2014-01-10 01:16:07 +00:00
matt 4363eb2a4c Build BE ramdisks for BE MACHINE_ARCH's 2014-01-09 22:48:16 +00:00
christos 9682229fe5 regen 2014-01-09 22:37:44 +00:00
christos 07a9cab707 revert unintended changes 2014-01-09 22:37:18 +00:00
htodd 886ddaff87 Fix build. Only compile tested. 2014-01-09 21:14:53 +00:00
palle f08e82f640 sun4v: Update description of the ci_mmfsa field in the cpu_info structure 2014-01-09 20:28:23 +00:00
palle 5317e12d65 Coding style fixes (whitespace) - no functional changes 2014-01-09 20:13:54 +00:00
dholland b510fd7487 Clarify the behavior of the @machine and @machine_arch magic links
relative to uname output when running in emulations: the magic links
are *not* affected even though uname output changes.

(This means @machine magic links can be used for e.g. amd64 vs. i386
device nodes. There's also an @emul magic link for emulation.)

Noted by apb.
2014-01-09 18:55:41 +00:00
msaitoh 9a75aee207 regen. 2014-01-09 17:28:30 +00:00
msaitoh b22423017d Remove 88SE9128(0x913a) entry. At least one of 88SE9128 chip's
product ID is 0x9123. I have this one. Add new 88SE912X entry
with 0x9123. OK'ed by jakllsch.
2014-01-09 17:28:05 +00:00