Commit Graph

34510 Commits

Author SHA1 Message Date
lukem ef1ca5d8b8 crank to 2240k; they've grown again 2003-01-20 01:39:02 +00:00
simonb c369177127 Remove variable that is only assigned too but not referenced. 2003-01-20 01:29:18 +00:00
simonb 540020ec01 Don't need an extern declaration of phys_map; it's in uvm_extern.h. 2003-01-20 01:28:33 +00:00
soren 0a8d7994d1 Attachment for the HD44780 display and keypad on the front of Cobalt machines. 2003-01-20 01:26:12 +00:00
simonb b4509098d5 Put the storage class first. 2003-01-20 01:25:04 +00:00
pk 5be63cb4a3 xcall(): two more printf => printf_nolog 2003-01-20 00:55:52 +00:00
matt fb891b41f5 Add _REG_foo to ppc mcontext and use them instead of constants. 2003-01-20 00:53:55 +00:00
rafal c1ff3ce973 Fix a bug that would cause the PCI fixup to assign addresses beyond the range
of KSEG0/1 mappable PCI window (the MEG_ALIGN macro was aligning to *16* MB
instead of *1* MB due to an extra 0 in the round-to constant).  Also, allow
the PCI code to fix up all functions of a multifunction device; both from
Chris Sekiya, with a bit of massaging by me.
2003-01-19 23:08:54 +00:00
rafal 48eb4573c0 Parse out flags passed to the kernel on boot; from Scott Taylor, tweaked to
use the MI boot_flags.h interface by me.
2003-01-19 22:36:00 +00:00
rafal 2eef5c9ba8 Turn on more of the PCI interrupts; from Chris Sekiya. 2003-01-19 22:33:20 +00:00
ragge 6ad43b52da Add some instrumentation and clean up some VAX8600 code.
From Johnny Billquist.
2003-01-19 22:29:22 +00:00
rafal 6c79dcd0e4 Update to use the full DS1687 register set, therefore allowing the clock to
store absolute year rather than an offset -- this means the clock is now
consitent across the ARCS PROM, IRIX and NetBSD.

XXX: This attachment is now a mismoner, since it's a Dallas Semi RTC, not
a Motorola RTC.  Should be renamed.
2003-01-19 22:26:38 +00:00
rafal 0c4b06c362 Add pci/usb/audio devices; from Chris Sekiya. 2003-01-19 22:23:03 +00:00
rafal 537bf9a526 Change DS1286 definitions to start with DS1286_ rather than DS_ so these and
DS1687 definitions are easier to distinguish.
2003-01-19 22:20:43 +00:00
ragge aa92009e2b Bring back "START=start", otherwise booting via real VMB don't work. 2003-01-19 21:37:04 +00:00
scw c64b785002 Add sh5 kernel support for SAs.
This gets the Cayman to multi-user with a non-SA aware userland.
2003-01-19 19:49:47 +00:00
scw 8b92aecb3f Use the full 'sh5le-unknown-netbsd-' prefixed toolchain names, and
set optimisation to -O2 now that gcc seems to generate decent sh5 code.
2003-01-19 19:46:57 +00:00
thorpej 5819507df3 Merge the nathanw_sa branch. 2003-01-19 16:30:13 +00:00
tron d9835f8fa4 Add "COMPAT_OSSAUDIO" option. 2003-01-19 10:42:54 +00:00
tron b4458473fd Correct indentation error for "COMPAT_OSSAUDIO" option. 2003-01-19 10:42:06 +00:00
tsutsui 59dafa2c6b TAB/space cleanup. 2003-01-19 10:06:12 +00:00
matt 5fac7ff5ae Make this reflect reality. 2003-01-19 09:23:39 +00:00
thorpej ced18120c6 Merge the nathanw_sa branch. 2003-01-19 07:29:19 +00:00
tsutsui 55b4104918 Fix pasto. 2003-01-19 03:36:58 +00:00
matt a0356cae2a Add CALLFRAMELEN and use it. 2003-01-19 02:47:36 +00:00
matt ef4a3f75d9 LP64'ify. 2003-01-19 02:46:08 +00:00
matt f35338749b Cast to register_t instead of int to be nicer for LP64.
Simplify copyin/copyout/copyinstr/copyoutstr.  Fix bug
where the user virtual address was not updated so that
if the user's buffer crossed a segment boundary, the
wrong data could be copied.  Localize USER_SR to the
ILP32 version of setusr/unsetusr.
2003-01-19 02:43:11 +00:00
matt d8f30693f8 Use CALLFRAMELEN instead of 16. 2003-01-19 02:39:47 +00:00
matt bf7778a6da Add trapframe32 (for compat_netbsd32).
Add CALLFRAMELEN.  (so we can remove many of the hard coded "16" or "15"
in the powerpc code).
2003-01-19 00:42:24 +00:00
matt 328674047a ALIGN should use u_long, not u_int 2003-01-19 00:25:22 +00:00
matt 92609b9678 Cast to register_t, not int, to be more LP64 friendly. 2003-01-19 00:01:09 +00:00
matt b3d36290af Improve sigcode.S template so linux_sigcode.S can use it as well. Add a
netbsd32_sigcode.S.
2003-01-19 00:00:11 +00:00
matt d192a5d694 Cast to register_t, not int, to be more _LP64 friendly. 2003-01-18 23:58:19 +00:00
matt e20e04fa05 Allow other compat use this as a template. 2003-01-18 23:46:32 +00:00
matt 4adb810fe1 In cpu_upcall, cast to register_t, not int. (int is not LP64 friendly) 2003-01-18 23:43:24 +00:00
thorpej 470075179e Merge the nathanw_sa branch. 2003-01-18 23:20:24 +00:00
christos 7b47c1bae4 add COMPAT_OSSAUDIO [for lkms that need it]. XXX: wish for /dev/ksyms 2003-01-18 22:33:29 +00:00
matt b7af0cbc04 Add LP64 support. 2003-01-18 21:38:03 +00:00
matt 024c9c135c Add a temporary bridge to use %foo regnames in kernel / standalone code. 2003-01-18 21:36:44 +00:00
matt 3d62e5c159 Fix LP64 botch. 2003-01-18 21:32:58 +00:00
matt d610b65d22 Make register_t. Change the printfs in trap.c to match. 2003-01-18 21:28:10 +00:00
augustss f5d6c1b585 Include <sys/sa.h> 2003-01-18 18:20:10 +00:00
augustss ae211f08e6 Change name of an #ifdef. 2003-01-18 18:17:51 +00:00
augustss 9a323447ab Add mcontext.h. 2003-01-18 18:17:23 +00:00
augustss 633c8a5bcb Fix typo in comment. 2003-01-18 17:40:27 +00:00
jdolecek 968312910e fix pastos in previous change 2003-01-18 13:29:25 +00:00
tsutsui aa4186745b Add '#define' for _MCONTEXT_TO_SIGCONTEXT(). 2003-01-18 13:03:17 +00:00
tsutsui 7de4540345 TAB/space cleanup. 2003-01-18 12:28:59 +00:00
thorpej d2275d51e1 Merge the nathanw_sa branch. 2003-01-18 06:55:21 +00:00
thorpej c464d72f40 Merge the nathanw_sa branch. 2003-01-18 06:44:56 +00:00
thorpej 49784e4bd0 Merge the nathanw_sa branch. 2003-01-18 06:33:41 +00:00
thorpej f91b0bb3f2 Merge the nathanw_sa branch. 2003-01-18 06:23:28 +00:00
thorpej 71b2230367 Merge the nathanw_sa branch. 2003-01-18 06:05:42 +00:00
thorpej a50e3bc1cb Merge the nathanw_sa branch. 2003-01-17 22:58:53 +00:00
thorpej 23bc250391 Merge the nathanw_sa branch. 2003-01-17 21:55:23 +00:00
pk 4d7731a177 cpu_switch:
* return `switched to same process' only if that process was actually
  already on a run queue when we entered.
* skip the switch to the idle stack if we can switch immediately
* .. and because of this, don't release the scheduler lock until after
  we've fully switched to the new process's stack.
2003-01-17 14:49:45 +00:00
pk d352e8ce9c pmap_deactivate(): only update the pmap's cpuset if need to. 2003-01-17 14:15:17 +00:00
nonaka f843b3302c Fix compile failure. 2003-01-17 13:27:56 +00:00
nonaka 0a4b06a4b4 Fix bus_space_mmap() bug.
> Module Name:    src
> Committed By:   augustss
> Date:           Sun Jan 12 23:46:12 UTC 2003
>
> Modified Files:
> 	src/sys/arch/pmppc/pmppc: bus_space.c
>
>Log Message:
>The bus_space_mmap() returns a physaddr, not a page, on the PPC.
>(This is broken in some (all?) of the PPC ports, it seems.)
2003-01-17 13:19:25 +00:00
simonb b2e8253950 Zero out the TX buffer when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN. 2003-01-17 12:40:20 +00:00
pk 1d67b9c75a Don't grab the kernel lock for system timer interrupts; this mostly prevents
stalls in system time processing.

XXX - deal with non-atomic global time variables updates later.
2003-01-17 10:36:19 +00:00
lonewolf 628ec7a152 Compiles and works (tested on my A1200) again
XXX scsipi mid layer spews out a few "generic HBA error"s during device probe (no slave device on bus), I don't know how to fix this
XXX This whole thing should die now that we have wdc_amiga
2003-01-17 04:20:38 +00:00
petrov 6383ae6ccb Don't do anything if there are no streaming buffer cache. 2003-01-16 21:55:52 +00:00
pk 2252ed574d mp_{pause,resume,halt}_cpus(): check for cpus==NULL. 2003-01-16 17:21:43 +00:00
pk c454f450b1 Define a MP version of callrom(). 2003-01-16 16:58:52 +00:00
pk 7d4c3f7430 Remove some accidental garbage. 2003-01-16 16:58:23 +00:00
pk 72c28f7bb7 Rename the current mp_{pause,resume}_cpus() => mp_{pause,resume}_cpus_ddb().
Implement mp_pause_cpus/mp_resume_cpus on top of the PROM services.
2003-01-16 16:57:43 +00:00
pk 58b50d0643 Read the CPU mailbox in the level 15 soft interrupt handler and respond
to idle and stop requests.
2003-01-16 16:27:48 +00:00
pk b418a6a59d Some PROMs get really uneasy if the prom_reboot() function is called
after the other CPUs have already return into the PROM through prom_cpustop().
So don't do it; try to halt the other CPUs only when an actual `halt'
is requested.

My guess in this case is that the PROM does not expect its original boot
CPU to call prom_cpustop(0), or possibly treats it as the equivalent of
a prom_halt() which is then called again by some other CPU. In any case,
the result is garbage.
2003-01-16 16:20:20 +00:00
pk f312ee5f9a What do you know.. the prom_cpu{stop,idle,resume} function appear to be
returning a success/fail flag. For now, use it to be informative.
2003-01-16 16:10:44 +00:00
scw b8b3ddc479 Add a "kernel_text" label.
Pointed out by Andrew Brown.
2003-01-16 15:52:53 +00:00
pk 5e231ddd1c * Implement mp_halt_cpus()
* xcall: use printf_nolog()
2003-01-16 14:49:08 +00:00
pk 72286d4202 Definitions of some OBP generated CPU mailbox messages. 2003-01-16 14:43:07 +00:00
pk 26fa27a910 Fix reboot options handling; now one-letter kernel names can also be booted. 2003-01-16 11:33:21 +00:00
matt 0ccdd339c8 A small LP64 fix. 2003-01-16 09:17:01 +00:00
matt 76fda2e342 Add ISA Floppy (to be consistent with INSTALL). 2003-01-16 07:23:06 +00:00
matt 81d3f59353 Add PLATFORM_IBM_6040 2003-01-16 06:59:19 +00:00
petrov b5be66abcd Move dump_dtlb back under DDB. 2003-01-16 03:01:23 +00:00
matt 72020abb85 Add platform support for the IBM PPS Model 6040 (E) (aka ThinkPad 820). 2003-01-16 02:18:20 +00:00
simonb c018fbe68d Tidy up event counter increments a little. 2003-01-16 01:14:17 +00:00
simonb c69f520bc8 Removed unused register map; this info is now passed in with the attach
args.
2003-01-16 01:05:39 +00:00
pk a5cea9e740 On Hypersparc MP machines, we need to flush the TLB after a page cache flush.
While the pmap functions take care of properly ordering cache and TLB flushes,
not all TLB flush requests are sent to all CPUs (due to per CPU pmap tracking)
while cache flushes are always broadcast.

XXX: need to investigate pmap tracking for cache flush operation as well.
2003-01-15 22:56:32 +00:00
bouyer bcae687139 Zero out the NIC memory when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN
sc->write_mbuf now return len of buffer, including padding.
Tested with a PCI ne2000.
2003-01-15 22:20:03 +00:00
pk 5bb3d93538 srmmu_cache_flush: switch MMU contexts in all places where it matters.
(incidentally, this also makes Hypersparc MP machines mostly go).
2003-01-15 16:42:27 +00:00
reinoud e2dacd3f22 Small typo and add initialisation for the `bank' counter 2003-01-15 16:29:27 +00:00
mhitch 7295f9f909 Switch to MI installboot. 2003-01-15 07:25:51 +00:00
pk a458d9f040 Fix compiler warning induced by last change. 2003-01-15 06:57:12 +00:00
chs 0d8f526f58 fix two bugs in my last pmap rework:
- in tlb_flush_all(), don't skip TLB entries with the high bit on,
   I was confused about which MMU register it was using.  it's also fine
   to use the last hardware context.
 - in pmap_create(), don't allocate a hardware context for the new pmap.
   it's unnecessary, and when this would cause us to recycle all the contexts,
   it would result in the current process's context being set to 0
   (ie. the kernel's context).  the current process could then return to
   userspace without going through the context-switch code (and thus without
   having a hardware context reallocated).  this would lead to user mappings
   being entered in the kernel's context later, causing all sorts of trouble.
   add some assertions to catch this kind of thing.
2003-01-15 06:15:05 +00:00
thorpej c8763685b7 Allow the serial console boot blocks to be built with a specific
console speed, and build some of the more common ones.
2003-01-14 23:53:30 +00:00
thorpej f6f0dbd011 Stub out LIBCRT0, LIBCRTBEGIN, LIBCRTEND, and LIBC. 2003-01-14 23:51:34 +00:00
pk 9eb63b3b94 statintr: if interrupting code running below IPL_SCHED, call schedintr()
directly, saving the overhead of an extra soft interrupt.
2003-01-14 23:00:59 +00:00
pk c8226e1ce0 Define spllowerschedclock().
To be used in the same spirit as spllowersoftclock().
2003-01-14 22:58:00 +00:00
pk d45f77c6c8 Add CLKF_LOPRI() macro that allows a (timer) interrupt handler to determine
whether it is interrupting code running at a given IPL level.
2003-01-14 22:54:53 +00:00
pk ee7e8274a6 xcall: raise IPL to splsched() to prevent interrupts that take schedlock.
Otherwise we have a locking order problem with schedlock and xmsglock.
2003-01-14 17:30:55 +00:00
pk 18cd92ffe3 (Re)initialise the pmap structure fields that are not preserved on the
pmap pool cache all in one place.
2003-01-14 13:56:07 +00:00
fvdl 5692526bb6 Remove duplicate assignment. 2003-01-14 11:13:25 +00:00
fvdl d928619394 Add a couple more ServerWorks host bridges that explicitly need IO space
enabled.
2003-01-14 10:56:53 +00:00
fair 7b889057b4 Add bktr*, udsbr* and radio* at each;
allocate a major number for radio*
2003-01-14 08:40:53 +00:00
fvdl 28c12bee16 Actually return the number of found PCI interrupt routes in mpacpi_pcircount
(doh). From Wolfgang Solfrank.
2003-01-13 21:14:39 +00:00
bouyer 3075f204fd As pceb pulls in sio.c and sio_pci.c, is also needs the alpha_shared_intr
attribute.
2003-01-13 20:55:14 +00:00
augustss 12a30d35ea Add KGDB (commented out). 2003-01-13 20:48:16 +00:00
augustss cb7fde57d3 Make it compile on MPC6xx. I'm not sure about MPC40x. 2003-01-13 20:29:34 +00:00
augustss 5e9e39026f Add KGDB hooks. 2003-01-13 20:26:44 +00:00
augustss fdac9a76f1 Enable nested interrupts. 2003-01-13 20:26:22 +00:00
pk b50058b483 Broadcast I-cache flush in the `Unimplemented Flush' trap handler. 2003-01-13 20:00:34 +00:00
pk b4a1c0f6a0 Reset ddb_cpuinfo when leaving DDB. 2003-01-13 19:44:53 +00:00
pk 167ce8e6d3 Fix stack tracing once again.
Also check for trap frame boundaries when fetching the return address.
2003-01-13 19:44:06 +00:00
bouyer 15c016cd08 When padding frames smaller than ethernet minimum size, make sure we supply
a buffer long enouth, with the padding bytes initialised.
Also pad to ETHER_MIN_LEN - ETHER_CRC_LEN, not ETHER_MIN_LEN (padded frames
were 4 bytes too long).
2003-01-13 17:13:10 +00:00
pk df4b5f766b Remove UNLOCK_XPMSG() before cpu_halt(); it's not compatible with LOCKDEBUG
and it wan't chique in any case.
2003-01-13 16:59:17 +00:00
mrg 8d9571d120 remove cpu_hatched, cpu_hatch_sc and cpu_hatchstack. the first can use
the cpi->flags, the second is unused and the third is also cpi-idle_u.
2003-01-13 15:50:50 +00:00
pk 5642428f4e Use print_nolog() from xcall(), to avoid confounding things even further
by re-entering the scheduling code to wakeup syslog waiters.
2003-01-13 15:01:16 +00:00
pk 4641d55697 Halt any other CPUs in cpu_reboot(). 2003-01-13 01:35:45 +00:00
fvdl 991c0f3475 Install interrupt handlers properly when in apic mode. 2003-01-13 01:20:58 +00:00
fvdl 86ae625e2c Declare nioapics as well. 2003-01-13 01:19:34 +00:00
augustss 735022ab70 Fix bus_space_mmap() bug. 2003-01-13 00:21:53 +00:00
augustss e1dd8d6b94 The bus_space_mmap() returns a physaddr, not a page, on the PPC.
(This is broken in some (all?) of the PPC ports, it seems.)
2003-01-12 23:46:11 +00:00
fvdl a4880cb372 Export the ioapic softc linked list, for the benefit of the mpbios code. 2003-01-12 23:20:17 +00:00
fvdl d43937377e Handle all-apics entries for ioapic interrupts. 2003-01-12 23:19:44 +00:00
pk 2684c88122 fpulock: encapsulate required IPL raise in the FPU LOCK/UNLOCK macros. 2003-01-12 16:29:00 +00:00
uwe 24780840a1 Account softintr_common as uvmexp.softs, not uvmexp.intrs. 2003-01-12 06:11:01 +00:00
pk 55a3bd0a85 schedcpu() has been fixed; now we can notify another CPU about a pending
reschedule request.
2003-01-12 01:50:51 +00:00
pk c41718e9ec Remove needless indirection from the curproc() macro. 2003-01-12 01:19:00 +00:00
pk ae33d2b4e5 Use per-CPU virtual addresses for pmap_copy_page() & pmap_zero_page(). 2003-01-12 01:16:06 +00:00
augustss 337a21e08f Get interrupt swizzling right. 2003-01-12 00:52:45 +00:00
matt 12a9bdbb4f Add missing ethernets and phys. Update FireWire to current reality. 2003-01-12 00:50:29 +00:00
pk dab556c2b1 pmap_deactivate(): arguments for sp_tlb_flush() were reversed. 2003-01-12 00:34:52 +00:00
tsutsui 9a5dedeaea Fix -Wsign-compare and -Wuninitialized warnings. 2003-01-11 16:01:49 +00:00
tsutsui 5db9bf0614 Fix -Wsign-compare warnings. 2003-01-11 16:00:48 +00:00
aymeric 04afe0c722 Change the bootstrap procedure to avoid temporarily mapping physical memory.
Now, on the Amiga, we copy a small piece of code to chip memory and enable the
MMU from here.
On the DraCo, we setup %itt0 so that we shadow physical memory without
touching the page tables and very temporarily. The DraCo's memory layout
guarantees that there is no overlap in this case between physical and
virtual addresses.

This fixes a bug where Amiga's with physical memory at 0x200000 wouldn't boot
kernels >2M in size, and possibly other corner cases.

Joint work with Ilpo Ruotsalainen and Ignatios Souvatzis.
2003-01-11 10:47:08 +00:00
mrg 90d9434890 keep track of which cpu's have run a pmap and only broadcast tlb flushes to
cpu's who have done so.  implement pmap_deactivate() for MULTIPROCESSOR and
call it from cpu_switch() when we are about to switch proces and when we
enter idle().

with this change, i see significantly reduced tlb IPI traffic and fork/exec
bound processes -- such as "configure" -- run significantly faster, upto
15%.  i also obvserved a small (0-2%) benefit to CPU bound tasks as well.
2003-01-11 03:40:31 +00:00
rafal 30d29f647c Simplify CRIME rev. calculation (we don't appear to need the low nibble). 2003-01-10 20:39:22 +00:00
mrg e756303d08 expand db_proc_cmd() a little more. 2003-01-10 19:25:12 +00:00
pk 30cc38bdb5 Replace `want_resched' and `want_ast' globals by per-CPU variables. 2003-01-10 16:34:14 +00:00
augustss fc3c2cbc33 Make SYMTAB_SPACE actually work. 2003-01-10 16:18:45 +00:00
fvdl 9cf4ee5aef Move the check if ioapics were found outside of ifdef MPBIOS. Set the
polarity for the default ISA entries to 'default'.
2003-01-10 15:01:09 +00:00
fvdl 599d302034 If the polarity wasn't set in the mp config entry associated with the
ioapic pin, assume defaults (active low for level triggered, high
for edge triggered).
2003-01-10 14:58:46 +00:00
rafal 5c114e8d30 Get rid of some extraneous declarations/comments. 2003-01-10 03:48:40 +00:00
rafal 0cc0813590 Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k.  If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.
2003-01-10 03:22:48 +00:00
mjl d5afd1c04f Add major for bktr. 2003-01-10 01:32:55 +00:00
fvdl 3cef21b0f5 Pass acpi_softc down to mpacpi functions. 2003-01-10 00:45:52 +00:00
fvdl 14cc29cd5d Don't make assumptions about PCI bus numbers, carefully find all of
them before setting up the interrupt routing tables. This still
assumes that all bus numbers have been configured before this
is called.
2003-01-10 00:44:23 +00:00
thorpej b346ea724a Merge sparc and sparc64 <machine/signal.h>. 2003-01-09 23:25:24 +00:00
mrg 70628f1993 clean up db_proc_cmd() output slightly. 2003-01-09 18:00:51 +00:00
pk 18c8de0d93 It's now required to turn off traps in the srmmu cache flush ops in
non-MULTIPROCESSOR kernels too.
2003-01-09 12:29:52 +00:00
pk cbc8b8122d Check for existing soft interrupts too before trying to install a fast
interrupt handler.
2003-01-09 10:27:24 +00:00
mrg ec9ebd1af6 - s/xpmsg11/xpmsg15/
- clean up
- no need to reset the msg.tag
2003-01-09 05:55:30 +00:00
mrg 7386726570 remove a line accidentally commited in previous. 2003-01-09 05:27:09 +00:00
mrg 9b0c7030f5 call splclock() around the FPU_LOCK().
XXX: pk suggests we can make the this a sleeping lock.
2003-01-09 04:58:58 +00:00
soren 4a7a63dba9 URL for devids.txt moved. 2003-01-08 23:50:23 +00:00
aymeric b2618dcbd8 initialize the dv_unit field of our fake device structure to 0, as done on x68k.
This fixes the problem where no grf* console would be found on startup because
they wouldn't match with any parent.
While here, memset() that structure to zero so that we either pass or crash
right away if the MI code changes again. From Leo Weppelman, as done on atari.
2003-01-08 23:41:03 +00:00