Commit Graph

33025 Commits

Author SHA1 Message Date
gmcgarry
5a06fee353 Add UVM_PAGE_IDLE_ZERO. 2002-09-22 05:48:46 +00:00
gmcgarry
45d41256f3 Update for cpu_switch() prototype change. No functional change. 2002-09-22 05:40:35 +00:00
gmcgarry
7fe2ef36b9 Update for cpu_switch() prototype changes. No functional change. 2002-09-22 05:39:24 +00:00
mycroft
f40651a8e2 Remove redundant declaration of ether_ntoa() so this builds again. 2002-09-22 05:38:30 +00:00
gmcgarry
dca80f08fd Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives. 2002-09-22 04:11:32 +00:00
dbj
53ce9bee47 explicitly set booted_partition to 0, rather than
rely on default value.  It should actually be extracted
from the bootpath instead, but that involves translating
from apple partition map entries to netbsd disklabel entries.
2002-09-22 03:21:44 +00:00
dbj
ca0ad7da63 undo an accidentally committed change that was
included in move of bootpath alias expansion
2002-09-22 03:10:14 +00:00
dbj
9343810eed move bootpath alias expansion from initppc() into canonicalize_bootpath() 2002-09-22 03:04:31 +00:00
manu
80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
mycroft
b1ce597546 Ignore bus exception errors here.
XXX I'm not sure exactly why this is necessary...
2002-09-21 19:49:47 +00:00
mycroft
f822116056 FFS would help... 2002-09-21 16:51:54 +00:00
mycroft
48132121ca Fix the device name for ptc so ptys actually work again. 2002-09-21 16:38:50 +00:00
mycroft
80eaffef1b Force synchronous negotiation off even if the target initiates it, by setting
minsync to 0.  It may be possible to make this work, but I don't know how.
2002-09-21 16:18:30 +00:00
mycroft
e4b5a96a09 Enable SCSI target devices, and explicitly disable wide negotiation for esp. 2002-09-21 16:17:46 +00:00
perry
87a452620b change a tab to a space so commenting elansc isn't as ugly 2002-09-21 15:24:29 +00:00
petrov
e2107815a0 Use /options instead of /chosen to find out where console is.
(found by Rafal Boni).
2002-09-21 09:29:33 +00:00
chs
eaa116beda tidy a bit. 2002-09-21 01:18:40 +00:00
chs
481bfd199b don't install a couple headers that are of no use in userland. 2002-09-21 01:17:44 +00:00
chs
1135d1326e remove protos for non-existant functions. 2002-09-21 01:16:59 +00:00
nathanw
2cab03d64a In the fault handler, record growth of the stack, so that core dumps
actually contain the entire stack.
2002-09-21 00:29:04 +00:00
kanaoka
c9aa0785fe Add support for "Intel 82801DB LPC".
kern/18348: From Andreas Wrede <andreas@planix.com>.
2002-09-20 14:52:39 +00:00
martti
3b553bac54 Added (commented out) IPFILTER_DEFAULT_BLOCK. 2002-09-20 10:39:48 +00:00
wrstuden
4f7aaad83c Re-add own alloc(). Recent issues with kernels randomly dying on boot
are related to using libsa's alloc(). Problems go away with this alloc().

The problem is that the libsa alloc() assumes we can grab memory off
the end of the program. That assumption doesn't work for us. It's
much better to use the alloc() we were using as it calls OF_claim()
to get memory.
2002-09-20 03:20:24 +00:00
ragge
5e6a28c57c Adopt to boot block change; check for LUN on SCSI disks also. 2002-09-19 17:41:58 +00:00
ragge
a5beda58fa Remove the (today) unneccessary boot unit number conversions for rom-booted
disks. This allows for booting from different LUNs on SCSI disks.
2002-09-19 17:41:21 +00:00
manu
e2da53c091 More definitions to get apmd building (but it is not functionnal yet) 2002-09-19 16:52:00 +00:00
scw
e5b9e76f43 Start the search for a function's prologue by using the current PC - 4.
This ensures we start from the actual call site, not the return address.
The latter may actually be in the next consecutive function if the current
function has the __noreturn__ attribute and the alignment is Just Right.
2002-09-19 15:47:33 +00:00
scw
c87975f571 - Tweak the output format slightly to show the frame address first.
- When dealing with an exception frame, we might as well print some
   useful details while we're passing through.
2002-09-19 13:04:02 +00:00
wiz
ef50e53177 Fix typo in comment. 2002-09-19 12:00:11 +00:00
scw
87048d2661 Don't check the callers expected stack base against the saved frame
pointer, in case the caller grew its stack dynamically.

Also beef up the checks to catch cases where the call stack passes
through the exception handling code in locore. In this case, the
frame pointer and program counter are in the trapframe/intrframe.
2002-09-19 11:25:13 +00:00
ragge
b3abfee038 Do not include <sys/clist.h>, it's not used in NetBSD at all. 2002-09-19 10:37:59 +00:00
scw
910c7664b3 Finally add full stack trace support by grovelling function prologues to
determine the call stack. (I was sick of doing this manually)
2002-09-19 10:05:25 +00:00
scw
47e178df57 Move opcode_t typedef into db_machdep.h. 2002-09-19 10:03:11 +00:00
grant
1bc4761baa remove USERCONF, as it is already in GENERIC32. 2002-09-19 08:10:44 +00:00
grant
8ec07beba4 remove USERCONF and PIPE_SOCKETPAIR, as these are already in GENERIC32. 2002-09-19 07:13:58 +00:00
manu
7f8a47f4a1 - missing bits of apm
- KNF
2002-09-18 19:54:47 +00:00
ad
4202c1f405 - The VSXXX is an 8-bit device, not 7.
- Obey ls->dz_line in dzputc(), since dzms uses it.
- Remove an odd "circular" reference that doesn't appear to be useful.
2002-09-18 18:36:52 +00:00
abs
65aee44fd2 We are so tight for memory here we cannot afford USERCONF. 2002-09-18 11:29:42 +00:00
lukem
3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
thorpej
cf0393ac12 Add support for restartable atomic sequences. Rearragne the tail
of cpu_switch() slightly so we can reenable interrupts a little
earlier.
2002-09-18 02:35:08 +00:00
lukem
789c0e4589 these files are managed elsewhere, and are just bitrotting here; remove them. 2002-09-18 02:34:53 +00:00
lukem
6ef0105b93 regen for: enable USERCONF 2002-09-18 02:20:50 +00:00
lukem
b31e856d42 enable USERCONF 2002-09-18 02:19:19 +00:00
lukem
9ec54c7baa regen for: enable USERCONF 2002-09-18 02:16:01 +00:00
lukem
b07e6c87c0 enable USERCONF 2002-09-18 02:15:09 +00:00
chs
c76a265365 add the options for all the FirePower models.
add the "openfirm" device, since we're got openfirmware.
2002-09-18 01:55:02 +00:00
chs
128b037bfc remove all vesitages of dk_establish(). 2002-09-18 01:46:23 +00:00
chs
c0b553502c build ofwboot as an ELF binary. 2002-09-18 01:45:49 +00:00
chs
cf9ab742f6 fix parsing of pathnames with a partition specifier.
reformat for readability.
2002-09-18 01:45:25 +00:00
chs
b7878de767 add OF_boot(), call it if the user says "reboot".
try loading "netbsd.ofppc" first, to allow sharing root fs.
2002-09-18 01:45:04 +00:00
chs
0464f50aa5 reformat for readability. 2002-09-18 01:44:29 +00:00
chs
b5e02d5677 implement device_register() for ofppc.
use ofcons_cnprobe().
2002-09-18 01:44:12 +00:00
chs
976b0910c4 fix the ofppc interrupt code to work at all. the previous code was
confusing an IPL number with an IRQ mask.  now we do like the x86 code.
2002-09-18 01:43:07 +00:00
uwe
917eac2212 RCSID should go to .ident section.
While here add __KERNEL_RCSID.
2002-09-17 15:28:28 +00:00
briggs
b3fa829f51 Get rs6000.h from gnu/dist/toolchain/include instead of gnu/dist/include. 2002-09-17 03:55:40 +00:00
gmcgarry
24faaecc3a Implement CPU locks. Untested. 2002-09-16 21:01:31 +00:00
manu
e77de5cb68 Initial APM support (enough to get battery level) 2002-09-16 19:52:52 +00:00
manu
eee61c81f0 Fix a config mistake for wsmouse 2002-09-16 19:50:27 +00:00
gmcgarry
9fdf5b4b9e Implement CPU spinlocks. Compile-tested only. 2002-09-16 09:12:50 +00:00
gmcgarry
a2e5c0f036 Bring down from nathanw_sa branch. 2002-09-16 07:00:43 +00:00
chs
2df384b428 fix printf format string. 2002-09-16 02:12:30 +00:00
chs
5a93abd050 fix the FIRMWORKSBUGS case: ofwr_init() substitutes a wrapper OFW entry point
for the real one, so we must call it before we save off the entry point
that the higher level code will use.
2002-09-16 02:07:24 +00:00
skrll
1f4f5626a4 Fix typos in comment. 2002-09-15 20:11:55 +00:00
bjh21
325b2641c5 Cleanup: Remove no-longer-accurate comment, un-__P, ANSIfy, __KERNEL_RCSID,
other light KNF.
2002-09-15 11:27:47 +00:00
bjh21
166f9fdf01 Allocate channel structures as part of the softc rather than malloc'ing them
at run time.  This simplifies the code and avoids problems with uninitialised
variables, and if it's good enough for pciide(4), it's good enough for me.

Also normalise the prefix for channel-specific messages.
2002-09-15 11:00:11 +00:00
bjh21
9da7134dd1 On ARCIN v6 cards, clear the EPROM page latch on shutdown. This seems to be
necessary to allow the card to be detected afterwards.  In theory, this
shouldn't be necessary, since we don't touch the page latch yet, but I'm not
going to argue.
2002-09-14 18:12:16 +00:00
thorpej
c0691fd89d Back out previous; it breaks binary compatibility between platforms
in the same MACHINE_ARCH.
2002-09-14 15:54:00 +00:00
mycroft
e9a1e15d7e Move some #defines out of _KERNEL. 2002-09-14 12:58:37 +00:00
tsutsui
6ea9721865 Add (missed) entries for md(4). 2002-09-14 11:16:16 +00:00
nathanw
23941bee81 Add the now-tested "autri* at pci?" audio device. Found onboard on the
Samsung UP1500.
2002-09-14 00:58:55 +00:00
manu
100872541e fix touchpanel broken behavior:
- when moving the stylus, the cursor was updated only when the screen was
released
- when moving the stylus for too long, the kernel crashed

This was caused by improper delays in SSP read and write, and by interrupt
hammering while the screen is touched). Both led to the machine handling
interrupts all the time and been unable to schedule the X server, therefore
the lack of cursor refresh.

The problem is fixed by
- masking touchpanel interrupts as soon as we are already handling them
- creating a kernel thread (j720ssp) that takes care of keyboard and
touchpanel I/O, instead of doing it in a softintr.
- reducing delays in j720ssp_readwrite operations from 5ms to 0.1ms.

NB: If the delay in j720ssp_readwrite operation is lowered to 0.1, then
switching on the screen using the power key pushes brightness to maximum.
In order to avoid this, we introduce a wait argument to j720ssp_readwrite,
which specify how many microseconds we have to wait. j720ssp_readwrite is
called with wait = 100 everywhere except in j720lcdparam where it is called
with wait = 500. That way it works.
2002-09-13 22:44:58 +00:00
ad
ca0ac2c78c Driver for the Sun ZX/Leo framebuffer. This would be called leo, but the
amiga port already has a driver by that name.
2002-09-13 14:03:52 +00:00
chuck
fa0cb6c277 increase sc_maxxfer from 63K to 64K. otherwise fsck fails for
file systems with larger block sizes.
2002-09-13 03:00:18 +00:00
simonb
7f4e82e47b Add CPU_MIPS_DOUBLE_COUNT for the TX49xx cpus. 2002-09-13 01:27:46 +00:00
ragge
683a9a8544 Add COMPAT_15 and COMPAT_16 and commented-out dmf. 2002-09-12 19:23:45 +00:00
ragge
32923df5d6 Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.
2002-09-12 18:22:23 +00:00
abs
4bebaafe44 Protect extern zstty_cd with (NKBD > 0) || (NMS > 0) 2002-09-12 12:51:37 +00:00
scw
a9c1bc6c83 Add code to deal with the "Cache Purge/Invalidate can cause TLB Miss"
problem, such that a TLB miss no longer occurs.

With the above, it is now safe to enable write-back caching for userland
mappings.

TODO: Deal with cache issues for shared mappings with different VAs.
2002-09-12 12:44:13 +00:00
scw
7e0aa6fcfc sh5_setasid() now returns the original ASID value. 2002-09-12 12:39:34 +00:00
scw
a73ea332f6 Adapt to new cacheops requirements. 2002-09-12 12:38:42 +00:00
scw
22569e09ed The cacheops functions now need the physical address of the region
to be purged/invalidated.
2002-09-12 12:37:49 +00:00
scw
b0ecf76dd4 sh5_setasid() now returns the value of the previous ASID. 2002-09-12 12:35:00 +00:00
matt
02573a8516 Add non-_KERNEL variants so regress/sys/kern/lock will compile. 2002-09-12 07:31:13 +00:00
martin
000826593a Make kernels without KTRACE work. 2002-09-11 20:19:45 +00:00
mycroft
3294e33d95 Don't blindly receive all multicast packets just because we're on a turbo.
Pay lip service to making promiscuous mode work.
2002-09-11 13:15:58 +00:00
scw
08dfbb4305 - Be more consistent about using ptel_t where it matters.
- Add event counters for some key pmap events (similar to mpc6xx pmap).

 - Use the cache-friendly, optimised copy/zero page functions.

 - Add the necessary cache management code to enable WriteBack caching
   of KSEG1 mappings. Seems to work fine so far.
2002-09-11 11:08:45 +00:00
scw
ecb4124668 - Add cache-friendly, optimised copypage/zeropage functions for use by
the pmap module.

- Add {,e}intrnames and {,e}intrcnt to keep kernel-symbol grovelling
  tools like vmstat(8) happy.
2002-09-11 11:03:08 +00:00
scw
b08dae4d46 Tweak the interrupt names to properly match reality. 2002-09-11 10:57:50 +00:00
scw
e47c955f01 Get the correct evcnt structure and ipl number when initialising softints. 2002-09-11 10:56:43 +00:00
scw
2b0c53084c Slight tweak to save one instruction in the pteg TLB miss case. 2002-09-11 10:55:05 +00:00
simonb
6ebf56cc52 Use AU1500_MAC0_BASE as well as a test for setting the MAC addresses
of the on-chip interfaces.
2002-09-11 08:30:48 +00:00
mycroft
f13a876c12 Remove straggling NEXT_TURBO #ifdefs. 2002-09-11 07:17:33 +00:00
mycroft
d6a62735b7 Attach nextdisplay on the mono turbo. 2002-09-11 07:06:16 +00:00
mycroft
8ac5416160 In en_put(), if we don't get a packet, just return 0. This is how we tell
the libsa code to retransmit.
2002-09-11 06:32:07 +00:00
mycroft
d5e3432796 Don't know whether it works, but enable the '030 support for the Hell of it. 2002-09-11 04:17:01 +00:00
mycroft
a0688f1086 Determine turbo-ness based on the ROM machine type here, too. 2002-09-11 02:17:14 +00:00
mycroft
c618f2cc87 Comprehensive patches from Christian Limpach:
* Fix problems with the DMA and SCSI drivers.
* Make turbo machines sort of work.
Additional fixes from me:
* Determine if we're a turbo at boot time, by looking at the ROM machine type.
* Set the display size correctly (1120 pixels wide, but padded to 1152 only on
  non-turbo machines).
Caveats:
* SCSI doesn't work on the turbo (or at least it blows chunks with no devices
  attached).
* Media selection doesn't work on the turbo (the BMAP stuff doesn't exist on
  turbo machines).
* The boot block is prone to timing out.
2002-09-11 01:46:29 +00:00
scw
151ee8c81a Fix a devsw merge botch. 2002-09-10 21:10:18 +00:00
scw
bd0dd2e2e1 Add "machine fpr" command. This dumps the FPU registers for the current,
or a specified, process.
2002-09-10 12:44:38 +00:00
scw
fe2f8acf65 Another big round of pmap fixes/cleanup:
- Use the PMAP_ASID_* constants from pmap.h

 - Track pmap_pvo_{enter,remove}() depth in the same way as mpc6xx's pmap
   (on which this pmap was originally based).

 - Some misc. tidying up and added commentary.

 - Use the VA/KVA to select whether to use the IPT or PTEG instead of
   checking which pmap is being operated on.

 - Add a handy DDB-callable function which will scan the kernel IPT
   looking for inconsitencies.

 - Finally, when unmapping a pool page, purge the data cache for the
   page. This permits write-back caching to be enabled for kernel
   text/data.
2002-09-10 12:42:03 +00:00