Commit Graph

2987 Commits

Author SHA1 Message Date
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
thorpej 69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
thorpej 4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej 7f10ba88b1 #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
2001-04-21 23:51:14 +00:00
thorpej 15f731ee94 pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations.  Since these pmaps don't
defer anything, pmap_update() is a noop.
2001-04-21 17:25:01 +00:00
pk d373e2120f Fix fdc_c_hwintr() and use it as a fall back if the `fast trap' handler
cannot be registered.
2001-04-19 14:53:36 +00:00
pk 4485b7f720 pmap_enter():
* turn ad-hoc `pmap resources allocated during sleep' into a panic condition
  (this should all be prevented by higher level VM locking).
* arrange for ENOMEM to be returned if PMAP_CANFAIL is on, and malloc()
  and/or pool_get() fail.
2001-04-17 20:14:46 +00:00
kleink 40c8d08347 Oops, intptrs are always long integers. 2001-04-17 13:46:02 +00:00
kleink f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink 739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
kleink 7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
kleink 9133b51cd8 Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
2001-04-12 22:01:18 +00:00
pk cd24bc13e7 Account for the number of counter ticks that elapse while statintr()
processing takes place. This prevents stat clock skew by a factor
approximately proportional to stathz (not a serious problem if stathz==100;
but considerable already if stathz==1000).
2001-04-09 21:28:50 +00:00
pk 2c2e7aca80 Add macro to convert a counter register value to microseconds. 2001-04-09 21:17:33 +00:00
pk a0daff5647 proc_trampoline(): mave the new process run at base interrupt priority level.
This is especially important for in-kernel processes started from here,
which would otherwise keep running at splclock().
2001-04-09 18:18:48 +00:00
pk 0929f3662e * Missing PROM_OPENFIRM: case in getdevtype() and prom_getether().
* In getdevtype(), use prom_instance_to_package() to get to the device node.

From Valeriy E. Ushakov on port-sparc@netbsd.org.
2001-04-04 15:41:46 +00:00
petrov 1c9cc1b092 use NCR_F_DMASELECT instead of ncr53c9x_dmaselect 2001-03-29 03:30:19 +00:00
pk a97039b0ae pmap_release(), pmap_pinit() and the `pm_regstore' field are obsolete. 2001-03-26 23:18:51 +00:00
pk 4de5b658ad Use a pool cache for pmap allocation. The cached pmap structures include
a ready-to-use level 1 page table (on sun4m) and MMU context.
A simple `fork()' test shows an improvement in spent system time of
around 4 percent (which is just a bit disappointing, IMO, but it's
an improvement nonetheless).
2001-03-26 23:12:03 +00:00
pk 104bada017 Missing KERNEL_PROC_LOCK() in the WIN_OF trap code. 2001-03-26 21:58:34 +00:00
lukem 20ba07f2fe - add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately

- create more helper macros:
   . cdev__xyz_init(c,n), such as cdev__ocri_init() for
     /* open, close, read, ioctl */, etc.
   . cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
     method `R' and the comments now read /* xxx (read) yyy */ instead
   . cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
     as well

- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
  always DTRT WRT returning a valid result.  (a few devices previously
  incorrectly returned ENODEV)

- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
  == 0, because it doesn't matter if dev_type_stop isn't implemented in that
  case, and it allows the use of the cdev__xyz_init macros. certain ports
  (sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
  drivers, whereas everything else uses enodev

- ensure that the comments are accurate WRT the behaviour of a given entry
2001-03-26 12:33:22 +00:00
mrg 74786e7894 remove overzealous locking changes. 2001-03-22 15:56:43 +00:00
mrg 0fa02bb6e6 sync with sparc64. 2001-03-22 06:21:43 +00:00
mrg e563dea3f6 sync with sparc64 (just some debug messages.) 2001-03-22 06:21:15 +00:00
lukem 723cd818d8 move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
2001-03-21 22:25:52 +00:00
mrg 47e6a41505 only lock the kernel around sy_call if !SYCALL_MPSAFE 2001-03-21 09:01:16 +00:00
pk b54ea24924 Merge in4_cksum(). 2001-03-21 00:38:47 +00:00
chs e533061fce in mem_access_fault*(), when invoking the pcb_onfault mechanism, pass the
return value of uvm_fault() to the onfault routine via %o0.  users of
pcb_onfault now return this value to their callers rather than always
returning EFAULT. this allows i/o errors in VOP_GETPAGES() to be returned
back to read(), etc.
2001-03-18 17:11:22 +00:00
mrg 3bb2b205f9 show the cpu a process is running on in proc 2001-03-18 14:24:10 +00:00
mrg 45d39a2030 redo previous slightly differently. 2001-03-18 14:10:34 +00:00
mrg e82b5bb630 "mach slock" for simple_locks 2001-03-18 14:06:10 +00:00
mrg 0fcd32a415 "mach cpu" is MP only. 2001-03-17 01:54:17 +00:00
mrg e44f962032 steal a few mach commands from sparc64. add a #if 0'ed "mach cpu" 2001-03-16 10:28:53 +00:00
mrg 48fc32e16e #ifdef DDB, add new function cpu_debug_dump(). define CPU_INFO_ITERATOR and
CPU_INFO_FOREACH.
2001-03-16 10:26:11 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
mrg ef26546e15 lock the kernel around calling interrupt stubs. 2001-03-15 03:20:43 +00:00
mrg 122b3a0e67 sprinkle KERNEL_LOCK() and KERNEL_PROC_LOCK() where they're missing. add
SYSCALL_DEBUG support to trap.c.
2001-03-15 03:01:39 +00:00
tsutsui 43bd337868 Update for recent changes to the MI i82586 driver.
(added 'why' argument to the channel attention hook function)
2001-03-13 16:31:14 +00:00
pk 1b84e6fb33 pasto: sc_maddr => sc_mem 2001-03-09 10:19:54 +00:00
thorpej 5dedbd1c97 Duh, don't forget the proc argument. 2001-03-08 01:46:18 +00:00
thorpej 3423154d78 Use bus_dmamap_load(), not bus_dmamap_load_raw(). 2001-03-08 01:38:57 +00:00
thorpej 2c4c690f14 Add the BUS_DMA_STREAMING flag. 2001-03-07 22:42:16 +00:00
pk a917eabaec * A couple of `#if defined(SUN4M)' should be `#if defined(MULTIPROCESSOR)'
* Print notice if not all CPUs were attached
* Switch to SMP version of cache flush routines in just one place: in
  cpu_attach() after all known CPUs have been configured.
2001-03-06 13:39:22 +00:00
pk b91b8796d9 Implement MSGBUFSIZE option. 2001-03-05 16:46:09 +00:00
pk 8eeb7a8a79 mp_{pause,resume}_cpu(): avoid crash when cpu(s) not yet configured. 2001-03-05 16:45:22 +00:00
pk f3c74253b0 Fix `flags' argument to pmap_enter(). 2001-03-05 16:43:34 +00:00
pk 90e5095df2 Fix syntax error in previous change. 2001-03-05 07:16:19 +00:00
pk 4e14c96788 In debug printf: missing quote on format string. 2001-03-05 07:04:01 +00:00
pk a1b18f9435 Fix syntax error in previous. 2001-03-04 21:28:11 +00:00
pk bac5be6461 Simplify `bad alias' handling in pv_link()/pv_unlink():
- there's no need to have different PV_NC flags for sun4[c] & sun4m

	- deal with kvm_uncache() being called on a managed page in a
	  separate helper function that deals with the caching state
	  within the pv list for that page, avoiding interference with
	  the `bad alias' removals in pv_unlink().

Note that currently never called for managed pages, but for now I'm
keeping the support in.
2001-03-04 21:12:24 +00:00
mrg b301668cb5 build sparc64 bootblk, ofwboot, & ofwboot.net on sparc 2001-03-04 15:34:45 +00:00
mrg e85a9ee949 this is a sparc64 program. so -DSUN4U, machine -> sparc64. cleanup. 2001-03-04 14:50:05 +00:00
mrg 0a1cdb5f63 allow sparc "make release" to build a sparc64 capable 32 bit kernel. 2001-03-04 10:12:56 +00:00
pk 51668836b3 Remove unused declaration of `cpcb', which is no longer a global variable. 2001-03-03 19:42:38 +00:00
pk d74da58795 alloc_cpuinfo: zero all the memory we allocate; not just the `cpuinfo' part.
cpu_attach: initialize `curpcb->pcb_wim' for each additional CPU.
2001-03-03 19:40:28 +00:00
pk bb5f16e6e0 Sprinkle KERNEL_PROC_LOCK()s at the kernel entry points. 2001-03-03 19:11:02 +00:00
pk bba5d36487 Initialize the IPI message locks. 2001-03-02 17:00:13 +00:00
pk 0548d12369 * proc_trampoline: call `proc_trampoline_mp()' #if MULTIPROCESSOR;
currently necessary to acquire the `running in kernel mode' lock;
  pointed out by Bill Sommerfeld/Simon Gerraty.

* remove reference to `cpu_set_kpc()' from comments, as we don't have it.
2001-03-02 10:27:00 +00:00
pk e999fb6b77 bootstrap area: remove dead code + some trivial reformatting 2001-03-02 09:48:13 +00:00
pk d98e8d5bca * Correct the `flags' argument in call to pmap_enter().
* Enable the message buffer at a temporary virtual address (KERNBASE)
  in bootstrap(), if that can be done.
2001-03-01 16:14:25 +00:00
pk 813b8d79fd * Correct the `flags' argument in several calls to pmap_enter().
* message buffer initialisation:
	- change the buffer size to 8192 on all platforms
	- don't assume the buffer is always located at physical address 0
	- drop the SUN4 hack that left first half of the page unused;
	  I believe this is no longer necessary, since the msgbuf
	  data structure is duely sanity-checked before use in initmsgbuf().
2001-03-01 16:09:25 +00:00
pk 6ae8b9ec6d Drop MSGBUFSIZE; we don't use it and it can't currently be configured
to a different value anyway.
2001-03-01 15:59:04 +00:00
pk 80ba31bd21 Drop the managed() macro; it is no longer used.
State the intended use of the vm_{first,last,num}_phys variables that are
still exported from pmap.c.
2001-03-01 15:56:47 +00:00
pk aad0b0bcd2 Change `pv list' management to use the hooks provided in the `vm_physmem'
structure. While this comes with the cost of having to search the
`vm_physmem' array every time need to find a PV entry corresponing to
some physical address, we gain the flexibility needed to support
arbitrary non-contiguous ranges of physical memory addresses.

Also, eliminate the need to sort the memory address ranges as presented
by the machine's PROM, and the requirement that physical memory starts
at address 0 (when possible).
2001-03-01 15:52:18 +00:00
pk b87a62e09a Make sure that e.g. myetheraddr() has a valid idprom pointer as soon as
possible on sun4, since it may be used before the clock attaches.
2001-02-28 14:45:23 +00:00
mjacob 312d560493 add SES device (unused #4) 2001-02-28 00:06:28 +00:00