Commit Graph

2570 Commits

Author SHA1 Message Date
pk c6b6f3883a Remove old-style boot device recognition. 2000-01-11 12:59:43 +00:00
pk a744e28304 Cleanup the list of exported headers a bit. 2000-01-10 22:09:34 +00:00
pk 20018b9be8 Add special code for recognising a floppy drive as the boot device.
Sun's PROMs don't co-operate here, so there are _hacks_ involved...
2000-01-09 20:53:30 +00:00
pk a77d141b28 Deal with `24 bit' devices which can still be plugged into an Sbus slot. 2000-01-07 10:54:11 +00:00
pk 8cbc7288d0 * Expand IOMMU DVMA space to top of address space.
* Remove confusing comments.
2000-01-04 15:08:30 +00:00
kleink 693059feda const -> __const and include <sys/cdefs.h> earlier; fixes PR lib/9052
by Takahiro Kambe.
2000-01-04 14:20:05 +00:00
pk 4681e48204 Remove private kernel members from `struct fpreg'; update accompanying comment. 1999-12-30 23:59:29 +00:00
pk f152d57aa2 Make sure to reset the FP queue when loading new values into FP registers. 1999-12-29 15:21:27 +00:00
kleink 11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
jdc 016b030623 Added tctrl.h 1999-12-20 09:49:20 +00:00
garbled e89216c73c avoid uninterruptable sleep on a CMD_REQ ioctl. 1999-12-17 00:32:25 +00:00
thorpej 18ab712015 Provide cpu_boot_secondary_cpus(). 1999-12-16 20:24:58 +00:00
garbled f02b80418b add <machine/tctrl.h> where needed.
Add some undocumented commands to the ts102 registers file, and fix a few
typos.

Modifications to tctrl.c:

Add entrypoints to driver for open/close/ioctl/poll.
Make device work with apmd. (still no support for suspend/sleep)
Make device work with ENVSYS API.
Slightly restructure handling of events.
Add function to make microcontroller requests.
1999-12-15 08:12:30 +00:00
garbled dd9ad672a9 add entrypoint for tctrl device, and add <machine/tctrl.h> to includes for
machdep.c
1999-12-15 08:03:43 +00:00
garbled 5e200de9b7 Add new spl level for tadpole devices splts102.
Device entrypoints for tctrl device (tadpole micro controller)
add header for direct-access ioctl to the tadpole microcontroller.
1999-12-15 08:01:00 +00:00
ragge 26e1b45757 clrnd()/clbase() discarding. 1999-12-05 11:56:30 +00:00
ragge 0513268399 CL* discarding. 1999-12-04 21:13:19 +00:00
mrg b27ecf75a9 oops; remove part of the previous that was not intended (yet). 1999-11-30 07:56:28 +00:00
pk a24fb44ddf Pull header files from `syssrc' since we use libsa/loadfile(). 1999-11-29 14:49:12 +00:00
mrg 2c11d38827 add some missing #ifdef SUN4M to the MP-handling code. 1999-11-27 14:54:53 +00:00
mrg 9a6c8313f7 minor cosmetic merges; long way to go here. 1999-11-27 12:14:26 +00:00
mrg 264af07cff merge sparc64 types.h; these files are now identical. 1999-11-27 11:33:39 +00:00
mrg d7e14b468a more sparc64 merging; these files are (basically) identical. 1999-11-27 11:20:41 +00:00
mrg faa527dcc9 merge sparc64 limits.h; these files are now identical. this includes
a `fix' for when s?size_t was changed from int to long but the
definitions of S?SIZE_MAX were left as U?INT_MAX.  these are now
U?LONG_MAX.
1999-11-27 11:14:40 +00:00
mrg 492e85822e MNN has been standard for a Long Time. 1999-11-27 10:22:19 +00:00
mrg 484cb25f55 s/long/int/ to make this identical the sparc64 version. 1999-11-27 10:10:02 +00:00
pk e0118ca933 Suppress the `machine' symlink when making target `obj'.
Also add it to the clean target list.
1999-11-25 13:27:30 +00:00
pk 633fd1e1cc Check presence of Sbus interrupt properties before using them. 1999-11-21 15:23:01 +00:00
itojun e9a0023b37 bring in content of GENERIC.v6 into GENERIC.
remove GENERIC.v6 file (as it is part of GENERIC now).

"faith" interface is commented out by default as it is not really for
general use.
IPsec items are commented out as well, though we can enable "options IPSEC"
without export-related issue ("options IPSEC" will enable authentication
portion only).  We may need to think about it again.

if you have problem compiling with INET6 on archs I do not have access to,
please contact me.

XXX what to do with arch/arm32/SHARK{,.v6}?
1999-11-21 14:00:37 +00:00
chs 7fa6c707d3 update a prototype for the new pmap_enter(). 1999-11-17 06:16:49 +00:00
fvdl 8bec119fcc Add commented out option SOFTDEP to all GENERIC kernels. 1999-11-15 19:10:44 +00:00
fvdl d116707af0 Add
prefix ../gnu/sys
cinclude "conf/files.softdep"
prefix

to all std.* files, so that soft dependencies can be activated using
"options SOFTDEP".
1999-11-15 19:00:25 +00:00
thorpej 4ab7f024dc Fix a couple of pmap_enter() calls I missed. 1999-11-15 00:06:58 +00:00
thorpej 2cfc62b5ae Update for pmap API change. 1999-11-14 02:39:09 +00:00
matt 3ca3e51df8 Nuke TCP_COMPAT_42. Use sysctl to enable it if required. 1999-11-13 20:56:14 +00:00
pk a9cdefb6e6 Remove implementation of the `-h' and `-a' options. 1999-11-13 12:09:41 +00:00
thorpej 1946167939 Update for pmap_enter() API change. No functional difference. 1999-11-13 00:30:26 +00:00
kleink c52f431558 Bring high-resolution time interfaces closer to SVR4:
* Change gethrtime() to use mono_time.
* gethrvtime() is defined to return the lwp/process's virtual time;
  use p_rtime augmented with the current runtime.

Reviewed by: christos
1999-11-12 20:45:44 +00:00
matt d2434ef890 remove reference to auxiotwo 1999-11-12 06:15:38 +00:00
matt 73ae3282ab turns we need to tweak the auxio1 reg to enable the modem. also fix a call
to sbus_bus_map.  it's closer to working but I wonder if COM_FREQ is the
right value.
1999-11-12 05:20:03 +00:00
matt 8ffb2596c7 make this compile under current 1999-11-12 04:42:19 +00:00
matt 3744fe193f add some stuff needed for pcmcia support 1999-11-12 04:41:46 +00:00
matt 1138f7e762 add COMPAT_14 1999-11-11 15:55:53 +00:00
mycroft 8f05f33e49 Move the boot block load address from 3MB to 7MB. The INSTALL kernel is
already too large, and GENERIC won't be far behind.
1999-11-09 18:39:41 +00:00
pk 560567d851 Include <sys/exec.h> instead of <a.out.h>/ 1999-11-08 23:29:56 +00:00
pk a96dbfa190 Remove inclusion of unused headers. 1999-11-08 23:29:05 +00:00
pk 1ad621b38f Handle empty `input/output path' when looking for console device; patch
from Brian D. Chase.
1999-11-07 16:36:16 +00:00
mycroft 4c0911c827 Make this more current. 1999-11-07 01:09:12 +00:00
chs 07e5d68b51 several fixes to copy{in,out,}str() from charles and myself:
don't panic if maxlen == 0, just return ENAMETOLONG.
treat maxlen as unsigned like the manpage indicates.
avoid crashing if the userspace address is >= KERNBASE.
make sure *done is 0 when no bytes are copied.
1999-11-05 04:49:26 +00:00
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
pk fbfe8a4407 Comply with recent MI scsi changes. 1999-10-21 13:46:06 +00:00
phil 54eed2bc37 Add in the Coda file system and pseudo device. 1999-10-14 16:09:31 +00:00
phil 15ef719178 Add a psuedo-device for coda. 1999-10-14 00:08:45 +00:00
jdolecek 7f589dba84 rename the MD Debugger() to cpu_Debugger()
add MI Debugger() which switches to console if wscons is used prior
to calling cpu_Debugger()
1999-10-12 17:08:56 +00:00
pk 8800f180c3 Call find_cpus() much earlier so we can use the result while bootstrapping
all that pmap stuff.
1999-10-04 19:27:04 +00:00
pk de22be977a Since a context table is now pointing at the correct per-CPU region table
at all times, we can dispense with the hackery that patches the magic entry
at context-switch time.
1999-10-04 19:23:49 +00:00
pk b19b1fc269 Each process (i.e. each `pmap') needs a region table for each CPU.
Implement this by making the fields `pm_reg_ptp' and `pm_reg_ptp_pa'
pointers to an array of `ncpu' region table pointers and corresponding
physical addresses.

This is a somewhat unfortunate side effect of having the per-CPU data
addressable by the same virtual address on each CPU.
1999-10-04 19:18:33 +00:00
pk fa65ea182c Implement sysctl `machdep.booted_kernel'. 1999-10-04 19:11:42 +00:00
hubertf 1972c67981 Document what qec, be and qe is.
Thanks to Jason Thorpe for explaining!
1999-10-04 19:02:55 +00:00
thorpej 2b02403498 The old dk_establish() hack doens't work anymore, and should be
garbage-collected.  device_register() is the One True Way.
1999-09-30 23:01:53 +00:00
thorpej 11cae42531 Centralize the declaration and clearing of `cold'. 1999-09-17 19:59:35 +00:00
thorpej 3b01d1b872 Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
1999-09-15 18:10:33 +00:00
chs f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
pk 132d930986 Fix printf format (see PR#8358). 1999-09-10 08:42:58 +00:00
sommerfeld 8602e6124d add svr4_lwp.h to let this build again. 1999-09-08 04:02:48 +00:00
hannken 5c57af78d2 Remove now unused variable `i'. 1999-08-27 10:49:20 +00:00
thorpej 84670a44ef Initialize the default colormap to 0 == black, all others == full white. 1999-08-26 22:53:41 +00:00
thorpej 58858e0968 Suns use black-on-white as the default rcons colors. 1999-08-26 20:50:08 +00:00
ad 2c13aef146 - Update to match new rasops_init semantics
- Set RI_FULLCLEAR so that we clear the *entire* display
- Set RI_CURSOR and cursor position so that old cursor glyph gets wiped

Fixes PR: port-sparc/8121
1999-08-24 11:12:08 +00:00
thorpej 2cf3330a1b Garbage-collect reference to <sys/dmap.h>. 1999-08-23 22:29:37 +00:00
sommerfeld 2e95b13365 Use ${SIZE}, ${OBJCOPY} rather than size and objcopy. 1999-08-21 14:18:36 +00:00
simonb 3c185af5fd Include <sys/endian.h> after defining whether where are little- or
big-endian.  i386, pc532 and vax still include <machine/byte_swap.h>
and define macros for the {n,h}to{h,n}*() functions.  mips also
defines some endian-independent assembly-code aliases for unaligned
memory accesses.
1999-08-21 05:53:50 +00:00
simonb 06a92524c2 Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
1999-08-21 05:39:51 +00:00
ad 8974edc06c The 8bpp PROM console uses index 0 as black, 255 as white. Update ri_devcmap
to cater. Partially addresses PR port-sparc/8121.
1999-08-13 09:59:47 +00:00
matt 74ed5b7f0f Add <machine/apmvar.h> for sparc so that apmd can be built. Eventually
this allow it work on Tadpole SPARCbook 3 laptops (and/or other sparc
with power management).
1999-08-11 02:00:09 +00:00
matt 4efe97d08f remove some more devices that are not the tadpole.
add the tctrl device (which controls the tadpole microcontroller).
1999-08-11 01:46:25 +00:00
matt ec55b51b3a do a little colormap manipulation. use the tft power hooks in tctrl 1999-08-11 01:41:06 +00:00
matt 385ed7074b This now works properly and uses interrupts. If you close the lid, the
screen will turn off and when you open the lid screen turns on.  If you
do too rapidly, the driver won't be notified but you can press the micro
switch and it will come back.  Also "halt -p" now works so you don't
have to do Pause-P to powerdown.
1999-08-11 00:46:06 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
christos 4f5d78ae59 s/(sbus | obio)/sbus for the sbus attachments. These were vestiges from
the old code.
1999-08-10 12:50:35 +00:00
christos be4c7c3513 split bwtwo driver in obio and sbus parts 1999-08-10 05:04:08 +00:00
christos 072b17778f split bwtwo driver in sbus and obio parts. 1999-08-10 04:56:30 +00:00
matt ede200e1ab Add a driver for the Tadpole SPARCbook microcontroller. It doesn't
do much yet (except for power down support).  As sson as I figure
out to get its interrupts enabled, it will be much more functional.
(e.g., print console messages on low power warnings, be able to turn
off the TFT, etc.).
1999-08-09 18:39:58 +00:00
matt 84e306ed83 Tadpoles don't use the standard sun4m power down hardware. So add
support for doing it the Tadpole way.
1999-08-09 18:35:58 +00:00
matt 1b0bd3757f add entries for the tadpole microcontroller (tctrl) and the
tadpole pcmcia controller (tpcic).  Drivers for the former will
show up today, and the latter later this week or next weekend.
1999-08-09 18:34:43 +00:00
christos 26297cb6e9 PR/8178:Julian Coleman: sparc kernel will not build with cgtwo/cgsix but
without sbus. Remove call to cgsix-sbus-attach (impossible code). Make
routines static (they were declared static, but not defined static and
some compilers can complain).
1999-08-09 12:16:10 +00:00
thorpej 1c0e017cff Change spl calls to always raise priority, except for the ones which are
specifically supposed to lower it.
1999-08-05 21:16:55 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
matt 42c15639e0 Remove the false positive on the probe of the built-in modem
on tadpoles by calling comprobe1 to see if the modem is really
there.
1999-08-03 00:32:33 +00:00
matt 864afe0bc7 Add video blanking support. It does not power-down the TFT
since that requires talking to the H8 microcontroller and
that support is not yet done.
1999-08-02 20:36:57 +00:00
matt 016599a30b Colormaps now work. Besides a small fencepost error, the real problem
is that the Tadpole 3GX tech-ref-man was WRONG.  The RAMDAC registers
at at 4 byte offsets, not 8.  Once that was discovered, all the code
just worked.
1999-08-02 18:00:21 +00:00
matt d8f4dbb171 fix a few mmap bugs. pretend to be a cg3 and implement a hack
to fack the Xsun server to believe that the p9100's framebuffer
is really a cg3's.  So if only colormaps worked, X would be able
to run.
1999-08-01 06:27:00 +00:00
matt 4b814be9cf Initial stab at a P9100 console FB driver for the Tadpole 3GX.
It supports RASTERCONSOLE only and the colormap support is
broken (the hardware doesn't seem to be doing what the tech.
docs. say it should be doing).  But it is usable as a console
(but with blue on white as the only color choice).  I figured
I'd check it in since it is somewhat usable and someone else
might figure what I screwed up in the color map support.
1999-08-01 00:23:48 +00:00
matt d4b9056054 Add preliminary support for the built-in modem on Tadpole 3GX/S
laptops.  There is currently something wrong with the interrupt
code but it does attach and sense a 16550a.  (anyways the built
in modem is only a 14.4Kb and you'd really want to use a PCMCIA
modem to get faster dialup rates).
1999-07-30 23:58:25 +00:00
matt 8c0f3c5a5f Add config file specificially for Tadpole 3GX/3GS laptops.
It save ~800KB over the standard GENERIC config file.
1999-07-30 23:55:43 +00:00
thorpej d7bf3732b0 The new rasops stuff is a LOT faster; turn on rasterconsole on the cgsix. 1999-07-30 18:11:38 +00:00
augustss a7cd454b1d It's time to be COMPAT_14. 1999-07-29 10:37:12 +00:00
drochner b513c9a6ad update comments for mi VME 1999-07-28 09:48:36 +00:00
drochner 6922e1976e adapt to mi VME attachment (sorry for being late) 1999-07-28 09:45:08 +00:00
drochner f6fddabf3f back out previous - there is really a "vmebus" attribute 1999-07-28 09:39:48 +00:00
christos 223cc34183 make the vme stuff compile again; I am not sure this is correct as I don't
have the hardware to test, but it has been broken for 3+ weeks now. Hi
Mr. Drochner!
1999-07-28 05:45:50 +00:00
thorpej 6ec1ededf1 Make a slight rearrangement in how <machine/lock.h> is included. 1999-07-27 23:45:13 +00:00
thorpej cc668e410f Define apporpriate an value for SIMPLELOCK_LOCKED, based on the
semantics of ldstub.
1999-07-27 22:22:33 +00:00
thorpej c1ee8f0a8c Prepend `cpu_' to the machine-dependent atomic locking primitivies. 1999-07-27 21:45:39 +00:00
cgd f886376518 be more efficient when doing the SYSTEM_LD_TAIL for -g kernels: don't
copy them just to strip them, use strip -o.
1999-07-26 05:20:44 +00:00
christos 41cc9a0eb8 enable PPP_BSDCOMP, PPP_DEFLATE, PPP_FILTER, PFIL_HOOKS, IPFILTER_LOG
on the GENERIC kernels that had them commented out.
XXX: Please note, that not all the kernels have all the options defined!
1999-07-20 07:40:34 +00:00
christos 0c2a15c04a we don't need no-fpu; anyway this has been renamed in new version of egcs 1999-07-10 22:18:34 +00:00
thorpej 0945bf58b0 Add examples for including the kernel crypto bits from either crypto-us
or crypto-intl, commented out, with instructions to use only one, and
adjust the prefix as necessary.
1999-07-09 18:55:33 +00:00
mrg ecdad0ec33 clean up a bit after jason :)
- fix emitrules() like emitfiles() to deal with the prefix (otherwise it
  would attempt to find the file in the normal base for the NORMAL_C rule).
- add emitincludes() which adds include directives for each prefix to the
  $INCLUDES variable in the makefile.
- add %INCLUDES to each Makefile.arch to deal with the above.

this makes "prefix" actually work in a usable manner, and now i can move
on to fixing compiler warnings (errors) in the ESP code. :)
1999-07-09 09:52:55 +00:00
thorpej 3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
chs eb770c7b7c add "trace/t <pid>". 1999-07-04 06:45:26 +00:00
itojun 5effafcaa6 kernel configuration for IPv6/IPsec. should be in GENERIC in the future.
(source code will be committed soon)
1999-07-01 07:00:12 +00:00
drochner 33104934d9 update for new VME framework 1999-06-30 15:18:58 +00:00
pk 3c6560a597 More ugly code to force early configuration of the sun4 on-board timer. 1999-06-28 22:40:15 +00:00
pk 61f60a2fbe Allow SFILES to be empty; from Julian Coleman. 1999-06-28 21:03:23 +00:00
pk bd0ac6506c Prepare entry for `hme at sbus'; commented out until driver is finished. 1999-06-28 20:26:47 +00:00
pk 4fe4dae943 Ignore (but still generate a console warning) unhandled user-generated traps. 1999-06-28 15:51:26 +00:00
pk 7c5f595062 mmu_pagein() prototype: change address argument to `vaddr_t'. 1999-06-28 14:44:57 +00:00
pk 5814a13657 mmu_pagein: refuse kernel space addresses here. 1999-06-28 14:41:43 +00:00
itojun 427639cdce - Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
  and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
1999-06-28 08:20:40 +00:00
mrg 7683f14172 enable xbox and ppp 1999-06-26 18:47:15 +00:00
pk c118a70deb When overriding cache flush functions for specific cpu models, make
sure to update the correct function pointers in `cpuinfo'.
1999-06-24 20:22:12 +00:00
pk ccd6d1e4de Pull in `sparc/compat_13_machdep.c' for SunOS compatibility too. 1999-06-20 16:30:22 +00:00
thorpej 0288ffb53a pmap_change_wiring() -> pmap_unwire(). 1999-06-17 19:23:20 +00:00
thorpej f5a527bb4e Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
1999-06-17 18:21:21 +00:00
pk f90f079222 Fix typo in previous. 1999-06-13 07:58:20 +00:00
pk fee9cd9c12 Initialize the heap (for alloc()) explicitly, since the `end' symbol
is not necessarily double-word aligned.
1999-06-12 12:49:24 +00:00
thorpej 2c35c7bd03 Only declare block major numbers for devices which can be the root device. 1999-06-07 20:31:27 +00:00
thorpej d76e7b8c6d Don't pass a nam2blk around at all; just have setroot() and friends reference
dev_name2blk[] directly.  Addresses PR #7622 (ITOH Yasufumi), although
in a different way.
1999-06-07 20:16:08 +00:00
mrg e6545647b8 update this to GENERIC rev. 1.84. 1999-06-06 13:06:38 +00:00
mrg 440ac638bc EXEC_ELF32 is now default. enable "rnd" 1999-06-06 13:00:03 +00:00
pk 3d9ae33cfb Add COMPAT_AOUT. 1999-06-06 09:23:38 +00:00
pk bea0725979 64-bit safety to help sharing compilation tools with sparc64. 1999-06-05 12:54:23 +00:00
christos beb12b13b9 Don't include rasops and wscons goo here; we get it already from fbvar.h 1999-06-02 23:24:00 +00:00
mycroft 7d5f7a34ce We need wsdisplayvar.h for this to compile now! 1999-06-02 12:11:39 +00:00
pk 0953844306 Casts to match `%d' in printf format. 1999-05-27 14:20:10 +00:00
pk 69b216aefe `xmit' & `recv' return `ssize_t' 1999-05-27 14:04:25 +00:00
thorpej beb8d06638 Generally update the comment above vunmapbuf(). 1999-05-26 22:19:33 +00:00
thorpej a2d06a4721 Generally update the comment above the vmapbuf() implementations. 1999-05-26 22:07:36 +00:00
thorpej 2580d306ab Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags.  PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that.  INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now).  This will eventually
change now these maps are locked, as well.
1999-05-26 19:16:28 +00:00
thorpej 5832084eaf bus_dmamem_map() maps DMA safe memory, which is usually one or more
managed pages, into KVA space.  Since the pages are managed, we should
use pmap_enter(), not pmap_kenter_pa().

Also, when entering the mappings, enter with an access_type of
VM_PROT_READ | VM_PROT_WRITE.  We do this for a couple of reasons:

	(1) On systems that have H/W mod/ref attributes, the hardware
	    may not be able to track mod/ref done by a bus master.

	(2) On systems that have to do mod/ref emulation, this prevents
	    a mod/ref page fault from potentially happening while in an
	    interrupt context, which can be problematic.

This latter change is fairly important if we ever want to be able to
transfer DMA-safe memory pages to anonymous memory objects; we will need
to know that the pages are modified, or else data could be lost!

Note that while the pages are unowned (i.e. "just DMA-safe memory pages"),
they won't consume any swap resources, as the mappings are wired, and
the pages aren't on the active or inactive queues.
1999-05-25 23:14:03 +00:00
ad 080560c8c6 - Setting initial position of cursor is up to caller.
- Set cursor position properly for SPARC. From Juergen Hannken-Illjes.
1999-05-23 17:59:39 +00:00
thorpej d7ffa508b1 Provide an mdallocsys() that clips bufpages if necessary (on the Sun4c).
This will be (and needs to be) done before nbuf is computed.
1999-05-21 00:08:14 +00:00
thorpej 88c7cff619 Make this compile again. 1999-05-20 20:15:27 +00:00
pk fea10fb499 Operate Hypersparc cache in write-back mode again.
Remove `hypersparc under construction' message.
1999-05-20 10:06:39 +00:00
pk 1040b9e209 If TLB entries need to be flushed, make sure to do this after any necessary
cache flushes, since on VIPT machines the cache flush may induce a TLB load.
1999-05-20 10:03:12 +00:00
lukem e4a87aa1a9 * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
1999-05-20 08:21:42 +00:00
ad a4f0570f7d SPARC console is black on white, and is centered by default. 1999-05-19 21:05:59 +00:00
ad 02bc362e3e Add arg to rcons_init() that when set causes screen to be cleared. 1999-05-19 20:34:19 +00:00
ad 218af6a342 Insert missing code that defines screen metrics for rcons. This fixes the
more blatant rcons brokenness (ie no panics).
1999-05-19 19:59:04 +00:00
pk ae6d12926c Turn on the video timing which is not always done by the PROM (e.g. if we're
not the console).
1999-05-19 08:31:42 +00:00
ad 7efb86f6b8 Fix typo that broke rasops operation. 1999-05-18 21:36:21 +00:00
thorpej 0ff6aaf4c2 Don't clear the screen when we connect rasops; the SPARC doesn't connect
the rasops console until autoconfiguration, and it kinda sucks to have
the boot messages suddenly disappear from the screen.
1999-05-18 18:13:39 +00:00
ad 20be6a2a2a Fix typo on my behalf. From Juergen Hannken-Illjes. 1999-05-16 21:19:33 +00:00
pk 87d4c19ebf Remove cruft from `nmi_hard()' interrupt handler. 1999-05-16 16:56:35 +00:00
pk 1a2299d57c Temporary work-around in pmap_enter on 4/400 machines: pre-allocate
MMU region cookies. This keeps the machine from crashing when running
in user mode.
TODO: fix the bugs then kill or alter this work-around.
1999-05-16 16:48:59 +00:00
pk d379bda6a5 Well, what do you know.. the TLB context flush has been coded with the
wrong `type' field all these years. Fix this and add a TLB region flush
as well.  Also take care of a few inconsequential nits.
1999-05-16 16:37:45 +00:00
ad 3b602e5afa Panic if rasops_init() fails us (should never be the case). 1999-05-15 13:04:03 +00:00
ad 6834085f8b Make sure rasops_info descriptor is zeroed out before initializing. 1999-05-15 12:52:22 +00:00
mrg 95e0190e23 split the sun ms/kbd drivers into frontend/backend parts at the serial
interface border, so that other serial interfaces can be attached to the
ms/kbd.  zero functional changes and mostly involves moving code around
a bit.  tested on the SS2.

this is necessary to attach the PCI ultrasparc keyboard/mouse drivers.
1999-05-14 06:42:02 +00:00
eeh ea28d54c9e Let NetBSD/sparc know about 64-bit formats even if it can't execute them. 1999-05-14 00:18:51 +00:00
thorpej c10a926030 Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
1999-05-13 21:58:32 +00:00
mrg a59ced70bd pull in files.aout 1999-05-12 12:48:27 +00:00
drochner fe310dd299 include <lib/libkern/libkern.h> for intoa()/inet_ntoa() 1999-05-07 16:19:27 +00:00
pk 4cb2198a44 Declare `bootinfo' also if !DDB. 1999-05-05 15:32:33 +00:00
christos 22de25977b Argh, removed last ELF induced problem. We used to have syscall: in locore.s
and _C_LABEL(syscall) in trap.c. In ELF they are the same. Change the label
in locore.s to be _C_LABEL(_syscall).
While I am there, move the register save and restoral code used in the
*sigcode trampolines into two macros and use them instead of copying 100
lines of assembly each time.
Now everything ELF works.
1999-05-05 10:53:00 +00:00
christos 952f511570 Use -n for ELF. Using -N might work, but produces only one section.
No flags will not work, because it will produce a kernel loaded at 0xf0000000.
This is because the bfd ELF pagesize (in elf32-sparc.c) is 0x10000. Since
we need to load at 0xf0004000, we use -n.
1999-05-05 10:50:02 +00:00
christos caa41a7d21 Fix panic and panicstr to use _C_LABEL.
Statuc: ELF kernel loads symbols properly, hangs in syscall while running init.
1999-05-04 17:29:22 +00:00
christos 7d5c65239e clean up old GCC.1 stuff. 1999-05-04 13:36:10 +00:00
pk f499d38511 Gain one instruction.. 1999-05-03 20:56:11 +00:00
pk a554ffdde0 Better pad the artificial header to exactly 32 bytes. 1999-05-03 18:59:08 +00:00
christos f890155a87 Define __extension__ if __GNUC__ < 2
Define __builtin_* for lint.
1999-05-03 16:20:28 +00:00
christos 6207471740 remove unused msgbufaddr 1999-05-03 16:17:57 +00:00
christos 3c86ce132b s/\<0x4000\>/PROM_LOADADDR
remove unused cputypvallen, and _msgbufaddr
1999-05-03 16:17:08 +00:00
christos b0c181d290 move PROM_LOADADDR from promlib.h to param.h and remove its cast. 1999-05-03 16:14:02 +00:00
christos 6fc35c7fc8 Casts for PROM_LOADADDR which is not casted anymore. 1999-05-03 16:13:16 +00:00
pk bc1a121cfe Missing initialization of getbootfile() method for `old' monitors. 1999-05-03 07:32:50 +00:00
pk e3a15d4321 * Add missing label.
* Avoid harmful delay-slot instruction, if we did not get a `bootinfo' thing.
* Compute correct location of `esym' for all three methods of debug
  symbol loading we support.
1999-05-02 14:47:33 +00:00
christos 797c581bbc Add bootinfo.h 1999-05-02 13:50:17 +00:00
pk e4bc3af22c No need to disable MII devices in previous. 1999-05-01 14:18:35 +00:00
abs 93857fda32 Comment out nell and pcmcia children until audioamd panic resolved 1999-04-30 21:09:50 +00:00
christos 8ed58f33a5 Add -n for ELF, note weirdness in comment. 1999-04-30 13:31:52 +00:00
christos 35e47f06fa Load the header too. 1999-04-30 13:28:58 +00:00
christos 4bf3b7a9c1 Compile in support for ELF symbols. 1999-04-30 13:28:36 +00:00
christos 81248a0851 Add bootinfo struct to pass symtab arguments.
XXX: This does not work with ELF yet, but I don't understand why...
1999-04-30 09:29:40 +00:00
christos a042b8f9e4 Add bootinfo support for loading symbol tables. 1999-04-30 09:26:16 +00:00
christos cc96413a0c Revert previous bootinfo premature commit, and commit the sunos_sigcode
stuff instead.
1999-04-29 16:37:32 +00:00
christos 5f139d3cc9 Add sunos_sigcode and sunos_esigcode for COMPAT_SUNOS 1999-04-29 16:13:04 +00:00
fair 073021116e Add a 1 second delay to powerdown sequence to prevent the OpenBoot PROMs
from getting control and reporting a "powerdown failure", per PR#7487
1999-04-28 18:49:40 +00:00
christos b40179bdca MD version of loadfile.h 1999-04-28 15:26:21 +00:00
christos 017ae4d0c4 Support for installboot 1999-04-28 15:25:43 +00:00
christos 1c8494b7a2 Checkpoint of elf boot stuff:
- Use loadfile for both boot and installboot
- Fix problems with linking in bootxx
- Make installboot work with both a.out and ELF bootxx
- *WILL NOT BOOT YET ELF KERNELS* (a.out kernels work) I am working on it.
1999-04-28 15:22:25 +00:00
christos ccd32076df Add -DLIBSA_NO_CLOSE 1999-04-28 13:27:18 +00:00
christos ad64321aac Include <sys/systm.h> to get prototype for memset. 1999-04-28 13:20:55 +00:00
thorpej b1a4c46dab Fix a typo that prevented this from compiling. 1999-04-27 17:37:18 +00:00
thorpej b8073b401b Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
1999-04-26 22:46:44 +00:00
ad 613a381d71 Update configuration to match `rasops' fixes and config glue. 1999-04-26 04:25:38 +00:00
pk 421994a39b In pmap_{zero,copy}_page4m() use setpgt4m() to setup temporary address
mappings.
1999-04-25 10:30:02 +00:00
pk 901a03b897 Protect extent(9) ops with splhigh(). 1999-04-20 20:15:48 +00:00
mrg a3b0c3845d fix some comments. 1999-04-18 10:54:23 +00:00
mrg 8b70f01b60 use LINKFLAGS=-X to avoid stripping out per-file debugging info (idea from chuck@netbsd.org) 1999-04-18 10:52:31 +00:00
kleink ea8f9b570f Inclusions are already relative to the root of the kernel source tree, no need
to traverse the path all the way up again.
1999-04-17 21:26:59 +00:00
pk 0a737db1c7 `oldmon' proms need `putstr()' too. 1999-04-16 08:55:37 +00:00
pk 87a17d4466 Initialize the VME bus tag. 1999-04-14 10:28:23 +00:00
pk ee5af6c31e Mask out 64-bit burst capability on sun4m's, since some models (SS20)
erroneously report this in their sbus properties.
1999-04-14 09:50:01 +00:00
pk 08e6e1fdc0 Fix TAB-jump lossage in previous. 1999-04-14 09:48:37 +00:00
pk 37653920ec - try to identify multi-processor machines only on sun4m.
- mainbus_attach: on sun4's do not fall through to sun4c/sun4m configuration.
1999-04-14 09:16:11 +00:00
pk 570630211c PROM likes to see CR-NL. 1999-04-14 09:12:46 +00:00
ad 33df642800 Leave font selection to 'rasops' until 'rasops1' has been completed and can
handle non {8,16} pixel wide fonts.
1999-04-13 19:02:38 +00:00
ad d959cff2ca Fonts for rcons are now handled in sys/dev/wsfont. 1999-04-13 18:59:15 +00:00
ad 5140c302ce Bring sparc/sparc64 fb code and kernel configuration into line with
rcons changes.
1999-04-13 18:45:40 +00:00
pk b16b8de052 Identify ourselves as a SCSI channel to the DMA chip. 1999-04-12 23:01:00 +00:00
pk b13e5d1469 Quote "AS IS" as in the majority of Carnegy Mellon notices. 1999-04-12 20:38:17 +00:00
chs f455dd6596 add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
1999-04-11 04:04:04 +00:00
pk c40eb1cd97 Fix a pasto in copyright text which has been procreating like rabbits.. 1999-04-06 20:09:18 +00:00
thorpej 967b8c433c Don't call configure() from cpu_startup(). 1999-04-01 00:17:45 +00:00
mycroft 83cb600015 Enable rnd. 1999-03-31 14:29:33 +00:00
pk 65707bd131 * Pull in more uvm prototypes.
* Retrieve MID on all modules.
1999-03-31 14:09:09 +00:00
pk 1469e9af76 The MMU_3L option became SUN4_MMU3L long ago. 1999-03-30 19:41:30 +00:00
abs e9ea59935c Make this compile again after mycroft's pmap fixes. 1999-03-27 06:31:31 +00:00
wrstuden 2adccc50fa Add pps support. Only enable pps if CLOCAL & !MDMBUF. 1999-03-27 01:21:36 +00:00
mycroft 12d512bbb7 Oops; vm_offset_t -> vaddr_t. 1999-03-27 00:30:06 +00:00
mycroft 9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
pk 3eab58ceec UVM no longer an option. 1999-03-25 22:21:09 +00:00
pk 422c4dbb41 Put back <uvm/uvm.h> 1999-03-25 22:13:40 +00:00
mrg 7b93dd1117 remove opt_uvm.h 1999-03-25 00:41:46 +00:00
mrg ca5f9685bb clean up kernel/config files files for machVM lossage. 1999-03-24 06:06:09 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
drochner 76fa1751fe Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
1999-03-23 21:29:03 +00:00
thorpej a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
pk 1e0c7c3ed1 Fix various things that kept this bus front-end from functioning.. 1999-03-18 21:33:14 +00:00
chs ab7269f62a if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it.  this will be used to recover from
out-of-swap conditions.
1999-03-18 04:56:01 +00:00
chs bb8971afc3 for emul_sunos processes, don't change vmspace->vm_maxsaddr
for faults within a fudge factor of the end of the stack.
the sunos ld.so maps some zero-fill memory there and uses
it while loading shared libs.  ignoring these shenanigans
allows ps to report the correct stack usage for sunos programs.
1999-03-18 04:27:54 +00:00
pk 848e39dd70 Shouldn't call getpropint() on old proms: only get a CPU's `mid' if needed. 1999-03-17 23:21:38 +00:00
pk 9ae1ca2595 Got a VME probe result backwards. 1999-03-17 23:20:16 +00:00
sommerfe bc533621ed defopt MINIROOTSIZE 1999-03-17 18:59:21 +00:00
chs 8e61ed9705 in pmap_bootstrap4_4c(), remove any bogus mappings the PROM
left around in the mmu.
1999-03-16 03:45:36 +00:00
jonathan 69d2d27c1b Use bus_space tags and handles, embedded in MD hooks AM7930_{READ_WRITE}_REG
to handle MD delay and bus padding. Tested on sparc2 by David Brownlee.

Should use regmaps, but that breaks sparc pDMA assembly code.
1999-03-14 22:29:00 +00:00
perry d446fb449c exterminate ovbcopy. patches provided by Erik Bertelsen, pr-7145 1999-03-12 22:42:30 +00:00
fair 02b2bb48b7 Apply patch from PR#6443 to set LED properly when BLINK option is
not set.
1999-03-11 06:44:40 +00:00
pk e951781842 _C_LABEL() is not implied by _ENTRY(). 1999-03-07 22:36:04 +00:00
pk 3846cac1e1 Use `-Ttext' switch & collect ld options in LINKFLAGS. 1999-03-05 11:13:39 +00:00
pk da1407c412 Use <machine/asm.h> to construct C identifiers. 1999-03-05 11:12:16 +00:00
pk 994c338f0a Apply C_LABEL() to `esym' too. 1999-03-05 11:07:03 +00:00
pk ebd1f5abc9 Have pseudo function return a value. 1999-03-05 10:55:55 +00:00
pk 29db4ce692 Use macros from <machine/asm.h> to construct C labels. 1999-03-05 10:45:25 +00:00
pk a1aa41e201 consinit: cover all cases. 1999-03-05 08:30:33 +00:00
pk cf93b65b10 Print version prettier. 1999-03-02 13:41:03 +00:00
pk e2909faa19 Sanatize consinit() a bit. 1999-03-02 13:40:05 +00:00
kim d3a3d58726 Try not to run when kernel is in secure mode. 1999-03-01 01:05:51 +00:00