summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include
Commit message (Collapse)AuthorAgeFilesLines
* First pass at removing Alpha kernel support.jhb2006-05-1173-8697/+0
|
* Clean out sysctl machdep.* related defines.phk2006-05-111-18/+0
| | | | The cmos clock related stuff should really be in MI code.
* Eliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to themarcel2006-04-031-0/+2
| | | | | | | | PCB in which the context of stopped CPUs is stored. To access this PCB from KDB, we introduce a new define, called KDB_STOPPEDPCB. The definition, when present, lives in <machine/kdb.h> and abstracts where MD code saves the context. Define KDB_STOPPEDPCB on i386, amd64, alpha and sparc64 in accordance to previous code.
* Use the read_cycle_count() function recently added for cpu_ticks() forjhb2006-03-281-1/+2
| | | | | | get_cyclecount() as that results in a saner value and makes schedgraph much happier on Alpha. (schedgraph doesn't handle the fact that the counters are out of sync though)
* Use the Alpha PCC as a cpu ticker for process runtime accounting. This isjhb2006-03-071-1/+3
| | | | | | | | | slightly more tricky than on x86 as although the PCC is 64-bits, it is not a simple 64-bit counter like the TSC. Instead, the upper 32-bits have PAL-defined behavior and the lower 32-bits run as a free-running 32-bit counter. To handle this, we detect overflows by maintaining a small amount of per-cpu state and use this to simulate the upper 32-bits of the counter providing a full 64-bit counter to the consumers of cpu_ticks().
* By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT intoimp2006-01-092-2/+2
| | | | | | | | param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __. Submitted by: bde, jhb, scottl, many others.
* Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate forimp2006-01-011-0/+2
| | | | | each platform. These will be used in the pci code in preference to the complicated #ifdefs we have there now.
* Tweak how the MD code calls the fooclock() methods some. Instead ofjhb2005-12-222-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
* - Cleanup whitespace and extra ()s in vtophys() macros.jhb2005-12-061-2/+1
| | | | | | | | | | | - Move vtophys() macros next to vtopte() where vtopte() exists to match comments above vtopte(). - Remove references to the alternate address space in the comment above vtopte(). amd64 never had the alternate address space, and i386 lost it prior to PAE support being added. - s/entires/entries/ in comments. Reviewed by: alc
* Drop _MACHINE_ARCH and _MACHINE defines (not to be confused withru2005-12-061-7/+0
| | | | | | | MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
* Add stoppcbs[] arrays on Alpha and sparc64 and have each CPU save itsjhb2005-11-031-0/+1
| | | | | | | | current context in the IPI_STOP handler so that we can get accurate stack traces of threads on other CPUs on these two archs like we do now on i386 and amd64. Tested on: alpha, sparc64
* Add a new atomic_fetchadd() primitive that atomically adds a value to ajhb2005-09-271-0/+22
| | | | | | | | | variable and returns the previous value of the variable. Tested on: i386, alpha, sparc64, arm (cognet) Reviewed by: arch@ Submitted by: cognet (arm) MFC after: 1 week
* Protect includes for kernel specific use from userland.ticso2005-09-191-0/+2
|
* Relocate direct map specs into struct alpha_chipset.ticso2005-09-192-3/+21
| | | | | Prepare for PCI Scatter-Gather map. Panic if driver tries alpha_XXX_dmamap() out of range.
* Stop using the '+' constraint modifier with inline assembly. The '+'jhb2005-09-151-36/+36
| | | | | | | | | | constraint is actually only allowed for register operands. Instead, use separate input and output memory constraints. Education from: alc Reviewed by: alc Tested on: i386, alpha MFC after: 1 week
* Eliminate unused definitions.alc2005-09-112-8/+1
|
* Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and renamestefanf2005-08-202-8/+6
| | | | | | | | | | it to __MINSIGSTKSZ. Define MINSIGSTKSZ in <sys/signal.h>. This is done in order to use MINSIGSTKSZ for the macro PTHREAD_STACK_MIN in <pthread.h> (soon <limits.h>) without having to include the whole <sys/signal.h> header. Discussed with: bde
* Convert the atomic_ptr() operations over to operating on uintptr_tjhb2005-07-151-61/+18
| | | | | | | | | | variables rather than void * variables. This makes it easier and simpler to get asm constraints and volatile keywords correct. MFC after: 3 days Tested on: i386, alpha, sparc64 Compiled on: ia64, powerpc, amd64 Kernel toolchain busted on: arm
* Some cleanups and tweaks to some of the atomic.h files in preparation forjhb2005-07-091-91/+99
| | | | | | | | | | | | | | | further changes and fixes in the future: - Use aliases via macros rather than duplicated inlines wherever possible. - Move all the aliases to the bottom of these files and the inline functions to the top. - Add various comments. - On alpha, drop atomic_{load_acq,store_rel}_{8,char,16,short}(). - On i386 and amd64, don't duplicate the extern declarations for functions in the two non-inline cases (KLD_MODULE and compiler doesn't do inlines), instead, consolidate those two cases. - Some whitespace fixes. Approved by: re (scottl)
* MFP4:jkoshy2005-06-091-0/+13
| | | | | | | | | | | | | | | | - Implement sampling modes and logging support in hwpmc(4). - Separate MI and MD parts of hwpmc(4) and allow sharing of PMC implementations across different architectures. Add support for P4 (EMT64) style PMCs to the amd64 code. - New pmcstat(8) options: -E (exit time counts) -W (counts every context switch), -R (print log file). - pmc(3) API changes, improve our ability to keep ABI compatibility in the future. Add more 'alias' names for commonly used events. - bug fixes & documentation.
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-292-62/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Change the spkr_set_pitch() function to a macro to fix low level profiling.nyan2005-05-281-7/+5
|
* - Move timerreg.h to <arch>/include and split i8253 specific defines intonyan2005-05-142-0/+116
| | | | | | | | | i8253reg.h, and add some defines to control a speaker. - Move PPI related defines from i386/isa/spkr.c into ppireg.h and use them. - Move IO_{PPI,TIMER} defines into ppireg.h and timerreg.h respectively. - Use isa/isareg.h rather than <arch>/isa/isa.h. Tested on: i386, pc98
* Add empty header (except of the multiple-inclusion protection) tomarcel2005-04-201-0/+10
| | | | get hwpmc(4) to compile on this platform.
* Break out the definition of bus_space_{tag,handle}_t and a few other typesimp2005-04-182-7/+43
| | | | | | | | | | into _bus.h to help with name space polution from including all of bus.h. In a few days, I'll commit changes to the MI code to take advantage of thse sepration (after I've made sure that these changes don't break anything in the main tree, I've tested in my trees, but you never know...). Suggested by: bde (in 2002 or 2003 I think) Reviewed in principle by: jhb
* Divorce critical sections from spinlocks. Critical sections as denoted byjhb2005-04-042-89/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | critical_enter() and critical_exit() are now solely a mechanism for deferring kernel preemptions. They no longer have any affect on interrupts. This means that standalone critical sections are now very cheap as they are simply unlocked integer increments and decrements for the common case. Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter() and spinlock_exit(). This KPI is responsible for providing whatever MD guarantees are needed to ensure that a thread holding a spin lock won't be preempted by any other code that will try to lock the same lock. For now all archs continue to block interrupts in a "spinlock section" as they did formerly in all critical sections. Note that I've also taken this opportunity to push a few things into MD code rather than MI. For example, critical_fork_exit() no longer exists. Instead, MD code ensures that new threads have the correct state when they are created. Also, we no longer try to fixup the idlethreads for APs in MI code. Instead, each arch sets the initial curthread and adjusts the state of the idle thread it borrows in order to perform the initial context switch. This change is largely a big NOP, but the cleaner separation it provides will allow for more efficient alternative locking schemes in other parts of the kernel (bare critical sections rather than per-CPU spin mutexes for per-CPU data for example). Reviewed by: grehan, cognet, arch@, others Tested on: i386, alpha, sparc64, powerpc, arm, possibly more
* Refactor the bus_dma header files so that the interface is described inscottl2005-03-142-190/+34
| | | | | | | | | | sys/bus_dma.h instead of being copied in every single arch. This slightly reorders a flag that was specific to AXP and thus changes the ABI there. The interface still relies on bus_space definitions found in <machine/bus.h> so it cannot be included on its own yet, but that will be fixed at a later date. Add an MD <machine/bus_dma.h> for ever arch for consistency and to allow for future MD augmentation of the API. sparc64 makes heavy use of this right now due to its different bus_dma implemenation.
* netchild's mega-patch to isolate compiler dependencies into a centraljoerg2005-03-0211-36/+57
| | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago
* Use a common multi-inclusion protection, and add such aru2005-02-191-1/+6
| | | | protection to alpha/include/exec.h.
* add cpu_idle support for 21066A based lca systemsticso2005-01-311-0/+1
|
* Hopefully unbreak modules build.ru2005-01-291-1/+1
|
* Add bus_dmamap_load_mbuf_sg() to alpha.scottl2005-01-151-0/+3
|
* These appear to be unused in our tree, so remove them.imp2005-01-051-66/+0
|
* Begin all license/copyright comments with /*- or #-imp2005-01-0540-41/+41
|
* - make machine model list more comprehensive, the whole Alpha family treewilko2005-01-011-16/+26
| | | | | | | should now be present - clean up comment a bit MFC after: 1 week
* Change gdb_cpu_setreg() to not take the value to which to set themarcel2004-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value. This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that. Tested on: alpha, amd64, i386, ia64, sparc64
* Remove UAREA_PAGES.das2004-11-201-1/+0
| | | | Reviewed by: arch@
* - Add a new MD per-CPU field for Alpha 'pal_id' which is the PAL IDjhb2004-11-052-1/+2
| | | | | | | | | | associated with each processor. This ID is inferred from the index of the pcs structure in the hwprb. - Give Alpha CPUs FreeBSD CPU IDs more like other architectures where the boot processor is always CPU 0 and the other processors are numbered 1 ... N. List active CPUs in the system in cpu_mp_announce() as well. Silence on: alpha@
* The previous commit, roughly one and a half years ago removed themarcel2004-09-101-62/+14
| | | | | | | | | | | | | | | | | | | | | | branch prediction optimization for LINT, because the kernel was too large. This commit now removes it altogether since it causes build failures for GENERIC kernels and the various applicable trends are such that one can expect that it these failure will cause more problems than they're worth in the future. These trends include: 1. Alpha was demoted from tier 1 to tier 2 due to lack of active support. The number of people willing to fix build breakages is not likely to increase and those developers that do have the gumption to test MI changes on alpha are not likely to spend time fixing unexpected build failures first. 2. The kernel will only increase in size. Even though stripped-down kernels do link without problems now, compiler optimizations (like inlining) and new (non-optional) functionality will likely cause stripped-down kernels to break in the future as well. So, with my asbestos suit on, get rid of potential problems before they happen. MT5 candidate.
* Turn PREEMPTION into a kernel option. Make sure that it's defined ifscottl2004-09-021-5/+0
| | | | | | FULL_PREEMPTION is defined. Add a runtime warning to ULE if PREEMPTION is enabled (code inspired by the PREEMPTION warning in kern_switch.c). This is a possible MT5 candidate.
* Move the kernel-specific logic to adjust frompc from MI to MD. Formarcel2004-08-271-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | these two reasons: 1. On ia64 a function pointer does not hold the address of the first instruction of a functions implementation. It holds the address of a function descriptor. Hence the user(), btrap(), eintr() and bintr() prototypes are wrong for getting the actual code address. 2. The logic forces interrupt, trap and exception entry points to be layed-out contiguously. This can not be achieved on ia64 and is generally just bad programming. The MCOUNT_FROMPC_USER macro is used to set the frompc argument to some kernel address which represents any frompc that falls outside the kernel text range. The macro can expand to ~0U to bail out in that case. The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to some kernel address to represent a call to a trap or interrupt handler. This to avoid that the trap or interrupt handler appear to be called from everywhere in the call graph. The macro can expand to ~0U to prevent adjusting frompc. Note that the argument is selfpc, not frompc. This commit defines the macros on all architectures equivalently to the original code in sys/libkern/mcount.c. People can take it from here... Compile-tested on: alpha, amd64, i386, ia64 and sparc64 Boot-tested on: i386
* Provide extern declarations for btext and etext when GPROF is defined.marcel2004-08-271-0/+5
| | | | These are referenced in subr_prof.c when building a profiling kernel.
* Instead of calling ia32_pause() conditionally on __i386__ or __amd64__mux2004-08-031-0/+1
| | | | | | | | | being defined, define and use a new MD macro, cpu_spinwait(). It only expands to something on i386 and amd64, so the compiled code should be identical. Name of the macro found by: jhb Reviewed by: jhb
* Remove extraneous ';'.markm2004-08-011-1/+1
|
* Turn off PREEMPTION by default while it gets debugged. It's been causingscottl2004-08-011-0/+3
| | | | | 4 weeks of problems including deadlocks and instant panics. Note that the real bugs are likely in the scheduler.
* Break out the MI part of the /dev/[k]mem and /dev/io drivers intomarkm2004-08-011-0/+38
| | | | | | | | their own directory and module, leaving the MD parts in the MD area (the MD parts _are_ part of the modules). /dev/mem and /dev/io are now loadable modules, thus taking us one step further towards a kernel created entirely out of modules. Of course, there is nothing preventing the kernel from having these statically compiled.
* Pass a thread argument into cpu_critical_{enter,exit}() rather thanrwatson2004-07-271-8/+4
| | | | | | | | | dereference curthread. It is called only from critical_{enter,exit}(), which already dereferences curthread. This doesn't seem to affect SMP performance in my benchmarks, but improves MySQL transaction throughput by about 1% on UP on my Xeon. Head nodding: jhb, bmilekic
* - Eliminate the pte object from the pmap. Instead, page table pages arealc2004-07-191-1/+0
| | | | | | | | | | | | | allocated as "no object" pages. Similar changes were made to the amd64 and i386 pmap last year. The primary reason being that maintaining a pte object leads to lock order violations. A secondary reason being that the pte object is redundant, i.e., the page table itself can be used to lookup page table pages. (Historical note: The pte object predates our ability to allocate "no object" pages. Thus, the pte object was a necessary evil.) - Unconditionally check the vm object lock's status in vm_page_remove(). Previously, this assertion could not be made on Alpha due to its use of a pte object.
* Rev 1.24 of sys/ptrace.h adds ptrace_clear_single_step() prototypekensmith2004-07-131-1/+0
| | | | | | | definition so this one causes "redundant declaration" error and breaks Alpha kernel build. Reviewed by: gallatin@ and test build on beast
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-101-33/+16
| | | | | | | | | | | | | | | | Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads. The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace. With this change, ia64 has support for breakpoints.
OpenPOWER on IntegriCloud