Commit Graph

2955 Commits

Author SHA1 Message Date
thorpej 1827551cbc Don't do the symlink hack for fbio.h. Just use <dev/sun/fbio.h>. 2001-09-19 17:54:44 +00:00
pk 0a4ccdfd3c Some sun4c machine (e.g. an IPC) can also have just 7 register windows,
so check for a possible context switch optimization #if SUN4C too.
2001-09-13 13:25:48 +00:00
pk e85ab176f8 The SAVE macro used in the context switch code wound up being defined
only if MULTIPROCESSOR in rev 1.142, causing spurious register window
corruption on some machines.
2001-09-13 13:12:13 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
uwe 73b5928070 _bus_dmamap_load_mbuf: panic with correct function name. 2001-09-03 01:14:14 +00:00
atatat 5f25c01eff Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS.  bridge(4) doesn't compile there.
2001-09-01 23:08:40 +00:00
atatat 97c67a9bae Add bridge pseudo devices to GENERIC configs 2001-09-01 21:52:23 +00:00
eeh 84fb62aba0 Handle kernels with data+BSS segments larger than 4MB. 2001-08-30 23:00:19 +00:00
eeh 90ce2985e4 Do a more accurate compare. 2001-08-26 05:46:31 +00:00
eeh 5b0492f05e Fix debug printf. 2001-08-26 05:44:46 +00:00
mrg 48fcc1a2c3 update a comment about R_UA_32 relocs. 2001-08-25 15:03:19 +00:00
wiz c52d355d71 "wierd" is weird. 2001-08-20 12:20:01 +00:00
wiz 1e378c4c12 precede, not preceed. 2001-08-20 12:00:46 +00:00
chs 72b6b0b123 in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
2001-08-19 18:08:30 +00:00
eeh 73ff12bf97 Bump version. 2001-08-16 23:57:08 +00:00
eeh f6420907ca Support for raidframe roots. I hope. (Someone needs to test this.) 2001-08-15 20:10:24 +00:00
eeh 1cf3d55cda Make the loader extend the data+BSS segment to 4MB so we don't need to
shuffle it around in pmap_bootstrap().
2001-08-15 20:08:15 +00:00
jdolecek a95aa7326a g/c _remque()/_insque(); use the C version in libkern 2001-08-13 06:10:09 +00:00
jdolecek 74954dadf9 use unsigned variable types as appropriate 2001-08-05 18:07:51 +00:00
mrg ca351acf50 avoid an unused variable warning 2001-08-05 03:03:16 +00:00
matt d4a7b6fc1c Fix non-properly ifdef'ed SUN4 only code. 2001-08-02 18:06:22 +00:00
bjh21 10414d85a9 Undo version bump. The sparc ofwboot doesn't use loadfile(). 2001-08-02 16:22:46 +00:00
bjh21 ad2c12a28d Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading.  I should probably have done this at the time,
but it's better late than never.
2001-08-02 12:24:05 +00:00
chs 29f6bd03da use pmap_k* for buffer cache pages. 2001-07-29 23:56:33 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
mrg 03faa7ca71 use CPU_READY(). add cross_call() code. 2001-07-10 15:15:24 +00:00
mrg 17f1119062 use CPU_READY(). disable smp_tlb_flush_*() for now; they hang. 2001-07-10 15:12:59 +00:00
mrg cfde907d22 de-__P()ifify. prototype cross_call(). 2001-07-10 15:11:54 +00:00
mrg 781b07308a enable XPMSG_FUNC support. 2001-07-10 15:09:04 +00:00
mrg 8daf254cdc use CPU_READY() 2001-07-10 15:03:46 +00:00
mrg 7e7f85881b new CPU_READY() macro, determines if a CPU is accepting IPIs. 2001-07-10 15:02:50 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
abs 01b024cd5b Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
2001-07-08 16:32:12 +00:00
mrg 184c606354 modify setpgt4m_va() to clean up (remove) several #ifdef MULTIPROCESSOR points.
catchup pmap_kenter_pa4m() and pmap_kremove4m() with SMP safe PTE updates.
2001-07-08 15:58:42 +00:00
mrg 3079cac680 - implement XPMSG_DEMAP_TLB_PAGE, XPMSG_DEMAP_TLB_SEGMENT,
XPMSG_DEMAP_TLB_REGION, XPMSG_DEMAP_TLB_CONTEXT and XPMSG_DEMAP_TLB_ALL
- new setpgt4m_va(), call it when you need to ensure all cpus see the same value
- new smp_tlb_flush_context(), smp_tlb_flush_region(), smp_tlb_flush_segment(),
smp_tlb_flush_page() and smp_tlb_flush_all() functions, if MULTIPROCESSOR
- define the tlb_flush*() routines to the smp_*() versions, if MULTIPROCESSOR
- sun4m safe PTE update updatepte4m() routine, vaguely derived from code posted
by torek@bsdi.com on port-sparc a couple of years ago.
- new nmihard_lock to synchronize other cpus during hard NMI.  (XXX: should be
a bit smarter about which CPU's do/don't check in.)
2001-07-07 21:23:53 +00:00
mrg 0e295568bb lock xpmsg_lock around the safefpu ipi. 2001-07-07 20:12:54 +00:00
mrg eafaa5ffea - replace CPUFLG_STARTUP with new CPUFLG_READY scheme, used after startup has
occured.  cpus now spin waiting for new `go_smp_cpus' variable to go non-zero.
- new xpmsg_lock that must held around all cross call activity.  new macros:
LOCK_XPMSG() and UNLOCK_XPMSG().
- delete delay(1)/cache_flush gone from raise_ipi_wait_and_unlock(), it incurred
a stupid performance penalty.
2001-07-07 20:09:15 +00:00
chs 30e0b596c7 implement pmap_k{enter_pa,remove}() correctly.
other cleanup in preparation for upcoming UVM changes.
2001-07-05 07:05:02 +00:00
mrg cfbef2cdef pause other cpus from KGDB. XXX: need to implement other cpu trapframe access. 2001-06-30 20:17:47 +00:00
mrg 6aec628d90 db_cpu_cmd is DDB specific; move it into the DDB specific portions of this file. KGDB compiles again. 2001-06-30 20:16:49 +00:00
mrg e7a53a87be for now, KGDB kernels do not have access to multiple cpu's trapframe. 2001-06-30 20:15:02 +00:00
mrg 9dbb764f88 KGDB needs both zs_putc and zs_getc; make them non-static. 2001-06-30 20:14:00 +00:00
darcy ce0ec1e208 Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores.  It appears that there are no overrides
in the code and each file has the following added.

 options    SYSVSEM     # System V semaphores
+#options   SEMMNI=10   # number of semaphore identifiers
+#options   SEMMNS=60   # number of semaphores in system
+#options   SEMUME=10   # max number of undo entries per process
+#options   SEMMNU=30   # number of undo structures in system
 options    SYSVSHM     # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten.  It was done separately.
2001-06-30 11:00:31 +00:00
mrg 2307774c9a #include <machine/autoconf.h> 2001-06-29 03:32:10 +00:00
uwe 6a127dddd8 KNF: put parens around returned values. 2001-06-26 20:35:54 +00:00
uwe b4ded8ad61 Some OpenFirmware client services return -1 on error, while the rest
of the code expects zero.  Add some wrappers so that opf promops are
consistent with obp promops.  Now microSPARC-IIep correctly panics ;)
While here, propagate 'static' to opf_* definitions.
2001-06-26 20:21:59 +00:00
uwe 67a5f8fc0a OF_finddevice uses -1 to signal error. Make it zero to match what
the rest of the code expects the error value to be.
2001-06-26 19:37:54 +00:00
uwe 666d09dcfc Add PROM patches (forth code) as a table indexed with root node name
and prom version.  Little tweaks to prom during secondary boot are
much easier then fragile work-arounds in the kernel.  Currently this
is used for JavaStation 1 with OBP3.
2001-06-21 03:13:05 +00:00
uwe 25d726e4eb Attach serial console at com. 2001-06-20 03:13:19 +00:00
wiz f3f6c5b675 `accessible' only has one `a'. 2001-06-19 12:52:20 +00:00
mrg cbe144f269 copy tlb_flush*() #defines here, but rename them tlb_flush*_real(). this
allows for tlb_flush*() to be defined differently if MULTIPROCESSOR.
2001-06-18 15:42:06 +00:00
thorpej 8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
wiz c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
uwe 02293e0ea7 Be prepared to get OpenFirmware client entry in either %o3 (PROM way)
or %o0 (our boot code passes romp in %o0 even for OF machines).
Discussed with pk.
2001-06-12 21:01:26 +00:00
pk c522c18479 Use NFB from "fb.h" to include console framebuffer support. 2001-06-11 13:34:51 +00:00
mrg 53e9189ae7 oops; non-primary cpus should still spin, not jump to idle. 2001-06-10 10:50:20 +00:00
mrg 1375a0c31e don't run SMP flush routines if (cold); be sure cpus[n] is valid. 2001-06-08 16:25:04 +00:00
mrg 72c1d9df6d more SMP work: finish up ipi's, SMP DDB support, cpu startup issues, and
idle() u area issues:

in nmi_sun4m(), if this is a soft NMI and DDB is configured, setup a trapframe
and pass it to nmi_soft().  in cpu_hatch(), spin until our cpu's flags no longer
have CPUFLG_STARTUP set.  then, setup registers and jump to
idle_enter_no_schedlock.  in idle(), if MULTIPROCESSOR, always switch to this
cpus idle u.  a minor optimisation to cpu_switch().
2001-06-08 16:15:23 +00:00
mrg aa2443e7c8 if DDB, when pausing, save a copy of this cpus registers while paused. 2001-06-08 09:51:40 +00:00
mrg 67fc8c19be if MULTIPROCESSOR, make the registers virtual, so that we can access other
processors registers.  rework enter/exit ddb code to look more like the i386
code.  make "mach cpu" and "mach cpu N" work.
2001-06-08 09:49:28 +00:00
mrg 7666800896 need a per-cpu ddb_regs pointer. 2001-06-08 09:45:50 +00:00
mrg 1ae283fcdd use raise_ipi_wait_and_unlock(). 2001-06-08 09:40:31 +00:00
mrg 7bb4cfc2db split {sunos,svr4}_sigcode out for LKMs 2001-06-08 04:49:45 +00:00
mrg 9a3de71872 add CPUINFO_FLAGS 2001-06-08 04:21:41 +00:00
uwe 9634e929d1 Oops, missed in the previous commit: bump PIL_SER to 13 as well.
It seems to be unused...
2001-06-08 01:33:32 +00:00
mrg d3b1cc167d more SMP work:
make IPI's work.  modify boot_secondary_processors() to clear the startup flag
in each cpu.  new raise_ipi_wait_and_unlock() that calls raise_ipi(), waits
for the cpu to acknowledge it got the message, and then unlocks the msglock.
use the new framework in mp_{pause,resume}_cpus().  nmi_soft() takes a
`struct trapframe *', to be used by ddb.
2001-06-07 17:59:47 +00:00
mrg 51b7188429 make lkm friendly. 2001-06-07 17:49:51 +00:00
uwe 92359cee67 Bump splserial to 13 to support com port on Tadpole and JavaStations.
While I'm here - remove redefinition of PIL_TTY, move splnet
definition to keep the list sorted and sync its comment with reality.
2001-06-06 13:45:18 +00:00
mrg 28bd948dba finish moving context management back to being global. add a new ctx_lock
for context administration.
2001-06-03 04:03:28 +00:00
thorpej f0f999ee47 Skip the pseudo-header checksum if nxt == 0. 2001-06-03 01:37:28 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
chs 9bde6cff5c remove bogus curly braces from a structure forward-declaration. 2001-06-02 01:19:29 +00:00
mrg 283e406cb0 drop to prom on "halt" as well. 2001-05-31 08:55:19 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
mrg 3783ca5d30 define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
2001-05-29 02:20:20 +00:00
pk aad64f942b !_LKM inclusion protection for opt_kgdb.h 2001-05-27 20:59:22 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
chs 772a964bef fix typo. 2001-05-26 18:16:01 +00:00
chs 118ddca24a replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}. 2001-05-26 16:32:40 +00:00
pk e95e804c2f Pull in "opt_kgdb.h"; see PR#13036. 2001-05-26 10:22:32 +00:00
uwe b3421335d9 There is no iommu prom node on JavaStation 1 and sbus node is directly
under root.  If /sbus is encountered on sun4m - attach implied iommu
first and attach /sbus under it.  Adjust bootpath accordingly to match
the attachment.
2001-05-21 22:44:07 +00:00
petrov 2867b0b94c PR#12885, added PROM name translations for fas, from John Heasley <heas@shrubbery.net> 2001-05-21 21:25:28 +00:00
uwe 2a553a6c8d Implement notimplemented() for OpenFirmware.
Implement opf_nextprop().
Reuse obp_v2_putstr for OF promops.
2001-05-20 20:38:24 +00:00
uwe 43adc87035 Save OpenFirmware client interface handler in romp, where it is
expected to be.  GC unused opf_romp variable.
2001-05-20 17:28:16 +00:00
kleink 9e162d4ea5 Delint my previous change. 2001-05-12 22:42:07 +00:00
pk 8001e23cd0 * reserve NBPG et.al. for kernel usage only.
* remove obsoleted comment on `physmap'.
2001-05-10 11:01:08 +00:00
hubertf 8093ee4bba vlan does not belong to the IPv6 devices (gif, stf, ...), so seperate it
visually.
2001-05-05 00:11:48 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
kleink 5652bfe409 Re-add accidently removed line continuation in previous; noted by
"Valeriy E. Ushakow" <uwe@ptc.spbu.ru>.
2001-05-01 20:37:44 +00:00
thorpej cf67ac7122 Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
2001-05-01 02:19:13 +00:00
kleink 99d1259e7f Don't let [gs]etcontext() and friends clash with userland. 2001-04-30 19:35:13 +00:00
thorpej 2b27ac7a99 Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure.  Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM.  These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg.  As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now).  Changes to other pmap
modules will follow.
2001-04-29 22:44:31 +00:00
kleink fe3c9ceaf7 * Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
  explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
  macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
  intmax_t, pointer-type and size_t arguments.
2001-04-28 15:41:28 +00:00
kleink 99054d7a6c Add definitions for C99 fastest minimum-width integer types. 2001-04-26 16:25:19 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
thorpej 92891185c3 Don't need a prototype for pmap_bootstrap_alloc(); the function
does not exist in the pmap API anymore.
2001-04-23 23:53:07 +00:00
pk f33abf3809 Bump PIL_NET to 7; some sbus network boards use this interrupt level.
Nuke PIL_IMP.
2001-04-23 14:40:03 +00:00
thorpej 69fd928d7c Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
2001-04-23 01:02:06 +00:00
thorpej 55044638aa Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
2001-04-22 23:42:11 +00:00