Commit Graph

753 Commits

Author SHA1 Message Date
scw
d11562c429 A couple of minor functions which return pointers need to do so in %a0 now.
Spotted by Chuck Silvers.
2000-12-22 20:57:21 +00:00
scw
00627955a1 Some minor optimisations to avoid checking {cpu,mmu}type when
the kernel was built for only one type of CPU.
2000-12-20 16:53:50 +00:00
scw
4350a7f2b7 Unification of the m68k syscall() function. 2000-12-19 21:09:54 +00:00
bouyer
c71f40d166 Add pseudo-device vlan 2000-12-19 10:42:02 +00:00
scw
e82303a96d s/MDECDIR/MDEC_DIR/ 2000-12-18 21:27:01 +00:00
jdolecek
cacec11253 delete obsolete comment 2000-12-17 15:52:39 +00:00
scw
5cabdd3709 Some snippets of documentation for mvme68k... 2000-12-14 20:30:14 +00:00
jdolecek
ca57e681bd g/c obsolete vtrace(2) stuff 2000-12-13 18:13:05 +00:00
scw
5d5ebb1b73 Simplify the reboot code:
Always jump through the PROM's reset vector, regardless of board type.
  Fix a stack offset problem in the mvme147 reset code path.
2000-12-10 20:00:21 +00:00
scw
8ace7abc75 A small splx()/spl0()/soft interrupt related optimisation. If we're
dropping to spl0, use inline code to check if a soft interrupt is
pending instead of taking the hit of a function call to do the check.
2000-12-10 18:43:02 +00:00
scw
c5b6f43634 Define splzs()' to be splserial()' instead of `spl4()', which was
wrong anyway since it blindly set SPL to 4 regardless of the prevailing
level.
2000-12-10 18:00:24 +00:00
scw
1a0a12c5b4 Bah. Somehow the a.out versions of the bootxx symbols got deleted; put
them back.
2000-12-09 22:33:24 +00:00
scw
a3dc741c03 Delete the commented out EXEC_ELF32 now that it's in std.mvme68k.
(Spotted by Simon Burge)
2000-12-09 21:02:09 +00:00
scw
3c748b810f Missed this one in yesterday's bootloader commits:
Change BUGCRT from bugcrt.o to bugstart.o.
2000-12-07 21:37:51 +00:00
scw
3f7cfb70ef Add "options COMPAT_AOUT_M68K". 2000-12-07 08:40:06 +00:00
scw
ac80517816 Add some #defines for offsets into the bugargs structure, and make the
register names usable within assembly code.
2000-12-05 21:57:13 +00:00
scw
86c7dac956 Replace the startup C code with assembler, which avoids having to
explicitly tell the compiler what registers the Bug args come in on.
2000-12-05 21:54:33 +00:00
scw
7da5cde117 bootxx doesn't need the code relocating stub linked in. 2000-12-05 21:51:38 +00:00
scw
634dc65636 Backout the last change; I'll deal with it another way. 2000-12-05 19:54:09 +00:00
scw
1f9f7cbe53 UPAGES -> 2 as recommended by Chuck Silvers. 2000-12-05 18:46:10 +00:00
scw
2ec144518f Add loadfile_machdep.h to list of installed machine headers. 2000-12-05 18:42:18 +00:00
scw
37f5782c0a Update pm_stats.resident_count when entering pages in the kernel pmap. 2000-12-05 16:07:39 +00:00
scw
bfcd71c79c Clean up the build process to ensure libsa/libbug are built
before linking the bootloaders.
2000-12-04 21:25:57 +00:00
scw
349445391c Make this work with the ELF tape bootloader. 2000-12-04 21:24:34 +00:00
scw
5a17a935bc Declare start' in addition to _start'. 2000-12-04 20:31:16 +00:00
scw
269a30a733 s/a6/fp/ again... 2000-12-04 18:48:18 +00:00
scw
e267f2466b Add support for ELF boot blocks. 2000-12-04 18:44:51 +00:00
scw
b29bcb645b The LOAD_TEXTA flag is required when loading a.out kernels.
Also add some non-standalone versions for the benefit of installboot(8).
2000-12-04 18:41:51 +00:00
scw
c28723715c Prefix the register names with `%'. 2000-12-04 18:40:05 +00:00
scw
d0da91f9e2 Use -fomit-frame-pointer when compiling bugcrt.c; a6 needs to be reserved
for Bug arguments.
2000-12-04 18:35:16 +00:00
scw
9fc2cc70dc Include the a.out m68k compatibility module. 2000-12-03 15:40:06 +00:00
scw
2e68384b0c Back out the previous change after discussion with thorpej and cgd. 2000-12-03 15:38:30 +00:00
scw
53323bf36d Revert the previous change, after discussion with thorpej and cgd. 2000-12-03 15:37:46 +00:00
scw
57b29e6754 Fix symbol table loading. 2000-12-02 17:28:08 +00:00
scw
6de7ccd2d3 On exit from syscalls, don't trash %A0 if the process is
using the COMPAT_AOUT_M68K emulation package.
2000-12-02 17:00:46 +00:00
scw
e4326b372a Set things up so that DDB can get to the symbol table in ELF kernels. 2000-12-02 13:57:05 +00:00
scw
66a84140b8 Use "EMUL_HAS_SYS___syscall" instead of checking p->p_emul.
Removes dependency on COMPAT_AOUT_M68K.
2000-12-02 13:45:14 +00:00
tsutsui
a8fdbdec1c Remove unused pcbb() macro. 2000-12-01 17:57:43 +00:00
scw
97490c9997 Add __attribute__((__packed__)) to cpu_disklabel to get around
the ELF padding/alignment constraints.
2000-12-01 00:02:22 +00:00
scw
75f2f8f242 Delete an extraneous underscore in the last commit. 2000-11-30 23:47:45 +00:00
scw
bd8955b9b6 Only try to attach those devices which have been configured
in the kernel config file.
2000-11-30 22:54:31 +00:00
scw
c4a189ad74 Print some more details of the memory managed by each ASIC. 2000-11-30 22:51:35 +00:00
scw
ba98135ea8 Add EXEC_ELF32 2000-11-30 22:31:27 +00:00
scw
7051df32f5 Support booting an ELF kernel, plus numerous tweaks due to
the gas.new/ELF transition.
2000-11-30 22:26:26 +00:00
scw
9121962f0e Copy the syscall return value into A0, as per the SVR4 ABI.
Also prepare for COMPAT_AOUT_M68K.
2000-11-30 21:29:11 +00:00
scw
d3251e5074 Prepare to switch mvme68k bootloader over to the MI loadfile(). 2000-11-30 21:20:43 +00:00
scw
7248616dee Ditch an extra % in a register prefix, and s/a6/fp/ 2000-11-30 21:18:07 +00:00
scw
614e494d9e Add register prefixes. 2000-11-29 09:18:32 +00:00
scw
930411f925 Missed a couple of register prefixes... 2000-11-29 09:11:53 +00:00
scw
fecb49d172 Add register prefixes. 2000-11-29 09:09:39 +00:00
jdolecek
17a9fd0da5 split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
2000-11-26 11:47:23 +00:00
scw
a643cf07a5 Add the memory controller ASIC driver. 2000-11-25 21:46:42 +00:00
scw
46d0d060fd Oops, missed a trailing comma ... 2000-11-25 21:06:12 +00:00
scw
eff5b700a8 Enable compatibility for earlier releases. 2000-11-25 20:35:32 +00:00
scw
ee58c485bf Add CD9660, plus some general cleanup. 2000-11-25 19:33:39 +00:00
scw
2aa72fcec2 Include the cd9660 filesystem and cd(4). 2000-11-25 19:21:50 +00:00
scw
5529847b99 Don't base this on the GENERIC config file; there's too much
unnecessary bloat in it for an installation kernel.
2000-11-25 19:18:46 +00:00
scw
636c4f5c12 G/C some long-obsolete functions. 2000-11-25 18:49:59 +00:00
scw
73e60771ab Fix the code which probes the memory controller ASICs. We can now
deal with the 2nd one not being present.
2000-11-25 11:25:07 +00:00
scw
2129dff0f7 The ramdisk now needs 1024 blocks. 2000-11-24 19:40:15 +00:00
scw
bf5610e667 Some minor optimisations. 2000-11-24 14:49:44 +00:00
scw
55ecb0e64a `emul_sunos' is now declared in the appropriate header file. 2000-11-24 10:29:21 +00:00
scw
dcd1f30fb8 First cut of a driver for the Memory Controller ASICs found
on mvme16x and mvme17x boards.
2000-11-24 09:42:09 +00:00
scw
7d191ffe77 Revamp the bus_space(9) implementation:
. use a structure for the tag instead of an integer constant,
 . add bus_space_{peek,poke}_N() (and G/C `badaddr()'),
 . fix a few drivers which have dependencies on the implementation.
2000-11-24 09:36:40 +00:00
scw
a70c48655b Add a bus_space_tag_t field to the mvmebus_softc structure and
initialise/use it in the ASIC-specific back-ends.
2000-11-24 09:27:42 +00:00
scw
06e91c089b Replace the inline C versions of bus_space_{read,write}_N() with
inline assembler. This generates significantly more efficient code,
and trims ~1KB off the size of an mvme68k GENERIC kernel...
2000-11-24 09:05:55 +00:00
scw
7bd36d34a1 Use the MI md_root.c. 2000-11-24 08:54:08 +00:00
tsutsui
161004f8c3 s/struct const sysent/const struct sysent/
(BTW, luna68k was missed in emul/execsw changes?)
2000-11-21 23:19:42 +00:00
scw
f86349723d Put the call to mvme68k_init() back where it was originally. 2000-11-21 22:08:04 +00:00
tsutsui
2c7e91a09e Define proper macros for FP frame offsets rather than magic numbers. 2000-11-21 13:54:13 +00:00
scw
f33cb83f53 Call zs_set_speed() to calculate the initial timing constants. 2000-11-21 11:41:37 +00:00
jdolecek
baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
scw
b6f0a678dd Add support for the m68060-based machines: MVME-172 and MVME-177.
CPU support taken from a combination of NetBSD/amiga and NetBSD/x68k.

At this time, MVME-172 works but MVME-177 is untested. Since the '177
is otherwise identical to the MVME-167, this should *just work*.
2000-11-20 19:35:28 +00:00
chs
c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
scw
a29dff3290 Fix a braino in the last commit. 2000-11-18 22:46:07 +00:00
scw
4b0eb0e2dd Allow a degree of tolerance when calculating the baudrate timing constant. 2000-11-18 22:34:25 +00:00
scw
d00258d484 bus_dmamem_map() expect a cpu-relative physical address... 2000-11-16 19:12:20 +00:00
scw
598ce19336 Doh! Revert all but the baudrate clock changes from that last commit;
a bunch of local stuff crept in.
2000-11-15 21:32:03 +00:00
thorpej
ecf0470012 We use 4K pages on the mvme68k. Override PAGE_SIZE and friends to
be compile-time constants.
2000-11-14 19:12:58 +00:00
scw
d7b439dff5 udp.c is now needed in SRC_sa. 2000-11-11 11:36:17 +00:00
scw
096c3068dd The ZS chips are actually clocked at 5MHz and 10MHz on mvme147 and
mvme162 respectively. Thanks to Neil Lubdan and a frequency counter. :-)
2000-11-09 19:51:57 +00:00
itojun
0c84fad435 more rnd(4). 2000-10-04 22:26:49 +00:00
itohy
c2672f184b Fix the type of pmap_zero_page_uncached from void (paddr_t) to
boolean_t (paddr_t) to make it compile again.
2000-09-28 03:41:50 +00:00
jdolecek
b1f94e26ab don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
2000-09-24 15:59:26 +00:00
jdolecek
49c105ffdb add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
2000-09-24 12:32:31 +00:00
scw
5f6802db57 Add pmap_zero_page_uncached(), and the PMAP_PAGEIDLEZERO macro. 2000-09-22 08:27:00 +00:00
scw
0161d6a880 Pass the requested cpu irq priority through to the VME chipset-specific
backend.

The VME2chip can use this to translate a VMEbus irq to a cpu irq.

The VMEchip (on mvme147) can't deal with the VMEbus irq and cpu irq
being different so we just panic in that case for now.
2000-09-19 19:35:52 +00:00
scw
18deccffca Add IPL_SERIAL. 2000-09-19 19:31:34 +00:00
scw
53d57897d0 Use the complete ethernet address stored in nvram on mvme162/mvme167
instead of faking the first 5 nibbles a'la mvme147.

Apparently recent mvme16x boards have a new 5 nibble prefix...
2000-09-15 08:50:24 +00:00
thorpej
72a24b4eae Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
2000-09-13 15:00:15 +00:00
scw
4bf2309112 Partially back-out the previous change. What was I thinking... 2000-09-09 19:51:36 +00:00
scw
7f3786d36a Add preliminary support for the MVME162-LX 200/300 series of boards.
Currently, the major onboard devices are supported (disk, network,
rs232 and VMEbus). However, work is still need to support the remaining
devices (eg. IndustryPack sites).

These boards are available with a dazzling array of build options. At
this time, the following options are *required*:

	o Real floating point hardware (the 68LC040 model isn't tested),
	o The VMEchip2 must be present,
	o If offboard VMEbus RAM is not present, at least 8MB of onboard
	  RAM is required.
	o Even if offboard VMEbus RAM *is* present, at least 4MB of onboard
	  RAM is required. (Boards with 1 or 2MB onboard RAM *can* be
	  supported with offboard RAM, but not without some funky values in
	  the VMEbus Master mapping registers.)

There is no support for boards other than those in the -LX 200/300 series.
2000-09-06 19:51:42 +00:00
thorpej
4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
scw
da7dfaefcc Though the VMEchip2 documentation is not explicit on the subject, a
VMEbus analyser confirms that D8 transfers are possible on all the
master ranges.
2000-08-23 08:13:14 +00:00
thorpej
58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
scw
72f826d727 A VMEbus RAM board configured for use by mvme68k can now be
treated as just another available VMEbus slave image as far as
bus_dma(9) is concerned.

To preserve faster onboard memory, mvmebus_dmamem_alloc() will
allocate first from the offboard VMEbus RAM slave image if present,
and assuming its address modifier matches the caller's constraints.
This can be overidden by specifying the BUS_DMA_ONBOARD_RAM flag.
2000-08-21 20:50:13 +00:00
scw
3cac59ee4f Expand on how VMEbus master addressing modes are specified, to better
deal with dynamic address modifier generation based on the CPU's
function code pins.

Also implement VMEbus slave mode for mvme147. (Not yet 100% working.)
2000-08-20 21:51:31 +00:00
thorpej
a86d1f4891 Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
2000-08-20 21:50:06 +00:00
scw
3f2adcb2b0 Checkpoint of code to add VMEbus slave support using vme_dmamap* and
vme_dmamem*.

This is still a work in progress, but seems to DTRT on mvme167 so far.

TODO:
	. Get VMEbus slave mode going on mvme147. This should be easy.
	. Fix up the A16 slave mappings.
	. Bounce buffer support. (Messy, but pretty much a `must have'.)
	. Figure out how to deal with `location monitor' interrupts
	  within the framework. (Useful for Busnet, among other things.)
	. It would be nice to make use of the VMEchip2's DMA facilities...
2000-08-20 17:07:41 +00:00
scw
b77bc217e1 Pull a bunch of common code from vme_pcc.c and vme_two.c into
the new mvmebus.[ch] files, and put down some initial code to
deal with VMEbus slave mode.
2000-08-13 17:00:51 +00:00