Commit Graph

508 Commits

Author SHA1 Message Date
simonb d7a08fd8c5 Don't declare a variable in the 'struct platform' declaration - we declare
an extern for 'struct platform platform' further down this file anyway,
and this would have declared a 'platform' variable in any userland code
including this file.
2000-03-29 02:59:18 +00:00
nisimura 99806742c0 Remove local implementation switching to accelerated MI sfb.c. 2000-03-26 05:52:17 +00:00
thorpej 800e276128 Fix INTRCNT_DEC_550_IRQ_LEN. From Nathan Williams. 2000-03-21 02:17:11 +00:00
thorpej 3c8d09cc56 Update the amask bits. 2000-03-20 02:19:44 +00:00
thorpej ac93a75106 Point back to the alpha_shared_intr in the intrhand structure. This
allows platform-specific code to access the `intr_private' data via
the intrhand structure.
2000-03-19 01:46:18 +00:00
tron e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft 9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00
mycroft 02905321b2 Foolish consistency. Mainly, always use underscores and sys/endian.h. 2000-03-16 15:09:34 +00:00
drochner aa1de89bdf explicitely #include <sys/systm.h> #if BUS_SPACE_DEBUG to get a printf()
prototype
2000-03-15 16:44:48 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
kleink a9ebf7bb8c Define ISO C99 (unsigned) long long (min, max) symbols. 2000-03-07 19:31:49 +00:00
thorpej 23c5667cfe Use ANSI-style function declarations for the various inline functions
here.  Addresses port-alpha/9056.
2000-03-05 18:46:14 +00:00
thorpej 908f6bc4cd Infrastructure for lazy istream sync in the pmap module:
- Add a bitmask for the CPUs which need an isync before this pmap returns
  to userspace on that CPU.
- Define PMAP_USERRET(), a utility macro for userret() to use to process
  the deferred isync, and call it as appropriate in userret().
2000-03-01 02:22:03 +00:00
thorpej fac7fc369f Put machine check info in cpu_info in the multiprocessor case, and
just have one statically allocate machine check info structure in the
single processor config case.
2000-02-29 22:19:53 +00:00
mycroft 76a60b98d3 Install pio.h. 2000-02-26 22:15:40 +00:00
thorpej 198dbed79d Pull in <sys/types.h> for the benefit of those things which include
<machine/sysarch.h> but don't pull in <sys/types.h>.
2000-02-26 20:12:56 +00:00
thorpej 0958e8149a x86-style PIO ops for USERLAND ONLY! Requires -lalpha. 2000-02-26 19:00:51 +00:00
thorpej df88882d80 - Add a bus space method for getting the translation for a window.
- Add sysarch methods for "get bus window count", "get bus window",
  and "pci conf read/write".

These are a hack, but they're what's necessary in order to make
XFree86 work in its current state.
2000-02-26 18:53:10 +00:00
thorpej 3dacaa322d Protect a few things from userland with _KERNEL. 2000-02-25 01:16:41 +00:00
thorpej de974ff82d Add an internal bus space method alpha_bus_space_translate(), which
provides a method to translate an address on an I/O bus into a sysBus
address, along with acccess method information.
2000-02-25 00:45:04 +00:00
thorpej dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
thorpej 52a2804a5c Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel.  Make all clients
of ISA DMA use this call to determine their maximum transfer size.
2000-02-07 22:07:27 +00:00
thorpej 0c4f8a876b Implement an internal DMA map flag which prevents coalescing of
adjacent DMA segments.
2000-02-06 01:23:30 +00:00
kleink 36e6bc645e Improve namespace test macros a bit. 2000-02-05 14:04:36 +00:00
cgd 253b179629 clean up (group, sort) __HAVE_* defines 2000-02-05 00:07:30 +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
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
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
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
thorpej 81f44f09a5 - Remove a misguided attempt to use procs as idle contexts for secondary
processors.  Instead, allocate separate idle PCBs for them (including
  the primary -- don't use proc0's for its idle context).
- Use SysValue to store the cpu_info for each processor.
1999-12-16 20:17:22 +00:00
thorpej fd6f6e85b2 Slight changes so that bounce buffers can be implemented for the Jensen. 1999-12-08 23:40:35 +00:00
ragge 0513268399 CL* discarding. 1999-12-04 21:13:19 +00:00
thorpej 08d1d1b378 Actually, the 2100_A500 has 64 interrupts, not 16. 1999-12-04 00:22:54 +00:00
lukem a63bfb3c6a add atomic.h (missed by thorpej; approved by thorpej) 1999-12-04 00:18:15 +00:00
thorpej 5d0a62da53 Remove now-obsolete atomic operations. 1999-12-03 01:13:17 +00:00
thorpej 2a97466824 Rewrite the atomic locking primitives using in-line assembly. 1999-12-03 01:11:34 +00:00
thorpej 9f7d189f05 Inline most of the remaining PALcode calls. 1999-12-02 22:08:04 +00:00
thorpej 0a2ea99c42 Inline the BWX instructions. 1999-12-02 19:41:39 +00:00
thorpej 4106b60175 Move atomic operations into <machine/atomic.h>, and make them in-line
assembly, rather than function calls.

...except alpha_atomic_testset_l(), which will go away completely once
I commit the new <machine/lock.h>.
1999-12-02 01:09:11 +00:00
thorpej c258dfae2f After reading the GCC `documentation' a little more, improve the inline
__asm() statements added previously for PALcode operations.
1999-12-01 18:23:11 +00:00
thorpej 89ae0bf93c Inline several things from pal.s:
- alpha_rpcc(), alpha_mb(), alpha_wmb() -- these are instructions, and
  we win by inlining them: rpcc is generally used for profiling, and
  the memory barriers really should execute as quickly as possible with
  minimal side-effects (like additional loads/stores required to call the
  functions!)
- alpha_pal_imb(), alpha_pal_rdps(), alpha_pal_swpipl(), alpha_pal_tbi(),
  alpha_pal_whami() -- these are PALcode ops.  We must specify some register
  clobbers for these.

We have a very decent size savings as a result.  My test system:
text    data    bss     dec     hex     filename
2671724 235848  377016  3284588 321e6c  /netbsd.bak
2617708 235736  377016  3230460 314afc  /netbsd

Most of this comes from fewer register saves/restores around spl*() calls
(now that alpha_pal_rdps() and alpha_pal_swpipl() are inlined).

Note that alpha_pal_rdps() and alpha_pal_swpipl() remain in pal.s to
maintain binary compatibility with LKMs that may use spl*() functions.
1999-11-30 00:42:46 +00:00
thorpej df2cf70865 - Fix a botch in the IPI bitmasks (they were right-shifted by 1), and
add an IPI which causes the target CPU to perform AST processing when
  it returns to userspace.
- Add a way to get/set a private pointer in the shared interrupt header.
1999-11-29 19:58:39 +00:00
thorpej 94552ad5d6 - Use alpha_atomic_{add,sub}_q() to update the pmap statistics. We now no
longer need to lock the kernel pmap in pmap_kenter_pa() and pmap_kremove().
- Since locking the kernel pmap in interrupt context is no longer required,
  don't go to splimp() when locking the kernel pmap.
- Implement a new pmap_remove() function, not yet enabled by default.  It
  is structured like pmap_protect, and should be *much* faster.  This was
  actually written quite some time ago, but never committed because it
  didn't work properly.  Given the recent bugfix to pmap_protect(), "duh,
  of course it didn't work properly before...".  It seems to work fine now
  (have done several builds and run the UVM regression tests using the new
  code), but it is currently run-time optional so that some performance
  measurements can be easily run against the old and new code.
1999-11-28 19:53:11 +00:00
thorpej 1710fad449 Implement atomic addition and subtraction on quadwords. 1999-11-28 19:47:13 +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
thorpej 11cae42531 Centralize the declaration and clearing of `cold'. 1999-09-17 19:59:35 +00:00
ross f468c5f199 This is required by libsa/loadfile.c. 1999-09-10 07:33:57 +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 95755c54bb Pull in <machine/alpha_cpu.h>. 1999-08-16 06:24:07 +00:00
thorpej f06d918d30 Protect userland from the vast majority of this file. 1999-08-15 18:32:51 +00:00
thorpej 6be04b7f5c Move cpu_info and related info into <machine/cpu.h>, and implement the
other MP API components discussed on tech-smp.
1999-08-10 23:35:43 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej b701be7c86 Use atomic operations to manipulate the SSIR, and fix a problem introduced
with the spllowersoftclock() changes where more interrupts than necessary
were blocked while software interrupts were being processed.
1999-08-10 18:53:03 +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
thorpej c1ee8f0a8c Prepend `cpu_' to the machine-dependent atomic locking primitivies. 1999-07-27 21:45:39 +00:00
ross a8000e244c New signature for console_restart(). 1999-07-11 22:39:21 +00:00
ross cf1ca54803 Minor Tsunami-related changes. 1999-06-29 07:22:25 +00:00
ross 10f1f2d81f Prototype dot_conv(), new routine in machdep.c that formats an alpha
long like this: e081.8000.8000.0004
1999-06-29 07:18:23 +00:00
cgd 7c02d93c04 nuke current definitions provided by __BUS_SPACE_COMPAT_OLDDEFS.
I'll do what I can to make new ones soon.  8-)
1999-06-18 04:49:24 +00:00
thorpej 5dec34efed The kernel pmap can be accessed (and locked!) while in an interrupt
context, so we must block interrupts which may cause memory allocation
before asserting the kernel pmap's lock.  Put this all in PMAP_LOCK()
and PMAP_UNLOCK() macros to make it easier.
1999-05-24 20:11:58 +00:00
thorpej c1eb28c237 Make the list of all pmaps LRU-ordered, and update a comment regarding
locking.
1999-05-23 22:37:02 +00:00
thorpej 2102d5a17e Save ourselves some work in some pv list traversal functions; keep a pointer
to the PTE that maps the page in the pv_entry so that we don't have to
compute it from the pmap/va.
1999-05-23 17:49:07 +00:00
thorpej 66324de865 Use the pool allocator for pv_entry structures. Set a (patchable/config'able)
low water mark on the pool, so we have some chance of crawling along in
extreme memory shortages.
1999-05-21 23:07:59 +00:00
christos c596c324e3 Define __builtin_*() for lint 1999-05-03 16:30:31 +00:00
ross c5a82dd848 * New MI man page for fp{set,get}{round,sticky,mask}(3).
* Implement fpgetsticky() for alpha.
* Direct fpsetsticky() and fp{get,set}mask() into alpha kernel via sysarch(2).
* Define new sysarch(2) stub for above and install and distribute sysarch.h
for alpha.  (The fpcr IS user mode r/w, but for reasons beyond the scope
of a commit message kernel calls are needed.) And much kernel Magick is
required before these do anything, but this way programs compiled under
1.4 will DTRT on future snapshots and releases.
1999-04-30 00:58:30 +00:00
ross 0847df9065 #ifdef _KERNEL, define the machine FPCR bits and a rounding mode macro 1999-04-29 02:55:50 +00:00
cgd 6f2f5becb6 Alpha ECOFF object type definitions 1999-04-27 02:32:33 +00:00
ross f868468aaa Never used, and work-in-progress uses a different header. 1999-04-25 20:15:06 +00:00
thorpej f7b0fea081 After reviewing the Green Book, BPT traps do indeed leave the PC pointing
to the instruction _after_ the `call_pal bpt' instruction.
1999-04-20 21:30:15 +00:00
thorpej 375b3fa699 Prototype alpha_debug(), and add some definitions for KGDB. 1999-04-20 21:23:56 +00:00
thorpej 62d09f4f93 Move the inclusion of <machine/bus.h> to within a _KERNEL section. 1999-04-20 21:23:09 +00:00
drochner 7694cc18a5 wsconsio.h is gone 1999-04-17 13:00:04 +00:00
ross 74de38f9a9 Really say goodbye to old wscons. 1999-04-16 07:24:13 +00:00
thorpej 9a4a0a3c81 DEC_KN300 no longer uses PROM console. 1999-04-15 22:15:38 +00:00
thorpej e8e6061642 Slight braino in previous. 1999-04-14 23:55:35 +00:00
thorpej 25a0e78bf3 Add macros to decode the `turboslot' member of the Console Terminal Block. 1999-04-14 23:28:31 +00:00
thorpej e468d4c8d9 Fix a bug in TBI optimization uncovered by the "access_type" changes. Thanks
to Bernd Ernesti for providing crash dumps to Charles Hannum who tracked
it down.
1999-04-09 00:38:10 +00:00
cgd 7a2f0695dd clean up slightly, do a little #define trick to make checksumming
the boot block a little easier/more 'clean', and provide a macro to
checksum the boot block.
1999-04-05 02:45:47 +00:00
cgd 5d472dba93 define 'struct boot_block' which is the alpha (SRM) boot block 1999-04-02 07:32:33 +00:00
thorpej 567cda0537 Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages.  So, mb_map wasn't actually being used.  Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.
1999-03-26 00:15:04 +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
cgd 10af862bf7 move isa/isa_machdep.h to include/isa_machdep.h. (can't do it via
repository copy because alpha already had an include/isa_machdep.h in
the attic.)
1999-03-19 05:04:42 +00:00
cgd 8e85aac1ce move pci/pci_machdep.h to include/pci_machdep.h. (can't do it via
repository copy because alpha already had an include/pci_machdep.h in
the attic.)
1999-03-19 03:40:46 +00:00
cgd 0d0fd78b4e Moved from arch/alpha/isa/isapnp_machdep.h,v 1999-03-19 03:14:05 +00:00
cgd e962a59308 move tc/tc_machdep.h to include/tc_machdep.h. (can't do it via
repository copy because alpha already had an include/tc_machdep.h in
the attic.)
1999-03-19 03:12:31 +00:00
cgd 88590a9cd1 move eisa/eisa_machdep.h to include/eisa_machdep.h. (can't do it via
repository copy because alpha already had an include/eisa_machdep.h in
the attic.)
1999-03-19 02:59:49 +00:00
drochner 597bc445b1 add ST_DEC_6600, clean up some comments 1999-03-17 18:58:51 +00:00
ross 0325be06dd New file, included if present for ${MACHINE_ARCH} by bsd.kmod.mk. 1999-03-10 06:41:48 +00:00
mjacob 7c785b8a35 Well, sizeof needs to be printed with a %lu- I guess not many people build
debug kernels!
1999-03-04 02:16:56 +00:00
thorpej 4cdbd84b63 First-cut at multiprocessor TLB shootdown. This simple implementation can
probably be improved somewhat, but an attempt to be efficient has been
made.

Note: TLB shootdowns are NOT YET ENABLED.
1999-02-24 19:22:16 +00:00
thorpej 911465b54c Restructure the IPI code a little, allowing multiple IPIs to be sent at
once.  Add a way to broadcast an IPI to all processors (except the sender,
obviously).  Add an IPI for TLB shootdown.
1999-02-24 19:17:09 +00:00
thorpej 76e4555f2c Now that we have the kthread mechanism, massively clean up the way
additional processors are spun up on multiprocessor Alpha systems.
Now, each processor gets its own idle thread (the primary processor
uses proc0).  This idle thread is used in switch_exit(), rather than
explicitly referencing proc0.

Also, make `curproc', `fpcurproc', and `curpcb' per-cpu values.  This
required some data structure rearrangement; cpu info is now statically
allocated in the BSS, rather than via malloc(), and cpu_softc is gone.
(Modeled somewhat after NetBSD/sparc's multiprocessor info structures.)
1999-02-23 03:20:00 +00:00
thorpej 390864a7a5 Define a macro which has human readable strings corresponding to PGU_*
constants.
1999-02-04 19:48:21 +00:00
mycroft 897a8a7f29 Mark [hn]to[nh][ls]() with __const__, so they are subject to CSE. 1999-01-24 12:55:01 +00:00
ross c79856181a NetBSD RCS id. 1999-01-18 20:36:22 +00:00
ross 7346c0043b FreeBSD's fpu.h. 1999-01-18 20:33:23 +00:00