Commit Graph

539 Commits

Author SHA1 Message Date
kleink
36e6bc645e Improve namespace test macros a bit. 2000-02-05 14:04:36 +00:00
cgd
7d16ac338c add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
2000-02-05 00:13:22 +00:00
kleink
82464e46d6 Add a C99-style va_copy macro. 2000-02-03 16:16:06 +00:00
danw
f77befbc84 #define __HAVE_DEVICE_REGISTER on ports that have it, and check for
that, rather than a list of architecture defines, in config_attach
2000-02-01 04:01:19 +00:00
eeh
64f779675a Fix a couple more references to STRIPPROG. 2000-01-31 22:47:11 +00:00
eeh
906dd16a7b Use STRIP instead of STRIPPROG since install uses STRIP and I don't want to
define two different variables.
2000-01-26 22:04:18 +00:00
tsutsui
b0fbaa33fb Remove obsoleted macros. 2000-01-26 09:44:10 +00:00
drochner
8eb798e603 define a "BUS_SPACE_MAP_PREFETCHABLE" flag which basically means that
device accesses are idempotent (but should not be cached by the CPU)
2000-01-25 22:13:17 +00:00
tron
04eb110431 Add "dependall" target for comfort. 2000-01-24 20:36:06 +00:00
hubertf
7e5ff67457 Add commented out "ident"-command 2000-01-23 23:46:04 +00:00
eeh
c979dd8b7f Change this to use bsd.prog.mk properly. 2000-01-23 21:05:02 +00:00
mycroft
7b49d242ce Clean up the machine symlink stuff ever so slightly. Needs to be
standardized between files.
2000-01-23 17:04:03 +00:00
thorpej
52242fdf9f Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:28:59 +00:00
sommerfeld
aa195e816f Fix PR9240: comment above cpu_fork() out of synch with reality on most ports.
(comment change only, but was wrong for more than just i386).
2000-01-20 22:18:54 +00:00
wrstuden
87e1b0f9b7 Add overlay to kernel configs. 2000-01-20 19:12:28 +00:00
thorpej
a0397a2573 Move callout initialization to a single location; no need to duplicate
that code all over the place.
2000-01-19 20:05:30 +00:00
tsutsui
e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
tsutsui
644b514c39 Change STRIPFLAGS=-g for cross-toolchains. 2000-01-19 14:44:58 +00:00
thorpej
4f27a98702 Use b_cylinder as defined in sys/buf.h 2000-01-18 19:48:02 +00:00
eeh
e73d544dec Interrupt handlers return zero if they didn't handle the interrupt. 2000-01-16 03:13:24 +00:00
eeh
0e1153bb9f The bootpath element must point to the appropriate bus node to work correctly. 2000-01-16 03:10:58 +00:00
pk
757264e2b1 Remove old-style boot device recognition.
Sync device_register() et. al. with sparc/sparc/autoconf.c
2000-01-14 14:57:27 +00:00
pk
77bd08a06b Remove old-style boot device recognition. 2000-01-14 14:38:37 +00:00
pk
cd1f76b21b Remove old-style boot device recognition. 2000-01-14 14:27:14 +00:00
eeh
082d2d0074 Add debugger single-stepping and fix interrupt dispatch bugs. 2000-01-10 03:53:20 +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
eeh
e71251703c Revamp 32-bit syscall entry points.
Change in-kernel FPU usage conventions.
1999-12-30 16:57:27 +00:00
eeh
98e266aba9 Update COMPAT_NETBSD32 stuff. 1999-12-30 16:42:10 +00:00
eeh
54b99fdd8b Lots of changes:
remove ffs()
	add bzero that uses block store insns
	save %gsr to fpstate
	revert to physical accesses for pmap_zero_page so we don't
		have conflicting page mappings
	general cleanup.
1999-12-30 16:39:53 +00:00
eeh
fe12b863f3 Add proc->md->fpstate and GSR to fpstate. 1999-12-30 16:35:25 +00:00
eeh
32834060c6 Fixup 64-bit type conversion issues. 1999-12-30 16:34:02 +00:00
eeh
724cd7eda1 Mark page table pages as wired rather than busy. 1999-12-30 16:31:18 +00:00
eeh
f1985e61f9 Add bootblk directory and only compile things on sparc64 machines. 1999-12-30 16:27:54 +00:00
eeh
58379b85fa Make CLKF_INTR() more intelligent. 1999-12-30 16:26:18 +00:00
eeh
75402069b7 Use absolute size structures for H/W registers. 1999-12-30 16:25:17 +00:00
eeh
01dc4c4451 Update 32-bit sigcontext structures. 1999-12-30 16:24:33 +00:00
eeh
0e853e8d4a struct core32 is now in MI headers. 1999-12-30 16:22:12 +00:00
eeh
2c1410f883 Implement PMAP_PREFER(). 1999-12-30 16:21:25 +00:00
eeh
4558c5bfb7 Add the %gsr to our fpstate structure. 1999-12-30 16:20:43 +00:00
eeh
0e53075800 Switch libkern back to a library 'cause bzero's back in locore.s. 1999-12-30 16:19:00 +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
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
eeh
c7f61c6f0e Apparently sys/sysctl.h includes vm/vm_map.h which makes use of vaddr_t, 1999-11-27 20:05:45 +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
9d1afb7522 merge cosmetic differences from sparc port. 1999-11-27 11:06:36 +00:00
mrg
aa206906a3 make this idempotent (from sparc/include/limits.h) 1999-11-27 10:13:15 +00:00
mrg
3c756ae10c these files were removed years ago (exec.h was not even installed). 1999-11-27 10:04:30 +00:00
pk
249aa2e089 Target `machine' symlink explicitly at the sparc64 headers. 1999-11-25 14:46:08 +00:00
pk
b797a06151 Make symlink to appropriate header directory and have cpp use it. 1999-11-25 13:25:09 +00:00
mrg
dcba4f5e10 use a portable invocation for cc -E 1999-11-25 06:06:03 +00:00
mrg
ca66e6b619 - pass slot number to sbus_get_intr() as a new argument.
- in sbus_get_intr(), if we are not an onboard device (ie, sbus card),
  encode the slot number into the sbi_pri so that we can later extract
  it and use it to find the interrupt map & clear registers for this
  device.
- remove "intr" support as it is really pre-sun4u only.
- don't "pause" for so long in sbus interrupt debug messages..

with the slot number being passed back from sbus_get_intr(), the FS/BE
card in an ultra2 now appears to get interrupts and gets beyond
waiting for the scsibus probe!
1999-11-25 05:03:53 +00:00
mrg
d4cf67e2d2 s/CEXTRAFLAG/CEXTRAFLAGS/ so it works. 1999-11-24 01:54:34 +00:00
mrg
abc579187f prefix a variable with "pci_" 1999-11-24 01:53:38 +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
pk
d92a868bcf Avoid unused symbol warnings when not using DDB. 1999-11-21 11:47:51 +00:00
pk
a4e956ce77 Also pull in <pci/pciidereg.h>. 1999-11-21 11:17:35 +00:00
eeh
2277dc3475 Move KERNBASE down from 0xf8000000 to 0xf1000000, just beyond the PROM. 1999-11-21 00:17:18 +00:00
eeh
9b628a6223 Add handler for T_FLUSHWIN trap in case old code makes use of it. 1999-11-20 18:12:00 +00:00
eeh
97b34de711 Limit buffers to 1/4 of the kernel address space. 1999-11-20 18:10:44 +00:00
eeh
18fefbe895 Add softdep option. 1999-11-20 18:09:52 +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
eeh
96ff315a99 Change one more instance of access_type' to flags' in pmap_enter(). 1999-11-14 17:25:01 +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
eeh
86667308d7 Implement sysctl machdep.booted_kernel. 1999-11-08 05:06:42 +00:00
eeh
5ce41ef1f2 Fix boot device detection code. 1999-11-08 05:05:26 +00:00
eeh
29d84e8033 Handle zero length properly in copyinstr() copyoutstr() and copystr(). 1999-11-06 20:28:37 +00:00
eeh
f7a499bedd Explicitly use 32-bit and 64-bit types and add some of the hooks needed for
32-bit coredumps.
1999-11-06 20:26:18 +00:00
eeh
bb3b0d186a Expliticly use 64-bit and 32-bit types. And get rid of ftype. Aparently all
the other ports have.
1999-11-06 20:24:51 +00:00
eeh
09dae2e5eb Explicitly use 32-bit and 64-bit types. 1999-11-06 20:23:02 +00:00
eeh
80e38bf1c6 Explicitly use 64-bit types. 1999-11-06 20:18:13 +00:00
eeh
7b60d6a0ed Provide explicit 64-bit and 32-bit types for compatibility with sparc
userland.
1999-11-06 20:13:49 +00:00
eeh
f429a45407 Explicitly use 64-bit types. 1999-11-06 20:10:24 +00:00
mrg
6a29b62403 make this compile in the absense of DDB. 1999-10-31 15:22:32 +00:00
lukem
50f7ec2271 sort sparc_db_command_table[] 1999-10-28 06:56:31 +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
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
eeh
793cc7a41b Update to post 1.4. 1999-10-11 01:57:43 +00:00
eeh
ff994dd772 Make this compile again. 1999-10-05 03:46:30 +00:00
eeh
f1deb2c3ac Make broken versions of gas happy by using sethi/or instead of set for
(negative) addresses.
1999-10-05 03:40:50 +00:00
eeh
cb2f2c8f26 Add RODATA() macro. 1999-10-05 03:34:41 +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
thorpej
58858e0968 Suns use black-on-white as the default rcons colors. 1999-08-26 20:50:08 +00:00
thorpej
2cf3330a1b Garbage-collect reference to <sys/dmap.h>. 1999-08-23 22:29:37 +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
thorpej
28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej
2ff657adb8 Fix the raise/lower semantics of splsoftclock()/spllowersoftclock(). 1999-08-05 18:28:01 +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
augustss
a7cd454b1d It's time to be COMPAT_14. 1999-07-29 10:37:12 +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
thorpej
40c08923a8 XXX LOCKING XXX of allproc; DDB runs with interrupts blocked, and MD
code should suspend other processors, so this probably isn't a problem,
but the comment is added anyhow.
1999-07-22 21:11:26 +00:00
eeh
5e22318a8d More fun with pmap. 1999-07-18 23:55:57 +00:00
eeh
c6a358d0a8 Lower spl for softints. 1999-07-18 23:54:20 +00:00
eeh
27bc6dd353 Switch to NetBSD/sparc ELF for 32-bit userland. 1999-07-18 23:52:58 +00:00
eeh
01474710ca Switch over to NetBSD/sparc ELF for 32-bit userland. 1999-07-18 23:51:08 +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
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
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
5425cbfa41 fix compile warning. 1999-06-21 06:28:33 +00:00
eeh
0c32dc3995 Clean this up a little. More later. (Gee, this really is becoming a huge
mess).
1999-06-21 01:44:14 +00:00
eeh
d326454d31 Nuke the last vestiges of a single DVMA map. This stuff should have
been completely migrated to individual bus drivers.
1999-06-21 01:42:36 +00:00
eeh
2c283b9149 Improve TRAPTRACE. Add FLTRACE that only tracks MMU faults. 1999-06-21 01:39:06 +00:00
eeh
9cf2782159 Move the DVMA mapin/mapout functions from the SBus driver to the iommu driver. 1999-06-20 00:51:29 +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
eeh
0693ec8379 Don't change protection on the clock for the moment. 1999-06-10 04:31:20 +00:00
mrg
30c351dc59 mmm, missing return types make gcc unhappy. 1999-06-08 10:35:36 +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
0525e9c7ef add ebus attachment for cs4231. this does not work as it requires ebus DMA and will panic if enabled. but it should otherwise be mostly complete. 1999-06-07 14:59:14 +00:00
mrg
aa506f8098 copyright foo. in the future, we will all be binary-redistributable. 1999-06-07 05:40:08 +00:00
eeh
1884f05354 Another general cleanup:
Remove the entire idea of fasttrap interrupts since V9 traps are really cheap,
the CPUs are really fast, and the completely different trap frames would make
these handlers really difficult to implement.

pmap_changeprot() was only used by the clock and one other place; deprecate it.

probeget() and probeset() now take 64-bit addresses even in 32-bit mode so we
can probe IO locations by physical addresses.

Some pmap cleanup.

Some more copyright cleanup.
1999-06-07 05:28:03 +00:00
mrg
1428ee6103 note that this is for an u5/u10 (from hubert) 1999-06-06 01:59:40 +00:00
eeh
186c3eba2b Make pbrobeget() and probeset() work for 64-bit values as well. To do this
the arguments are changed so the address is first and the ASI second so we
can have the address in %o0:%o1 and not worry about unused registers.

Also a bit of copyright cleanup.
1999-06-05 21:58:16 +00:00
eeh
3f7968c736 Fix things up so they compile again. 1999-06-05 20:38:24 +00:00
eeh
fcd1351b4c Add support for AOUT_COMPAT which we'll need when the sparc port cuts to ELF. 1999-06-05 16:55:19 +00:00
mrg
14729c2b11 fix lpt definition. add audiocs at ebus. oops, comment broken/incomplete devices. 1999-06-05 14:34:22 +00:00
mrg
5e7ea137ac lpt at ebus. fixed (commented) audiocs attachments. 1999-06-05 14:33:44 +00:00
mrg
756c2cde22 map in registers, configure interrupts, this appears to be OK now. 1999-06-05 14:19:44 +00:00
mrg
e8ccf39491 find ebus device INO values via the "interrupt-map" and "interrupt-map-mask" properties. 1999-06-05 14:18:26 +00:00
mrg
3670ff2120 if we are not bypassing the MMU, use ASI_PRIMARY. map PCI memory space
non-cached.  XXX clean this up by looking at the "non-cacheable" bit of
the full physical address.
avoid having 'nbuf' change between calls to `mdallocsys()' by setting it
in mdallocsys() like the MI allocsys() does.  XXX fix this too!
fix some printf lossage.
update for probeget() changes -- though bus_space_probe() appears to be
unused on the sparc64.
1999-06-05 05:35:41 +00:00
mrg
cc49a21298 use common IOMMU routines. 1999-06-05 05:30:43 +00:00
mrg
da265ce045 clean up a bit, implement pci_conf_{read,write}() with probe[gs]et() (not yet used). 1999-06-05 05:29:50 +00:00
mrg
bb0d20abc4 lpt at ebus. 1999-06-05 05:28:36 +00:00
mrg
dcb6040569 clock attaches at ebus also now. 1999-06-05 05:10:01 +00:00
mrg
4b183190b5 update a commit slightly. 1999-06-05 05:08:25 +00:00
mrg
2ee43849be catch up with probe[gs]et() changes. 1999-06-05 05:05:11 +00:00
mrg
6dffb4dff3 use common IOMMU code for sbus and psycho (remove old iommu
device declaration, we don't want it).  pull in psycho, pci,
ata and pciide code.  clock, eeprom and power attach at sbus
*and* ebus now (clock as `eeprom' works).  add `lpt at ebus',
wd major number, and other misc. commented devices.
1999-06-05 03:16:19 +00:00
mrg
cb392a2e1d only set LD to /usr/ccs/bin/ld if it exists. avoid empty SFILES. 1999-06-05 01:56:31 +00:00
mrg
8613b8e39d avoid uninitalised pointers. 1999-06-04 14:29:38 +00:00
mrg
3a1472c106 GC dead code. add support for PCI and IDE boot device detection, plus hme ethernet.
should probably deal with be and qe, etc.
1999-06-04 14:00:38 +00:00
mrg
27bcf2b6e6 eek. sparc can have "wd" disks. 1999-06-04 13:58:59 +00:00
mrg
e40f54e4c7 GC dead code. add support for PCI and IDE boot device detection, plus hme ethernet.
should probably deal with be and qe, etc.
1999-06-04 13:55:37 +00:00
mrg
a1c100d377 clone this from the macppc port. 1999-06-04 13:51:57 +00:00
mrg
10b89455c7 pull iommu code out of sbus code so we can share it with the PCI.
define some useful PCI macros.
1999-06-04 13:48:48 +00:00
mrg
03adf4aad1 PCI driver for the UltraSPARC. this only works on the Ultra5/10 machines
(`SUNW,sabre') for now, and it doesn't really quite work there yet anyway.
the bus space/dma code is cloned from the sbus driver.  the IOMMU code also
is cloned from the sbus code, but separated out into iommu.c so that we can
share it with the sbus driver.  hopefully, much of the bus space/dma code
can also be re-shared with the sbus driver and the ebus driver but for now
these copies will do.

support for the real UltraSPARC PCI (`SUNW,psycho') is unwritten, though
most of this code is shared with it.

we can probe PCI config space and try to configue devices, but interrupts
don't work yet...
1999-06-04 13:42:14 +00:00
mrg
36237341af support for the UltraSPARC `Extension Bus' found on the PCI machines.
the bus space/dma code is cloned from the PCI code to do the same thing
which itself was cloned from the sbus bus space/dma code.  the bus dma
code is non-functional at this point.
1999-06-04 13:29:13 +00:00
mrg
da08612af4 Ultra5/10 configuration. 1999-06-04 13:22:22 +00:00
eeh
b14c7f77cb Garbage collect. 1999-05-31 00:14:00 +00:00