Commit Graph

574 Commits

Author SHA1 Message Date
christos
3f9b5ba889 Explicitly set KERN_AS (this could be done in /usr/src/sys/conf/Makefile.*)
so that modules work, on config files that did not set it explicitly. All
the files now use the standard logic, except the ones that set KERN_AS=obj
and Makefile.usermode which sets KERN_AS=library.
2013-03-10 07:18:19 +00:00
tsutsui
ce149e43e7 Check netboot and set proper default boot device.
Also bump version.
2013-03-05 15:34:53 +00:00
christos
2c1aa36c3d Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it. 2013-03-02 02:42:07 +00:00
joerg
e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
tsutsui
28d94f130c Add proper padding to text section for elf2aout conversion.
The data and bss sections are 8 byte aligned on m68k ELF format,
but a.out header doesn't have section addresses and only
contains size values, so we have to pad size of text section
to make data section get aligned even after elf2aout.

Note elf2aout merges ELF data section into a.out text section
if binary is OMAGIC (i.e. text is writable too) so only
BSS section address was affected (and was almost harmless).
2013-01-26 16:00:04 +00:00
tsutsui
c7f5418230 Whitespace nits. 2013-01-26 15:46:24 +00:00
tsutsui
b8ac92c040 Fix offset of DS1287A NVRAM address on LUNA-II. 2013-01-26 15:44:14 +00:00
tsutsui
bcc38be16f Whitespace cleanup. 2013-01-22 15:44:25 +00:00
tsutsui
c22bdc7799 Umm, fix botch in previous. 2013-01-21 15:21:30 +00:00
tsutsui
1734677fd5 Account idepth properly in timer interrupt handler. 2013-01-21 14:42:24 +00:00
tsutsui
4fcb8dd65a Slightly modify sd attach message, as kernel does.
before:
 sd0: HITACHI DK315C-14 rev H7H6, 2807459 512 byte blocks

after:
 sd0: HITACHI DK315C-14 rev H7H6, 512 bytes/sect x 2807459 sectors
2013-01-21 13:21:04 +00:00
tsutsui
bd88a8a62d Add support for "await key" to abort autoboot and get boot menu.
Also add command help.  Bump version.
2013-01-21 11:58:12 +00:00
tsutsui
9861682a8f Remove unused bmcintr() function. 2013-01-20 14:03:40 +00:00
tsutsui
b8df2df834 No need to include <sys/systm.h> in standalone sources. 2013-01-20 13:35:43 +00:00
tsutsui
579d47ac73 Don't call internal cngetc() and cnputc() directly.
Use public getchar() and putchar() instead.
2013-01-20 07:32:45 +00:00
tsutsui
d9aac896c6 Use hex value rather than decimal for register and device macro. 2013-01-20 03:40:55 +00:00
tsutsui
02924be704 Add RCS Id. 2013-01-20 03:01:13 +00:00
tsutsui
f6f7d7a769 Specify text address via Makefile rather than hardcoding in boot.ldscript. 2013-01-20 02:35:13 +00:00
tsutsui
45be9f97eb Handle ddb symbol table loaded by the native bootloader properly.
- add a function that check if the symbol table is loaded and
  return the table size (taken from sun3/sun3/locore2.c)
 - calculate end of symbol table address in locore.s
 - call ksym_addsyms_elf() with proper args
2013-01-18 18:41:12 +00:00
tsutsui
c9074a0efd Make loadfile() accept OMAGIC a.out binary.
LUNA's ROM monitor assumes it.
2013-01-17 14:20:06 +00:00
tsutsui
c59be8f8b3 Add UFS2 support. Also bump version. 2013-01-16 15:46:20 +00:00
tsutsui
2379d33ecb Enable and add ls command for ufs. 2013-01-16 15:15:01 +00:00
tsutsui
457b347382 Make the default disklabel (for disks without label) have saner value.
I.e. use d_secperunit for RAW_PART rather than 0x1fffffff for part a.
2013-01-15 17:23:39 +00:00
tsutsui
e688173791 Use unsigned for device address. 2013-01-14 12:28:11 +00:00
tsutsui
37796b2d10 Remove hp300 specific select code and use proper hw address to match device. 2013-01-14 12:17:17 +00:00
tsutsui
37d243ed16 Remove unused hw_id and hw_id2 members from device info.
They are valid only on hp300.
2013-01-14 11:59:18 +00:00
tsutsui
4667f281b1 Fix drivers to make secondary SPC SCSI on LUNA-II work properly.
Also bump version.

Now we can load a NetBSD kernel from external SCSI disks on LUNA-II.
(and netboot on LUNA-II also works)
2013-01-14 01:37:57 +00:00
tsutsui
47bef335f9 Add netboot support.
Based on ews4800mips, mvme68k, and x68k standalone drivers.
Also bump version.

Tested on LUNA-I.

XXX: We really need proper documents about libsa APIs.
2013-01-13 14:10:55 +00:00
tsutsui
1b568fbf14 Remove unused function members from struct driver.
This makes adding other drivers easier.
2013-01-13 04:39:28 +00:00
tsutsui
cd7a099af6 Fix warnings on DEBUG build. 2013-01-12 13:39:47 +00:00
tsutsui
21a3724a5d Check cputype and set machine type (LUNA-I or LUNA-II).
Tested on only LUNA-I for now.
2013-01-12 07:11:59 +00:00
tsutsui
22214d94db Make sure to enable DTR and RTS on TX initialization for SIO console. 2013-01-12 07:04:57 +00:00
tsutsui
861825c6cf Make "disklabel" command print correct disklabel info.
- use exact-width interger types to define on-disk format
  (daddr_t could be a different size)
- use proper LABELOFFSET to locate BSD disklabel
  (LABELOFFSET for luna68k is 64 as 4.4BSD-Lite2 while other
   ports that use sun_disklabel use 128)
2013-01-10 16:20:11 +00:00
tsutsui
025f932688 Use proper asm symbol macro. 2013-01-10 16:03:49 +00:00
tsutsui
e6f39a252a Revert to using elf2aout(1) to build a.out binary.
a.out binary linked by ldscript doesn't work on some uncertain conditions.
2013-01-10 15:51:32 +00:00
tsutsui
878cadeca4 Link the target boot binary as a.out directly rather than using elf2aout(1).
Confirmed working on LUNA-I.
2013-01-10 13:10:26 +00:00
tsutsui
25290fa604 Make sure to print proper bootprog name in banner. 2013-01-09 16:28:41 +00:00
tsutsui
fce6f7dfc3 Build and install resurrected luna68k bootloader. 2013-01-06 07:04:48 +00:00
tsutsui
df6945b89f First cut at NetBSD/luna68k native bootloader.
Based on 4.4BSD-Lite2/luna68k "Stinger" loader revision "Phase-31"
 http://svnweb.freebsd.org/csrg/sys/luna68k/stand/
and MI libsa glue stuff are taken from hp300 etc.

Tested on LUNA-I and old DK315C SCSI disk drive.

LUNA's monitor PROM can load only an a.out binary in 4.3BSD FFS partition
(i.e. created by "newfs -O 0") on disks with OMRON's UniOS disklabel,
but now we can load an ELF kernel in root partition via this bootloader.
(See luna68k/disksubr.c for details of UniOS label)

TODO:
 - LUNA-II support (check 68040 to adjust cpuspeed for DELAY())
 - secondary SCSI support for LUNA-II
 - netboot via le(4) (should be trivial)
 - support boot options on bootloader prompt
 - bootinfo (passing info about booted device and kernel symbols)
 - support "press return to boot now, any other key for boot menu" method
   like x86 bootloader (needs cnscan() like functions)
 - tapeboot (anyone wants it?)
2013-01-05 17:44:24 +00:00
apb
5c7419e70f Add commented out "#options COMPAT_60" to all kernel configuration files
that already had commented out "#options COMPAT_50".
2012-10-17 14:49:40 +00:00
apb
f3929b106b Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
2012-10-17 14:48:07 +00:00
tsutsui
9df3c44752 struct device * -> device_t, use device_xname() (from chs@) 2012-10-13 06:16:18 +00:00
abs
3267a6b9fe Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
  and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
2012-08-17 20:11:37 +00:00
tsutsui
6035e27320 Appease gcc -fno-common:
- initialize cn_tab at runtime in pre-main luna68k_init()
Tested on LUNA.
2012-08-10 12:48:14 +00:00
mlelstv
8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +00:00
matt
a971ba5943 Remove declartions of physmem 2012-07-28 19:08:22 +00:00
tsutsui
f952e34eb4 Handle bootarg strings passed from firmware prompt properly on LUNA-II.
LUNA-II seems to use a different vector from LUNA to pass bootargs.

Now we can specify RB_ASKNAME and RB_SINGLE at boot on LUNA-II.

Should be pulled up to netbsd-6.
2012-07-28 17:33:53 +00:00
matt
f96ef7b3c5 Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
2012-07-27 05:36:09 +00:00
tsutsui
d756dcd32c Make reboot(2) actually work (don't access %sp after MMU is turned off).
Also cleanup spaces and #if 0'ed code.  Tested on both LUNA and LUNA-II.

Should be pulled up to netbsd-6.
2012-07-23 15:10:17 +00:00
tsutsui
cf893e7db3 Switch luna68k wscons framebuffer driver to using rasops(9) APIs instead of
deprecated rcons(4).  This allows "options FONT_foo" in kernel config files.
Mostly taken from OpenBSD/luna88k, but unnecessary MI rasops(9) stuff is
omitted since omrasops.c has own raster wsdisplay_emulops functions.
Tested on LUNA with 4bpp fb and LUNA-II with 1bpp fb.
2012-07-20 19:31:53 +00:00