Commit Graph

235 Commits

Author SHA1 Message Date
gwr
c669b1bdeb Do the cpu_kcore_hdr initialization a little differently.
(also fix - was not setting pg_frame, pg_valid)
1997-10-05 20:43:27 +00:00
gwr
6b27a0d34f Make cpu_reboot un-blank the screen (cnpollc(1)).
Validate space in page zero for the kcore header.
1997-10-04 20:03:46 +00:00
gwr
0ec1cda62f Move the call to cninit() up a level (easier to find). 1997-10-04 19:46:17 +00:00
gwr
3c0178f33d Make msgbuf stay in page zero 1997-10-02 01:15:04 +00:00
leo
d4713d24c2 Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
1997-09-19 13:52:37 +00:00
mycroft
a9155c5057 Set the status word as well, and remove a bogus comment. 1997-09-12 10:29:20 +00:00
mycroft
982f24e698 Always initialize all registers in setregs(). 1997-09-12 07:00:30 +00:00
mycroft
16a8787248 Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)
1997-09-11 23:01:44 +00:00
jeremy
bbf76eb63e Implement pmap and va caching within C table managers to help speed
up PV->(pmap,va) operations.
1997-07-02 03:23:57 +00:00
mrg
552af779d2 bring mrg-vm-swap2 onto mainilne. 1997-06-12 15:46:19 +00:00
veego
6cf26b26ae s/_round_page/m68k_round_page/ s/_trunc_page/m68k_trunc_page/
s/_btop/m68k_btop/ s/_ptob/m68k_ptob/
1997-06-10 19:42:25 +00:00
veego
6dbfc7764b s/_round_page/m68k_round_page/ 1997-06-10 19:37:58 +00:00
veego
b1dc6a8603 s/_trunc_page/m68k_trunc_page/ 1997-06-10 19:36:53 +00:00
veego
a204fb7981 Initialize machine from MACHINE. 1997-06-08 23:54:19 +00:00
jeremy
3f6f86d875 Undo changes which make pmap_xxxx_page() functions re-entrant; just block
all interrupts which might cause re-entrancy.

Allow virtual addresses which are not managed by the MI VM system to
participate in the PV system.

Remove a few frivoulous TLB cache flushes.
1997-05-30 07:02:14 +00:00
gwr
e512003d6e Add non-inline version of _splraise. 1997-05-29 22:20:01 +00:00
jeremy
1b2aae80c2 Added new lock system for the two virtual pages used in temporary mappings.
Allows pmap_zero_page() and pmap_copy_page() to be re-entrant.
1997-05-28 04:28:52 +00:00
jeremy
b53e0d4fb7 Coded to work with new lock system for tmp_vpages. 1997-05-28 04:27:00 +00:00
jeremy
0304ff6aed Implement code to dynamically size the number of page tables based on available
RAM at boot.

Also did some cleanup of unused functions, updated several comments, and
removed unecessary 'XXX's.
1997-05-20 06:01:19 +00:00
gwr
a83cf310c1 The Hydra is 20 MHz and the Pegasus is 33 MHz. 1997-05-14 16:45:22 +00:00
gwr
5079510304 Make the "hydra" call leds_hydra() from clock_attach(). 1997-05-14 16:42:45 +00:00
gwr
b209530013 Remove call to leds_init (it is already in obio_init). 1997-05-14 16:13:31 +00:00
gwr
1aa91b893d Eliminate references to vmspace.vm_pmap
(also fix some comments).
1997-05-13 17:17:12 +00:00
jeremy
3d8d0c485c Add call to leds_init() after everything has started up ok. 1997-05-11 06:15:09 +00:00
jeremy
3f7423a432 Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)
1997-05-02 23:07:35 +00:00
gwr
24af362f60 Implement pmap_pa_exists() so that /dev/mem works.
This was the reason ps (kvm_getargs) did not work.
1997-05-01 15:00:11 +00:00
gwr
b9a0ca59bb oops... 1997-05-01 14:58:20 +00:00
gwr
42f8cf900b Use unsigned when doing copy/xor check. 1997-04-28 23:43:56 +00:00
gwr
cb96a536e4 Add a comment about obio_mapin(). 1997-04-28 23:38:47 +00:00
gwr
1046c915b6 Drivers that use obio_mapin should enforce OBIO attachment
(just to be paranoid).
1997-04-28 23:30:19 +00:00
gwr
678f326c7f Make idprom_init() figure out where the IDPROM resides.
Add autoconfig glue, which currently just shows the
address where the IDPROM was found.
1997-04-25 19:02:06 +00:00
gwr
4c64781365 Moved the actual model identification work into identifycpu(),
which used to be in _startup.c:_verify_hardware().
Use sunmon_abort() in cpu_reboot() for now...
1997-04-25 18:52:11 +00:00
gwr
9ae1b69554 Rename "Idle" to "_Idle" so clock.c can reference it. 1997-04-25 18:48:39 +00:00
gwr
25d7b6b348 Provide a struct representing only the clock. 1997-04-25 18:47:41 +00:00
gwr
885a1fc439 Add /dev/leds support. 1997-04-25 18:46:10 +00:00
gwr
2dd63e3378 Use bus_mapin, and minor tweaks. 1997-04-25 18:45:39 +00:00
gwr
f7749f47fe Add "oclock" support for the Sun3/470. 1997-04-25 18:31:37 +00:00
gwr
8f9276c727 Move the _verify_hardware() work into machdep.c:identifycpu().
Call obio_init() after _vm_init() so we can use peek_byte() to
probe the idprom.  Be quiet in _save_symtab() when all is well.
1997-04-25 18:29:58 +00:00
gwr
477a320277 Moved bus_scan() and bus_print() here from autoconf.c
because they are now different in sun3 vs sun3x.
1997-04-25 18:02:47 +00:00
gwr
3619a4da3d Rename obio_alloc to obio_mapin, update *_init declarations.
Remove OBIO_P4_REG (not a fixed address, but per-device).
1997-04-25 18:00:49 +00:00
gwr
963c410824 Change the OBIO address probe order a little, to allow determination of
which kind of idprom and clock we have (3/80 vs 3/470 differences).
Fix a bug where obio_submatch() failed to copy some locators.
Rename obio_alloc to obio_mapin.  Add lots of comments.
1997-04-25 15:35:27 +00:00
thorpej
48fa8154e7 Adjust for <m68k/m68k/trap_subr.s> 1997-04-25 01:49:05 +00:00
thorpej
f05b58b229 Use common m68k sigcode. 1997-04-13 02:37:15 +00:00
thorpej
a2be180b39 Adjust for new kcore.h 1997-04-09 21:00:35 +00:00
thorpej
00c04fe742 Use <m68k/m68k/proc_subr.s> 1997-04-09 20:58:33 +00:00
jeremy
b7dd41d4e2 Location of printer port registers for 3/80 was off. 1997-04-09 04:42:25 +00:00
gwr
b5f838ad77 Add a comment. 1997-04-04 20:48:59 +00:00
jeremy
68755b199e Physical page status functions pmap_clear_reference()
and pmap_clear_modify() weren't testing if the page whose status was being
changed was being managed.  This caused kernel panics with X11.
1997-04-01 02:15:33 +00:00
jeremy
b572daa4dc In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements.  Thanks to
jthorpe for pointing this out.
1997-03-31 02:22:25 +00:00
thorpej
2268a2c7eb Don't allocate mclrefcnt[]; it's dead and gone. 1997-03-27 21:01:52 +00:00
gwr
c29412f1bb fix a warning 1997-03-26 23:27:12 +00:00
gwr
37b247edde Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/ 1997-03-26 22:42:13 +00:00
gwr
90a79f75fe Change continue to break in a few places (as suggested by mycroft). 1997-03-24 23:49:39 +00:00
gwr
7c0bd080c9 No longer force boothowto=RB_SINGLE|RB_KDB
(Yes, it goes multi-user just fine! 8^)
1997-03-24 17:57:12 +00:00
gwr
c874276d35 First cut at crashdump support. 1997-03-21 22:46:05 +00:00
gwr
4663c4fa2a Sync with the sun3 version. 1997-03-18 23:49:07 +00:00
gwr
d531b1ed42 s/fpu_type/fputype/g 1997-03-17 19:03:11 +00:00
thorpej
b6f3695cd1 Use <m68k/m68k/support.s> 1997-03-16 11:04:52 +00:00
gwr
2f598d011a Sync with sun3 (Trap 1,2,15 handlers) 1997-03-13 20:46:37 +00:00
gwr
ee531cb3c9 s/sun3x_/_/ in sun3x_(round|trunc)_(page|seg) macros 1997-03-13 17:40:33 +00:00
gwr
51cfd7ed4d Get the numbers of kernel MMU tables right. 1997-03-06 05:16:34 +00:00
gwr
9a79f92460 Clean out some junk I forgot to remove last time... 1997-03-06 00:15:56 +00:00
gwr
a4e5a18b63 Add pmap_bootstrap_setprom() with sets the PROM level-A tables to
allow the PROM monitor to see mappings in kernel space.  This also
fixes a problem with exiting to the monitor with the stack pointer
set to some place in kernel space.  Also fix NUM_KERN_PTES, and
change get_pte() so it works on any virtual address.
1997-03-06 00:04:18 +00:00
gwr
3ca8e4699d Add pmap_bootstrap_setprom 1997-03-05 23:55:54 +00:00
gwr
201bc0aa96 Add ptest_addr 1997-03-05 23:54:08 +00:00
gwr
da2622290c Allow access to the PROM via /dev/kmem (like the sparc port) 1997-03-05 23:02:29 +00:00
gwr
63221bf3b2 Fix race conditions that allowed the interrupt latch register to have
the wrong value.  Now using the <m68k/asm_single.h> stuff from Leo.
1997-03-05 22:22:11 +00:00
jeremy
c0b46da054 Use IOMMU_PAGE_SIZE instead of NBPG, since theoretically the IOMMU page size
is different than the CPU page size.
1997-03-03 06:51:42 +00:00
jeremy
290f55615a Took switch statement out of main loop in pmap_protect() and explained more
of the rationale behind it.
1997-03-02 07:59:21 +00:00
jeremy
202a9fe423 Added some more comments and disabled removal of DVMA alias mapping from
kernel space in dvma_mapout() as it may cause problems with the current
pmap_remove().
1997-02-24 01:37:52 +00:00
jeremy
689b14f477 Get rid of inclusion of pmap_pvt.h and use the standard pmap functions for
mapping.
1997-02-24 01:35:33 +00:00
gwr
eb84168030 Suport size=4 in bus_peek(), and clean out some junk. 1997-02-22 19:27:18 +00:00
jeremy
0b6a4ac7bb Make the device attach output look more like the SPARC iommu. 1997-02-22 04:02:39 +00:00
jeremy
d6034ecf66 Add page size constant, since I/O mapper page size may differ from cpu page
size.
1997-02-22 04:01:04 +00:00
jeremy
996c634929 Rewrite pmap_remove() to be speedier with large address spaces. 1997-02-22 03:18:30 +00:00
gwr
900bc3f621 Add OBIO_EMULEX_SCSI, and some comments about attach order. 1997-02-21 20:33:09 +00:00
jeremy
043293d2da Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.
1997-02-20 00:54:21 +00:00
gwr
c14237282d Make this use sys/dev/clock_subr.[ch] 1997-02-19 23:38:46 +00:00
gwr
1b7813bc35 Just M68030 is enough. 1997-02-19 15:59:21 +00:00
gwr
eb8bfe4829 Forgot the quotes (slow down...) 1997-02-19 15:55:33 +00:00
gwr
62bb836d73 Oops... need to define M68020 for copy.s 1997-02-19 15:54:26 +00:00
jeremy
035b20b171 Update copyright and fix typos in macro definition used when not debugging. 1997-02-19 04:17:32 +00:00
gwr
d2a3410f0c Moved straytrap() to trap.c (and minor cleanup) 1997-02-18 15:53:15 +00:00
gwr
e61bb6f903 Define "cold" over in autoconf.c 1997-02-18 15:30:01 +00:00
gwr
201c1f178e Move bus_peek(), bus_mapin() here from autoconf.c so the latter
may be shared with the sun3 port.
1997-02-18 14:58:32 +00:00
gwr
7190ad9936 Fix a major bug in pmap_remove_kernel() that causd the removal of
one page too many (worse, it unmapped our stack page... Ouch!)
Also, use loadcrp() and such instead of calling pmap_activate
in various places so we have more control over TLB flush.
Now pmap_activate() is called only by locore (and that call is
done only if PMAP_DEBUG is defined).  Other minor clean-up...
1997-02-16 19:38:08 +00:00
gwr
f01121ece4 Moved sendsig(), sys_sigreturn() to sun3/sig_machdep.c
Moved regdump() and friends to sun3/regdump.c
1997-02-14 20:00:51 +00:00
gwr
7275a8976f Add pmap_count(), fix some bugs... (from Jeremy). 1997-02-14 03:56:49 +00:00
jeremy
8869e895a8 Convert meaningless '0' into a more human readable 'IOMMU_PDE_DT_INVALID'. 1997-02-13 07:38:21 +00:00
gwr
27b8c79679 Latest version from Jeremy. Changes too numerous to describe here. 1997-02-12 23:09:32 +00:00
gwr
c4fa121f14 Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code.  The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.
1997-02-12 23:06:27 +00:00
gwr
3476b1d4a4 Adapt to changes in pmap.h 1997-02-12 23:03:14 +00:00
gwr
6cb54de668 Avoid dereferencing null curproc in dumpmem(). 1997-02-12 16:06:18 +00:00
gwr
bb7dc881a3 Force RB_SINGLE for now (in addition to RB_KDB). 1997-02-12 16:04:33 +00:00
gwr
05a09b938e Must convert from/to BCD when reading/writing the clock chip. 1997-02-12 16:00:31 +00:00
gwr
6ef591a70b Add a few more coments. (i.e. why init a6=0) 1997-02-11 19:06:08 +00:00
gwr
f914f723de Add NBPG 1997-02-11 19:02:30 +00:00
gwr
7bd7620f61 Sync with sun3. 1997-02-11 00:56:08 +00:00
gwr
165a7a3eeb Put all the name/value pairs in an initialized array of structures
so that this can be compiled to assembly code and then translated
directly into assym.h by a simple awk program (genassym.awk).
This program can still be run the old way for verification.
1997-02-03 19:31:44 +00:00
thorpej
8501929f45 Use copypage() and zeropage() in the right places. 1997-02-02 08:41:10 +00:00
thorpej
adcdf4cc59 zeropage -> devzeropage, and make it static. 1997-02-02 08:39:55 +00:00
thorpej
8d00d8cb60 Remove an un-true comment. 1997-02-02 08:38:51 +00:00
thorpej
95e30218f2 Declare and set cputype and mmutype. 1997-02-02 08:36:39 +00:00
gwr
5f1abbe73b Add OBIO_EMULEX_SCSI 1997-01-27 22:42:44 +00:00
gwr
2e2e2a855c Change "machdep.h" to <machine/machdep.h> 1997-01-27 22:33:34 +00:00
gwr
8fddc5d688 Kill sunmon.h 1997-01-27 22:24:03 +00:00
gwr
0352f52a7a Kill sunmon.h; add sun "code names" (Hydra, Pegasus). 1997-01-27 22:22:51 +00:00
gwr
21da6a34c0 Add machdep.h; use sunmon_abort() instead of mon_exit_to_mon(). 1997-01-27 22:16:37 +00:00
gwr
39d7966a63 Kill sunmon.h 1997-01-27 22:15:06 +00:00
gwr
c19546380b Check interrupt_reg==0, not clock_va (Oops!) 1997-01-26 06:17:07 +00:00
gwr
b805b73cbe Use sunmon_abort() instead of mon_panic(). 1997-01-25 21:47:44 +00:00
gwr
b224329ecd Just return if clock_va is not set.
Use <sun3/sun3/sunmon.h> for abort.
1997-01-25 21:46:19 +00:00
gwr
c0170a476f Use <machine/machdep.h> and <sun3/sun3/sunmon.h> 1997-01-23 22:48:40 +00:00
gwr
d33b4cd423 Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap
1997-01-23 22:47:36 +00:00
gwr
73234aa5f6 Use <machine/machdep.h> 1997-01-23 22:44:43 +00:00
gwr
04f1ba99a2 Remove PCB_MMUCRP, add VM_PMAP_MMUCRP and VM_PMAP_A_TMGR 1997-01-23 22:40:38 +00:00
gwr
12e2d4d8f7 Replace the intersil7170 stuff with mostek48t02 stuff.
XXX: Still need to move date conversion functions to
XXX: libkern or somewhere...
1997-01-23 22:30:15 +00:00
gwr
8b175f2050 Move a bunch of stuff to sun3/sunmon.c where we can share it. 1997-01-23 22:27:29 +00:00
jeremy
d0ba6f78a0 Fixed leap year bug. (Doesn't happen until 2100, but still important.) 1997-01-23 04:13:39 +00:00
gwr
89778a556e Do loadcrp(&mon_crp) only when returning permanently to the monitor. 1997-01-18 16:17:33 +00:00
gwr
4dcea02177 Fix a comment (PCB_MMUCTX is a virtual address). 1997-01-17 16:30:05 +00:00
gwr
aaf91fd6aa Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.
1997-01-17 16:27:17 +00:00
gwr
67015f3d8b Update for rename of pcb_mmuctx to pcb_mmucrp
Also reorder things a little.
1997-01-17 16:19:42 +00:00
gwr
f286cdd282 Move declaration of struct mmu_rootptr to mc68851.h
Kill a cast that is now unnecessary.
1997-01-16 22:12:50 +00:00
gwr
dad92086a4 Make sure the string passed to mon_reboot() is in our data segment
where the PROM can see it.  (Bug found by Jeremy  -- Thanks!)
1997-01-16 22:08:31 +00:00
gwr
07a2670421 Before dropping into the PROM monitor, restore its CPU Root Pointer (CRP),
and restore our own CRP if we resume.  Make sure the string passed to
mon_reboot() is in our data segment where the PROM can see it.
1997-01-16 21:53:07 +00:00
jeremy
499dd92e9d Added conditional include of iommu kernel driver manipulation routines.
Fixed a few comments.
1997-01-16 06:38:26 +00:00
gwr
2ffbfe169b Punt some historical stuff that was ifdefed out. 1997-01-14 21:01:33 +00:00
gwr
daa7a6dc57 Initial import. Gets as far as nfs_mountroot. 1997-01-14 20:57:09 +00:00
gwr
3921aef310 Initial revision 1997-01-14 20:57:08 +00:00
gwr
cd05f4190d Initial import. Gets as far as nfs_mountroot. 1997-01-14 20:57:07 +00:00
gwr
c8cc66764e Initial revision 1997-01-14 20:57:06 +00:00
gwr
99f640b958 Initial import. Gets as far as nfs_mountroot. 1997-01-14 20:57:06 +00:00
gwr
2ad3428397 Initial revision 1997-01-14 20:57:05 +00:00
gwr
2dbfabbb97 Initial import. Gets as far as nfs_mountroot. 1997-01-14 20:57:01 +00:00