Commit Graph

1918 Commits

Author SHA1 Message Date
mycroft 98fc96ea40 Add some commentary on the previous. 1995-01-15 01:15:04 +00:00
mycroft ecef8fddfa Remove PSL_USERCLR, and add a PSL_USERSTATIC. Change the bit descriptions to
more closely match the 386 manual.  (Probably the mnemonics should be changed,
too.)
1995-01-15 00:57:50 +00:00
mycroft c7c817b91a sigreturn() and ptrace() security violations will now trap. Deal with those
traps by looking at the instruction stream and the stack to see if it looks
like we're returning to user mode, and if so pop to the hooks in locore.s.
This will fail in the case where a pop %ds or pop %es faults when returning
from a fast interrupt, but this should not be possible.
1995-01-15 00:55:25 +00:00
mycroft 3e8850eab2 Enable CR0_AM on 486s. (We already handled the fault.) This would be more
useful if it applied to the kernel.
Avoid btrl when checking AST flag.
Add hooks to recover from errors during any INTRFASTEXIT and simulate a user-
level protection fault.
1995-01-15 00:52:21 +00:00
mycroft c26ad3af41 Cosmetic changes, and use db_printf() rather than printf(). 1995-01-15 00:46:38 +00:00
mycroft 8476bee7b5 Do the eflags security check in a cheaper way. Just check that the privilege
level of the return cs is correct; don't check the other selectors.  (Will
fault later if they are invalid.)
1995-01-15 00:44:19 +00:00
mycroft da79b43eae Move the existing frame pointer calculation into a separate helper function.
Eventually this should cause the child to be swapped in if necessary.
Do the eflags security check in cheaper way.
1995-01-15 00:42:01 +00:00
mycroft a2dafd0821 Avoid using btrl, and check astpending before the return cs, because it's
faster and usually false.
1995-01-15 00:36:37 +00:00
mycroft 87d587e640 Simplify some sanity checks. 1995-01-13 14:46:44 +00:00
mycroft 4740006541 Oops. 1995-01-13 14:05:17 +00:00
mycroft 705f6e0337 *** empty log message *** 1995-01-13 13:19:34 +00:00
mycroft 1e5cd9212d (Almost) allow sector sizes other than 512 bytes. Reduce some expensive operations. 1995-01-13 12:30:59 +00:00
mycroft 7bb384b66c Avoid some repeated multiplications. 1995-01-13 11:14:27 +00:00
mycroft 7650bd97fc Always boundary check I/O. 1995-01-13 10:46:32 +00:00
mycroft c541b630fc Add a sc_bcount, similar to wd.c. 1995-01-13 10:35:58 +00:00
mycroft a0303980c2 Calculate b_cylin correctly for different block sizes. 1995-01-13 10:30:08 +00:00
mycroft 0033c975c6 Fix another bug in the DMA code. 1995-01-13 10:22:58 +00:00
mycroft fda9731199 Further cleanup. Back out part of the previous; it's the device's
responsibility to check for partial blocks.
1995-01-13 09:57:39 +00:00
mycroft 4abdb375bc Minor rearrangement. 1995-01-13 09:40:21 +00:00
mycroft c2bc310a37 Change the way sc_skip is used. Fix a bug in the (incomplete) DMA code. Add a
new sc_blkno (which will be useful later).
1995-01-13 08:58:16 +00:00
mycroft da7d74e3dc Fix typos. 1995-01-13 08:37:25 +00:00
mycroft 1f758ca55c Fix typo. 1995-01-13 08:31:46 +00:00
mycroft ca84c10497 Only allow opening one density at a time. 1995-01-13 08:29:25 +00:00
mycroft 04a1fc8816 Change the way b_cylin and sc_track (now sc_cylin) are used slightly.
If transfer goes past end of disk, truncate it.
1995-01-13 07:57:01 +00:00
mycroft dc63598a7f Clean up bounds_check_with_label(). Round request to sector size in label,
and return EINVAL if bcount is less than the sector size or negative.
1995-01-13 06:51:38 +00:00
mycroft 8ba4c5fca1 Add boca, makeoptions. 1995-01-11 20:59:50 +00:00
pk 0a22930d97 Explicitly test the RXRDY status bit on incoming characters. 1995-01-11 09:56:40 +00:00
jtc d7a8b2964f Only define sig_atomic_t when _ANSI_SOURCE is defined. 1995-01-10 19:01:00 +00:00
ws 3e0b9f0694 Implement symbolic links (plus a minor fix for %x printing) 1995-01-09 22:13:10 +00:00
mycroft 7af86b7eb7 Copy physlock code from SPARC port, and some minor cleaning. 1995-01-09 09:13:09 +00:00
christos b006bf7e68 Added missing forward declaration 1995-01-09 01:05:24 +00:00
christos e1c97cde06 New file for signal handling and {g,s}etcontext(). 1995-01-08 21:23:31 +00:00
christos 7c056bd334 New svr4_machdep.c for svr4 signal handling.
Made check_selectors global, to be used by the
svr4 code.
Removed unused variable.
Modified sendsig() to call the svr4_sendsig().
1995-01-08 21:22:16 +00:00
christos 66cc79dbc4 New svr4_machdep.c 1995-01-08 21:18:48 +00:00
mycroft e06bc8c13e Don't issue a controller self-test... 1995-01-07 22:48:29 +00:00
mycroft 06b0414491 Actually, do the ID reset in elink_reset(). 1995-01-07 21:37:54 +00:00
mycroft 37e16c5747 Don't print line numbers in most of the diagnostics. 1995-01-07 06:49:35 +00:00
mycroft d4f91d51a9 Fix a race condition between normal I/O and wd_get_parms(). 1995-01-07 03:07:22 +00:00
mycroft 7f61bec5cd Cosmetic changes, to look more like the new esp.c will. 1995-01-07 01:51:07 +00:00
mycroft ba288b4ae1 Do the reset in the individual drivers, not in elink_idseq(). 1995-01-06 21:41:26 +00:00
mycroft 290ed068ab Remove many of the `static's, to facilitate debugging. 1995-01-04 09:02:32 +00:00
mycroft 6125e1b551 Fix oversight in previous. 1995-01-04 00:47:53 +00:00
mycroft 9e499d41b3 \
These files have been 99% rewritten from the original ast driver.  Add an
appropriate copyright notice.
1995-01-03 22:38:54 +00:00
mycroft 0349c5b9e0 Add a multiplexer for BOCA serial boards. 1995-01-03 22:26:36 +00:00
hpeyerl 09834a5bd3 This is correct according to the docs on both cards.
Doesn't seem to make any difference to the known problems though.
1995-01-03 05:04:04 +00:00
mycroft a987158712 Add interrupt sharing types. 1995-01-03 03:56:09 +00:00
mycroft b6c8a9a4e9 Update intr_establish() prototype. 1995-01-03 03:14:35 +00:00
mycroft 93a0c4a258 Add interrupt sharing types. 1995-01-03 01:42:11 +00:00
mycroft b5cf1b5ddd Add interrupt sharing types. 1995-01-03 01:30:14 +00:00
mycroft d16dcced99 Add interrupt sharing types. 1995-01-03 01:19:19 +00:00
mycroft 326830c1ba Use direct config for subdevices. 1995-01-02 22:27:46 +00:00
mycroft e148dc7a64 Move setting of sc_maddr so soft config works. 1995-01-02 22:01:05 +00:00
mycroft a774fa6fe5 Use soft configuration when possible. 1995-01-02 21:57:04 +00:00
mycroft 3a967fcbb6 More cleanup. 1995-01-02 21:27:27 +00:00
mycroft 72dec3b548 Various cleanup. 1995-01-02 20:54:01 +00:00
mycroft 3a74796b3e Need isareg.h. 1995-01-02 20:39:35 +00:00
mycroft 894bb9145f Use soft configuration where possible. 1995-01-02 20:32:55 +00:00
mycroft 2d5b04744a Don't assume ia_maddr is in the hole. 1995-01-02 20:06:29 +00:00
mycroft 76b0b02cc3 Fix non-serious typo. 1994-12-31 05:34:00 +00:00
cgd 7b8535b554 do the right thing with strange-sized varargs objects. 1994-12-28 22:45:42 +00:00
mycroft ff315ba9a4 Don't turn on the SCE bit in the enable register. 1994-12-28 19:45:41 +00:00
mycroft 8fd135209c Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
hpeyerl 262b425866 temporary warning until I get new docs. 1994-12-28 16:47:50 +00:00
cgd e5049f4d59 make the definition of _JBLEN mach. dep. header-dependent. 1994-12-20 10:36:27 +00:00
mycroft ce06e718ad Fix flags to isa_dmastart(). 1994-12-17 18:45:11 +00:00
mycroft ab77439747 Clean up constab stuff a little. 1994-12-16 04:19:13 +00:00
mycroft 52d8d259fd Add a bt. 1994-12-15 16:14:50 +00:00
mycroft a7393f95f3 Remove fp arg to d_open. 1994-12-14 18:52:32 +00:00
mycroft ca65f2ce5d Remove dkbad.h. 1994-12-14 15:17:22 +00:00
mycroft aeda11fc40 Remove the d_subtype frobnication. It was clearly broken, and not very
useful.
1994-12-13 15:31:54 +00:00
mycroft 05e78f1424 Add empty pcstop(). 1994-12-13 13:42:53 +00:00
mycroft e694663b46 Make the diagnostics less cryptic. 1994-12-12 04:43:51 +00:00
mycroft 3e4a358e28 Patch from Thomas Eberhardt to make PCnet-32 chips work. 1994-12-12 04:39:52 +00:00
mycroft 995e676d90 Add `flags 1' to ast subdevices, as pointed out by John Kohl. 1994-12-11 16:20:48 +00:00
christos 303841c92e 3c509 fixes to avoid adapter getting stuck in high traffic conditions.
I don't particularly like the fixes, but at least now the 3c509 never
gets stuck. On the other hand, performance still sucks in some cases.
1994-12-10 14:52:02 +00:00
mycroft 793e542f89 Fix format of attach message. 1994-12-10 05:55:26 +00:00
mycroft 1acd9ddb90 Speed up FPU task switching some more. 1994-12-10 00:28:18 +00:00
mycroft 957694159f Correct a couple of things... 1994-12-08 20:55:05 +00:00
glass 2227b302cf update 1994-12-06 06:59:01 +00:00
mycroft 8d87220928 Don't ignore the exit status of ld(1). 1994-12-06 06:07:39 +00:00
mycroft 6d6a24357a Compile with -g. 1994-12-06 05:02:26 +00:00
mycroft 1e0e6d72c9 Conditionalize the audio driver on NAUDIO, not NSB, now that the former
exists.
1994-12-05 05:45:38 +00:00
mycroft e92233c07c Deal correctly with esym being 0. 1994-12-04 07:37:27 +00:00
mycroft c3b944cb15 Use correct select routine for audio. 1994-12-04 06:32:39 +00:00
mycroft 8e6f464987 fdclose -> Fdclose 1994-12-03 15:17:06 +00:00
mycroft 5c3d80060d Reset the entire PSL, not just part of it. 1994-12-03 14:55:51 +00:00
mycroft 73afee1973 We don't need the extra space to preserve the BIOS variables any more. 1994-12-02 03:02:49 +00:00
mycroft 8fd1f92ae7 Don't futz with the cursor shape unless we really, really need to. 1994-12-01 11:12:04 +00:00
mycroft 211b002017 Ignore ERR during diagnostics. 1994-12-01 10:45:26 +00:00
mycroft 434d451672 Adjust dump calculation to avoid sign problems. 1994-12-01 09:53:38 +00:00
mycroft 6686f7f263 Rework detection a bit, and check for the Pentium fdiv bug. 1994-11-30 04:42:07 +00:00
mycroft c72f58d401 Don't need to turn on emulation when npx not present; we leave it off always. 1994-11-30 04:26:06 +00:00
mycroft 867ebf1d84 Clear the controller active flag after a timeout. 1994-11-30 02:32:03 +00:00
mycroft 5584ff927f Don't stall the queue on CHECK SENSE if we get a reselect while selecting. 1994-11-30 02:08:01 +00:00
mycroft 639a64de08 Fix a null pointer reference. 1994-11-29 21:35:13 +00:00
mycroft 51bed8d804 Add an assertion mechanism to check for more abnormal conditions. 1994-11-29 21:29:56 +00:00
mycroft 58cb5339d6 For consistency... 1994-11-29 20:57:28 +00:00
mycroft 41b26a6dfd Handle BUS FREE phase a little differently, to get better error detection. Other
cleanup.
1994-11-29 20:08:27 +00:00
mycroft bb90feebac Disable debugging breakpoints by default. 1994-11-29 17:56:49 +00:00
mycroft 5ac2484d95 * Redo most of the message and phase state machines. Multiple pending
message outs should now work correctly (including retransmissions).
Multiple messages ins should be more efficient.  Missing REQ after
reselection phase should now (correctly) cause a wait with ENREQINIT
set.

* Abstract out the reselection out sequence, and use it directly to
get sense info.  (This is somewhat faster than the generic done/sched
sequence.)

* If there are no ACBs available, wait interruptibly for one.

* Leave the interrupt registers alone during message in/out; just
watch for phase change.  Don't (incorrectly) reenable interrupts
during data in/out; defer that to aicintr().

* Handle command pointer per SCSI 2 spec.

* Other minor coding improvements.
1994-11-29 17:50:39 +00:00
christos 6a2c060851 fix unary plus typo :-) 1994-11-25 23:19:03 +00:00
mycroft cba32aa25f Minor update for new autoconfig. 1994-11-25 08:17:21 +00:00
mycroft 0649f37219 Officially credit Onno. 1994-11-23 22:00:08 +00:00
mycroft 8bacafc13c Clean up deleted files. 1994-11-23 09:10:13 +00:00
mycroft 2058abab15 Forgot to commit this as part of the LBA changes. 1994-11-23 07:56:52 +00:00
mycroft cc44b4600c There's no point in bothering to unlock what we didn't lock. 1994-11-23 07:54:15 +00:00
mycroft 6dda55519e Fix an outdated comment. 1994-11-23 03:11:01 +00:00
mycroft a3fc466734 Use logical block addressing if available. Be a little more careful about
maintaining timeouts.  Clean up wddump() a bit.
1994-11-23 01:35:43 +00:00
mycroft 525fc36e19 Implement 32-bit reads and writes, but for now assume 16-bit mode. 1994-11-22 10:20:16 +00:00
mycroft 3a99ddf172 Add a missing newline in some error messages. 1994-11-22 09:36:56 +00:00
mycroft db3bde9525 Implement EIDE multi-sector PIO and DMA modes, based on code from Onno van
der Linden.  Also, various structural cleanup, and fix two bogons that crept
in, and remove all of the old clustering nonsense.
1994-11-22 09:33:59 +00:00
mycroft 1e01855683 Minor fix to debugging code. 1994-11-22 05:50:48 +00:00
mycroft 85826f0fbe Fudge a couple more fields for ancient disks. 1994-11-22 05:39:16 +00:00
mycroft e1a7bac628 Change some constant names, etc., to better match the ATA spec. 1994-11-22 05:34:49 +00:00
mycroft 95edd299b0 Add still more locking. 1994-11-22 03:23:49 +00:00
mycroft dcb90851c2 Minor change. 1994-11-22 01:21:11 +00:00
mycroft 5bd4115690 Add some missing locking, and some general cleanup. 1994-11-20 22:36:43 +00:00
mycroft d2d4dc4654 Use immediate constants for port numbers < 0x100. 1994-11-20 21:36:44 +00:00
christos f63115591a Included <sys/cdefs.h> since this file is now using __signed.
It broke non gnu compilers.
1994-11-20 18:50:18 +00:00
mycroft 9a3840f2f0 Stylistic changes. 1994-11-18 22:25:12 +00:00
mycroft 79a1309e3c Remove Xwild; it's no longer used. 1994-11-18 22:22:40 +00:00
mycroft e075f8c13d Convert port, IRQ, and DRQ numbers to ints. 1994-11-18 22:18:35 +00:00
mycroft 61800cfa25 Convert port, IRQ, and DRQ numbers to ints. 1994-11-18 22:07:32 +00:00
mycroft 35cdd801e6 Convert port, IRQ, and DRQ numbers to ints. 1994-11-18 21:57:40 +00:00
christos fc8e694056 Fixed error svr4 error code mapping; my old attempt was a noop. 1994-11-16 20:14:42 +00:00
mycroft a2727ec558 Check IRQ 9, not IRQ 2. 1994-11-15 00:00:24 +00:00
mycroft b341f7a8c0 Map IRQ 2 to IRQ 9. 1994-11-14 23:58:56 +00:00
mycroft e91e570cfd Shorten the Cyrix handling code a little. 1994-11-14 23:35:48 +00:00
mycroft 423bfa0764 Garbage collect unused variable. 1994-11-14 08:53:06 +00:00
christos a96cb110a3 Added new svr4 files 1994-11-14 05:54:30 +00:00
christos 55845b1901 changed open prototype in conf.c; added bsd->svr4 errno mapping in trap.c 1994-11-14 05:53:48 +00:00
mycroft 1c5ac2e88c pcb.h requires segments.h now. 1994-11-08 23:09:21 +00:00
mycroft f875a9efe6 Allocate pv_pages differently. 1994-11-08 01:17:19 +00:00
mycroft d254e95680 Garbage collect some variables which are no longer used. 1994-11-07 10:19:28 +00:00
mycroft 21e911d911 Update for new autoconfig. 1994-11-07 09:03:48 +00:00
mycroft cfae52f542 It's legitimate, if foolish, to mask SIGCONT. 1994-11-07 05:57:28 +00:00
mycroft 297c06de67 Comment previous change. 1994-11-07 05:32:50 +00:00
mycroft 86a2079aef When restarting syscalls, make sure we adjust the PC by the correct amount
depending on what instruction we used to enter the kernel.  Push the
instruction length into tf_err on entry.
1994-11-07 05:26:08 +00:00
mycroft ed993b3930 Two trivial optimizations. 1994-11-07 05:09:04 +00:00
mycroft d5f99262a9 Since npxdna() and npxsave() are only ever called at spl0 now, we can get rid
of all the overhead of frobbing the IDT, and just use a simple flag to tell
npxintr() to ignore interrupts.  This allows lots of code reduction.
Also, update some comments and add some DIAGNOSTIC code to detect is these
assumptions ever become wrong.
1994-11-07 03:39:37 +00:00
mycroft 5133a6cfd7 Only save the FPU state if somebody else needs the FPU, or when forking. 1994-11-06 23:43:17 +00:00
mycroft f3ef31e4aa Oops; forgot to adjust stack offset. 1994-11-06 22:05:08 +00:00
mycroft 37863af7bb Forgot two underscores. 1994-11-06 21:51:47 +00:00
mycroft 58b3010e87 Use %eax slightly more effectively in cpu_switch(). 1994-11-06 20:51:46 +00:00
mycroft 915336b97c Approximate the divide by multiplying by 3433/4096. This is faster than
the previous code, and more accurate.  Also avoid saving and restoring
registers.
(The multiplication algorithm was generated by GCC.)
1994-11-06 20:33:35 +00:00
mycroft ddb6e42460 Actually, don't bother checking p == 0 at all. 1994-11-06 20:30:09 +00:00
mycroft 5cf38ebdb4 The case of curproc == 0 `can't happen' unless we're in the idle loop, so
allow it to panic by way of a reference to 0 in other cases.  Explicitly test
for p == 0 in the specific cases where it's needed, and only calculate pcb if
needed.
1994-11-06 20:28:57 +00:00
mycroft 9a84611b06 Move the spl0() from the idle loop to the top of cpu_switch(). (This also
avoids needing to call spllower() below.)  Set curproc immediately after
removing the new process for the run queue, before allowing interrupts again,
for the benefit of schedcpu().
1994-11-06 20:21:29 +00:00
mycroft 205d425f2f As pointed out by Bruce, splsoftclock() needs to process pending interrupts
when lowering the priority.  Do this by simply calling splx().  For the
benefit of NFS (for now), modify splx() to return a value so that
splsoftclock() does.  This work is optimized out for every use of splx()
that ignores the value, so it only affects relevant code.
Also, clean up this file a little.
1994-11-06 01:37:47 +00:00
mycroft c2191a2ad0 Fully prototype ssdtosd() and sdtossd(). 1994-11-05 03:20:36 +00:00