Home | History | Annotate | Download | only in include
History log of /src/sys/arch/alpha/include/alpha.h
RevisionDateAuthorComments
 1.48  16-Mar-2025  thorpej Add an alpha_fp_init() function, and move the initialization of
FP-related event counters there.

No functional change intended.
 1.47  23-Jul-2021  thorpej branches: 1.47.16;
- Expose alpha_fp_complete_at() to callers outside fp_complete.c.
- Use ufetch_32() instead of copyin() to fetch the instruction.
 1.46  20-Jul-2021  thorpej Define the f_float in-memory format. Line of the fields in s_float and
t_float.
 1.45  05-May-2021  thorpej Remove unused dot_conv() function.
 1.44  14-Oct-2020  thorpej branches: 1.44.6;
Add a mechanism to allow a platform to optionally shelter some region
of physical memory from random allocations from the default VM page
free list. Use this hook to shelter regions within 0-16MB of physical
RAM on Jensen and Irongate systems; those platforms do not have SGMAP
DMA, and so we need to shelter this range so that devices using ISA DMA
(e.g. floppy controller) have an opportunity to allocate DMA-safe memory.

PR port-alpha/27087
 1.43  10-Oct-2020  thorpej Fix cycle counter-based time keeping on Alpha in MP environments by using
a simpler calibration algorithm for the CC timecounter. Proposed in 2018
by Naruaki Etomi:

https://mail-index.netbsd.org/tech-kern/2018/01/14/msg022940.html

This patch is largely based on the proposed change, but avoids changing
any other timecounter logic, and re-factors things a bit to keep them
as MI as possible.
 1.42  03-Oct-2020  thorpej Qemu loads the kernel directly, and so there's no bootloader to provide
a "bootinfo" structure for us. Qemu does, however, place a Linux kernel
parameter block at kernel_text[] - 0x6000 that contains Linux-style kernel
command line arguments. So, add a prom_qemu_getenv() that allows us to
look for specific things passed along to the kernel from there, and use
them as follows:

- Support specifying the root device in the forms "root=/dev/wd0a",
"root=wd0a", or "rootdev=wd0".
- Support SRM-like -flags ... in the form of "flags=AD". In the case of
Qemu, we also assume that no flags=... is the same as "flags=A", i.e.
perform an auto-boot.

Also allow an alternate delay() function to be specified, if the platform
wishes to provide one.
 1.41  27-Sep-2020  thorpej prom_is_qemu -> alpha_is_qemu, and export it outside of prom.c.
 1.40  18-Sep-2020  thorpej Rather than having exception_return() at the root of the call graph for
kernel threads, provide a backstop that will prevent them from ever
accidentally trying to return to user space.
 1.39  03-Sep-2020  thorpej Clean up all of the _PMAP_MAY_USE_PROM_CONSOLE crapola, centralizing the
logic in prom.c, and rename it _PROM_MAY_USE_PROM_CONSOLE in a few places
it's still needed.
 1.38  06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.37  19-Apr-2018  christos branches: 1.37.2;
s/static inline/static __inline/g for consistency.
 1.36  16-Jun-2017  jdolecek branches: 1.36.4;
dumpconf(void) long doesn't exist, remove the prototype

PR kern/39714 by Henning Petersen
 1.35  16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.34  16-May-2014  matt branches: 1.34.4; 1.34.8; 1.34.12;
Cleanup and simplify PCU FP support. Nuke MDLWP_FPUSED.
 1.33  16-May-2014  rmind pcu(9):
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
This experimental feature was tried on ARM did not meet the expectations.
It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
optimise a race condition: if LWP is discarding its state on a remote CPU,
but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
 1.32  22-Aug-2013  drochner branches: 1.32.2;
-extend the pcu(9) API by a function which saves all context on the
current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
"LWP has used the coprocessor" flag should be set or reset. The flag
is reported by pcu_used_p(). If set, future accesses should use the
state stored in the PCB. If reset, it should be reset to default.
The former case is useful for setmcontext().
With that, it should not be necessary anymore to manage the "FPU used"
state by an additional MD variable.

approved by matt
 1.31  26-Dec-2012  matt branches: 1.31.2;
Update to new pcu_state_{load,save,release} definitions
 1.30  06-Feb-2012  matt branches: 1.30.6;
Do a minor cleanup of alpha (this will make applying pullups post branching
easier).
u_int{8,16,32,64}_t -> uint{*}_t
Change all old-style definitions to C89 prototypes.
Whitespace cleanup.
Constification in db_disasm.c
 1.29  17-Jul-2011  joerg branches: 1.29.2; 1.29.6;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.28  06-Jul-2011  dyoung Oops, missed one: #include <sys/bus.h> instead of <machine/bus.h>.
 1.27  12-Jun-2011  rmind Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.26  07-Jun-2011  matt Switch alpha to use PCU to manage the FPU.
Tested by mhitch and review by rmind.
 1.25  08-Feb-2011  rmind branches: 1.25.2;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.24  01-Jun-2009  martin branches: 1.24.4; 1.24.6; 1.24.8;
Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup() instead.
 1.23  28-Nov-2007  ad branches: 1.23.18; 1.23.28; 1.23.34;
Hook in the atomic ops on alpha.
 1.22  17-Oct-2007  garbled branches: 1.22.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.21  17-May-2007  yamt branches: 1.21.8; 1.21.10;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.20  11-Dec-2005  christos branches: 1.20.26; 1.20.30; 1.20.32; 1.20.36; 1.20.38;
merge ktrace-lwp.
 1.19  07-Aug-2003  agc branches: 1.19.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.18  17-Jan-2003  thorpej branches: 1.18.2;
Merge the nathanw_sa branch.
 1.17  14-Jun-2001  thorpej branches: 1.17.4;
Don't need to prototype child_return() here, it's in <sys/proc.h>.
 1.16  14-May-2001  ross o Deal with stray machine checks
o Add for alpha a security-sensitive rate-limiting printf(9) wrapper based
on ratecheck(9): void rlprintf(struct timeval *t, const char *fmt, ...);
 1.15  26-Apr-2001  ross o IEEE 754 floating-point completion code.
o Implement the architected FP_C "Floating Point Control Quadword"
 1.14  13-Dec-2000  mycroft branches: 1.14.2;
Do the md_syscall, __HAVE_MINIMAL_EMUL and __HAVE_SYSCALL_INTERN thangs.
 1.13  22-Nov-2000  thorpej Several changes, which get us generally further along with
multiprocessor support:
- Implement MP-safe halt.
- Make the FPU saving code more like Bill's on the i386 MP branch.
XXX This code will no doubt be revisited again.
- Pass the cpu_info and trapframe to IPI handlers, saving some work
in the handlers themselves, and also making it possible for the
"pause" handler to reference register state for DDB.
- Add "machine cpu" to DDB, making it possible to reference other
CPUs registers (and thus get e.g. a traceback) from whichever
CPU is actually running the debugger.
- Garbage-collect "machine halt" and "machine reboot" DDB commands.
They don't have a prayer of working properly in multiprocessor
kernels, and didn't really work all that well in uniprocessor kernels.
 1.12  04-Sep-2000  thorpej Define the biglock perimeter for the Alpha port, and generally clean
up a bunch of the MP code. Still doens't work properly yet, this is
just a snapshot of work-in-progress.
 1.11  15-Aug-2000  thorpej Implement MP-safe lazy FP context switching, modeled on the
way Bill Sommerfeld implemented it for x86 (and bug fixes
fed back to Bill :-)
 1.10  08-Jun-2000  thorpej branches: 1.10.2;
And more ANSI'ification!
 1.9  01-Jun-2000  thorpej Add a global patchable variable to enable debugging printfs in the
code that finds the boot device.
 1.8  10-Apr-2000  simonb branches: 1.8.2;
Remove duplicate CTL_MACHDEP definitions (duplicated in <alpha/cpu.h>).
 1.7  29-Feb-2000  thorpej 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.
 1.6  17-Sep-1999  thorpej branches: 1.6.2;
Centralize the declaration and clearing of `cold'.
 1.5  11-Jul-1999  ross New signature for console_restart().
 1.4  29-Jun-1999  ross Prototype dot_conv(), new routine in machdep.c that formats an alpha
long like this: e081.8000.8000.0004
 1.3  20-Apr-1999  thorpej Move the inclusion of <machine/bus.h> to within a _KERNEL section.
 1.2  23-Feb-1999  thorpej branches: 1.2.2; 1.2.4; 1.2.6;
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.)
 1.1  19-Nov-1998  ross New module to hold the alpha-specific prototypes that don't need to be
exported to the MI kernel. Almost everything here was formerly in cpu.h.
Optionally, this module could in the future be used to #include anything
that is always needed by arch/alpha modules.
 1.2.6.1  30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.2.4.1  02-Jul-1999  perry pullup 1.3->1.4 (ross)
 1.2.2.3  02-Aug-1999  thorpej Update from trunk.
 1.2.2.2  01-Jul-1999  thorpej Sync w/ -current.
 1.2.2.1  21-Jun-1999  thorpej Sync w/ -current.
 1.6.2.4  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.6.2.3  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes)
 1.6.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.8.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.2.1  15-May-2001  he Pull up revision 1.16 (via patch, requested by ross):
Deal with stray machine checks.
 1.14.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.17.4.4  03-Jan-2003  thorpej Merge switch_exit() and switch_lwp_exit().
 1.17.4.3  17-Dec-2001  nathanw Sprinkle a little const around frametoreg() and regtoframe().
 1.17.4.2  30-Aug-2001  nathanw First cut at LWP and SA support on the alpha.
Doesn't break in ordinary multiuser mode; LWPs and SAs not yet tested.
 1.17.4.1  14-Jun-2001  nathanw file alpha.h was added on branch nathanw_sa on 2001-08-30 23:43:43 +0000
 1.18.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.18.2.1  03-Aug-2004  skrll Sync with HEAD
 1.19.16.2  07-Dec-2007  yamt sync with head
 1.19.16.1  03-Sep-2007  yamt sync with head.
 1.20.38.1  22-May-2007  matt Update to HEAD.
 1.20.36.1  19-Apr-2007  thorpej Add support for hot-patching the membar ops when we detect MP.
 1.20.32.1  11-Jul-2007  mjf Sync with head.
 1.20.30.3  03-Dec-2007  ad Sync with HEAD.
 1.20.30.2  03-Dec-2007  ad Sync with HEAD.
 1.20.30.1  27-May-2007  ad Sync with head.
 1.20.26.1  20-Mar-2007  yamt adapt alpha.
 1.21.10.2  09-Jan-2008  matt sync with HEAD
 1.21.10.1  06-Nov-2007  matt sync with HEAD
 1.21.8.1  03-Dec-2007  joerg Sync with HEAD.
 1.22.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.23.34.1  09-Jun-2009  snj branches: 1.23.34.1.2;
Pull up following revision(s) (requested by martin in ticket #798):
sys/arch/alpha/alpha/locore.s: revision 1.114
sys/arch/alpha/alpha/vm_machdep.c: revision 1.100
sys/arch/alpha/include/alpha.h: revision 1.24
Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup() instead.
 1.23.34.1.2.1  21-Apr-2010  matt sync to netbsd-5
 1.23.28.1  09-Jun-2009  snj Pull up following revision(s) (requested by martin in ticket #798):
sys/arch/alpha/alpha/locore.s: revision 1.114
sys/arch/alpha/alpha/vm_machdep.c: revision 1.100
sys/arch/alpha/include/alpha.h: revision 1.24
Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup() instead.
 1.23.18.1  20-Jun-2009  yamt sync with head
 1.24.8.1  17-Feb-2011  bouyer Sync with HEAD
 1.24.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.24.4.3  12-Jun-2011  rmind sync with head
 1.24.4.2  05-Mar-2011  rmind sync with head
 1.24.4.1  18-Mar-2010  rmind Unify /dev/{mem,kmem,zero,null} implementations in MI code. Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.
 1.25.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.29.6.1  18-Feb-2012  mrg merge to -current.
 1.29.2.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.2.2  23-Jan-2013  yamt sync with head
 1.29.2.1  17-Apr-2012  yamt sync with head
 1.30.6.3  03-Dec-2017  jdolecek update from HEAD
 1.30.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.6.1  25-Feb-2013  tls resync with head
 1.31.2.2  18-May-2014  rmind sync with head
 1.31.2.1  28-Aug-2013  rmind sync with head
 1.32.2.1  10-Aug-2014  tls Rebase.
 1.34.12.1  21-Apr-2017  bouyer Sync with HEAD
 1.34.8.1  20-Mar-2017  pgoyette Sync with HEAD
 1.34.4.1  28-Aug-2017  skrll Sync with HEAD
 1.36.4.1  22-Apr-2018  pgoyette Sync with HEAD
 1.37.2.1  10-Jun-2019  christos Sync with HEAD
 1.44.6.2  01-Aug-2021  thorpej Sync with HEAD.
 1.44.6.1  13-May-2021  thorpej Sync with HEAD.
 1.47.16.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed