summaryrefslogtreecommitdiff
path: root/sys/arch/vax/include
AgeCommit message (Collapse)Author
2023-03-26Change CASMAGIC to 0xFEDABABE so that it cannot accidentally end up inragge
valid kernel memory. Due to the VARM accesses above S0 should always give a ptelen trap. Bug found by Kalvis Duckmanton.
2023-02-06Add a support for gpx(4) color framebuffer found on VAXstation 3100.tsutsui
Poted from OpenBSD/vax. Note smg(4) monochrome onboard framebuffer driver is also changed attached only if gpx(4) is not installed or flags 1 is specified in config files, as OpenBSD did. Tested on my VAXstation 3100/m30 with and without 8bpp gpx(4). Revied on port-vax@ and "Please go ahead!" from ragge@. https://mail-index.netbsd.org/port-vax/2023/01/thread1.html#004147 Worth to pullup to netbsd-10.
2023-01-24mark unused arguments as suchchristos
2022-12-12vsbus vax: sprinkle volatile for register accessesjakllsch
2022-12-11Support save/restore of AST levels in the PCB for context switching.oster
Code written by ragge@ , tested by oster@.
2022-04-10fix various typos in comments and output/log messages.andvar
2022-04-08fix various typos, mainly in comments, but also log messages, docs, game text.andvar
2022-04-06Nix trailing whitespace in files of membars, atomics, and lock stubs.riastradh
Will be touching many of these files soon for functional changes. No functional change intended.
2022-02-13vax: __cpu_simple_lock audit.riastradh
Fix missing "memory" asm clobber so the compiler can't reorder memory access around __cpu_simple_lock/lock_try/unlock.
2022-02-12__cpu_simple_lock(9): Omit needless barriers in init.riastradh
It is, and always has been, the caller's responsibility to ensure the lock is initialized before it can be used -- otherwise the memory could hold garbage; it is nonsensical to even attempt locking operations on it before initialization. So there's no need to issue explicit barriers here. The barrier seems to have been introduced in sys/arch/alpha/alpha/lock_machdep.c rev. 1.1 (since moved to inline asm in alpha/include/lock.h) and then copied & pasted into several other architectures.
2021-11-02In order to prevent _mcount() from being recursively called when built with ↵ryo
COPTS=-O0, sprinkle `__always_inline' to make _mcount() be generated as a single function.
2021-10-29Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility.thorpej
2021-10-28The genassym code in libc also needs struct sigcontext13christos
2021-10-27The stupid CPP has proven me too clever by half.thorpej
2021-10-27Centrally define constants that define the signal return trampolinethorpej
versioning scheme, and add a big block comment describing how it works.
2021-10-27Make sigcontext13 visible only to _KERNEL. Make sigcontext visible onlythorpej
to _LIBC and _KERNEL.
2021-10-26Merge all MD __sigaction14_sigtramp.c copies into one:christos
- sparc and sparc64 were not using version 0 sigcontext when there were no arguments in the signal version. This was probably a bug. - vax is using +1 the version numbers of the other archs. - Only hppa was defining __LIBC12_SOURCE__ so it was getting a working sigcontext before. all the other ports that supported sigcontext had the compat code disabled. [pointed out by thorpej, thanks!] If we want to remove sigcontext support from userland at least now there is less work to do so.
2021-08-25- In kern_mutex.c, if MUTEX_CAS() is not defined, define it in terms ofthorpej
atomic_cas_ulong(). - For arm, ia64, m68k, mips, or1k, riscv, vax: don't define our own MUTEX_CAS(), as they either use atomic_cas_ulong() or equivalent (atomic_cas_uint() on m68k). - For alpha and sparc64, don't define MUTEX_CAS() in terms of their own _lock_cas(), which has its own memory barriers; the call sites in kern_mutex.c already have the appropriate memory barrier calls. Thus, alpha and sparc64 can use default definition. - For sh3, don't define MUTEX_CAS() in terms of its own _lock_cas(); atomic_cas_ulong() is strong-aliased to _lock_cas(), therefore defining our own MUTEX_CAS() is redundant. Per thread: https://mail-index.netbsd.org/tech-kern/2021/07/25/msg027562.html
2021-08-21s/helt/held+s/eroneously/erroneously/+s/splitted/split/+s/recommented/recomm ↵andvar
ended/
2021-08-17fix multiplei repetitive typos in comments, messages and documentation. ↵andvar
mainly because copy paste code big amount of files are affected.
2021-08-14Improved the performance of kernel profiling on MULTIPROCESSOR, and possible ↵ryo
to get profiling data for each CPU. In the current implementation, locks are acquired at the entrance of the mcount internal function, so the higher the number of cores, the more lock conflict occurs, making profiling performance in a MULTIPROCESSOR environment unusable and slow. Profiling buffers has been changed to be reserved for each CPU, improving profiling performance in MP by several to several dozen times. - Eliminated cpu_simple_lock in mcount internal function, using per-CPU buffers. - Add ci_gmon member to struct cpu_info of each MP arch. - Add kern.profiling.percpu node in sysctl tree. - Add new -c <cpuid> option to kgmon(8) to specify the cpuid, like openbsd. For compatibility, if the -c option is not specified, the entire system can be operated as before, and the -p option will get the total profiling data for all CPUs.
2021-08-03Fix various typos in comments. Also add missing NetBSD RCS Id in some of ↵andvar
these files.
2021-05-31Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE issimonb
referenced since some sources include <machine/param.h>.
2021-04-01Whitespace: #define<tab>simonb
2021-01-23Remove cargo-culted '#if 0' code that was designed to produce achristos
compile-time error if any of the bus_space_*_8 functions was used, but was documented that it produces a link-time error.
2020-05-01Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.isaki
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used. Otherwise the default value (currently 10 msec) defined in audio.c will be used. This mechanism is for very old ports which cannot satisfactorily handle 10 msec block. Currently hppa, m68k, sh3, sparc(!64) and vax are. For port maintainers, if general models in your port cannot satisfactorily handle 10 msec block, please consider to define your suitable longer period (40 msec would be a good first choice). But please don't be eager to make the default value shorter. <machine/param.h> was discussed in source-changes-d. It's better than ifdef storm, or adding 60+ new header files in every arch/*/include/ directories for this. Thanks mrg@, ad@, and everyone. http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html
2020-04-17Mark the .ident section as mergable string section to avoid redundantjoerg
entries.
2020-03-21PR port-vax/55094: vax pmap needs locking adjustmentsad
Make the adjustments noted in the PR and don't call uvm_wait() or do WAITOK ever - UVM takes care of that.
2020-03-14pmap_remove_all(): Return a boolean value to indicate the behaviour. Ifad
true, all mappings have been removed, the pmap is totally cleared out, and UVM can then avoid doing the work to call pmap_remove() for each map entry. If false, either nothing has been done, or some helpful arch-specific voodoo has taken place.
2019-12-27Harmonize the namespace of fast TLS base pointer getter functionskamil
Protect __lwp_getprivate_fast() with _RTLD_SOURCE, _LIBC_SOURCE and __LIBPTHREAD_SOURCE__. Include in this namespace <sys/tcl.h> and use __BEGIN_DECLS/__END_DECLS for the sake of consistency.
2019-12-01Fix false sharing problems with cpu_info. Identified with tprof(8).ad
This was a very nice win in my tests on a 48 CPU box. - Reorganise cpu_data slightly according to usage. - Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc). - On x86, put some items in their own cache lines according to usage, like the IPI bitmask and ci_want_resched.
2019-11-29Nix now-unused definitions of MUTEX_GIVE/MUTEX_RECEIVE.riastradh
2019-11-29Nix mb_* on vax.riastradh
2019-11-29Largely eliminate the MD rwlock.h header file.riastradh
This was full of definitions that have been obsolete for over a decade. The file still remains for __HAVE_RW_STUBS but that's all. Used only internally in kern_rwlock.c now, not by <sys/rwlock.h>.
2019-11-23cpu_need_resched():ad
- Remove all code that should be MI, leaving the bare minimum under arch/. - Make the required actions very explicit. - Pass in LWP pointer for convenience. - When a trap is required on another CPU, have the IPI set it locally. - Expunge cpu_did_resched().
2019-09-24Avoid duplicate PRIxBUSADDR and follow the likely intention, providing PRIxBSH.maya
2019-09-23Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all archesskrll
to follow arm and (generic) mips. Reviewed by christos.
2019-06-18Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointerkamil
The macro is dummy for ia64 (the FP register is unknown and can change freely) and sparc/sparc64 (not stored in struct reg).
2019-05-07Switch all users (except ia64) of custom machine/ansi.h to common_ansi.hkamil
Deduplicate the code among ports and poll definitions of types directly from a compiler. This fixes miscompilation of certain programs that instruct compilers to generate code for different types. This bug has been detected with -fshort-wchar in EFI firmware. Proposed and discussed on a mailing list (twice). Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
2019-01-21Fix wrong scoping of {U,}LLONG_MAX. More cases, not just amd64.dholland
PR 53298 from Roberto E. Vargas Caballero.
2019-01-07move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all portsjdolecek
also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3 have lower MAXPHYS)
2018-12-29Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the samemaxv
recently.
2018-08-22- Cleanup for dynamic sysctl:msaitoh
- Remove unused *_NAMES macros for sysctl. - Remove unused *_MAXID for sysctls. - Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and use them on all m68k machines.
2018-07-12Remove the kernel PMC code. Sent yesterday on tech-kern@.maxv
This change: * Removes "options PERFCTRS", the associated includes, and the associated ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is good. * Removes the PMC code of ARM XSCALE. * Removes all the pmc.h files. They were all empty, except for ARM XSCALE. * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The definitions are put in sysarch.h. * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control and sys_pmc_get_info syscalls. They are marked as OBSOL in kern, netbsd32 and rump. * Removes the pmc_evid_t and pmc_ctr_t types. * Removes all the associated man pages. The sets are marked as obsolete.
2018-04-25Add __KERNEL_RCSID() macro.ragge
2018-03-31Shrink MAXDSIZ to 512MB.ragge
XXX this should be depending of amount of physical memory.
2018-02-15Introduce _UC_MACHINE_FP() as a macrokamil
_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer. Don't rely on this interface as a compiler might strip frame pointer or optimize it making this interface unreliable. For hppa assume a small frame context, for larger frames FP might be located in a different register (4 instead of 3). For ia64 there is no strict frame pointer, and registers might rotate. Reuse 79 following: ./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM LOC_REG (79) Once ia64 will mature, this should be revisited. A macro can encapsulate a real function for extracting Frame Pointer on more complex CPUs / ABIs. For the remaining CPUs, reuse standard register as defined in appropriate ABI. The direct users of this macro are LLVM and GCC with Sanitizers. Proposed on tech-userlevel@. Sponsored by <The NetBSD Foundation>
2017-11-29include <sys/sigtypes.h> for sigset_tchristos
2017-11-06Cleanup and clarify the ELFSIZE mess:christos
We now have 2 variables automatically set in elf_machdep.h: ARCH_ELFSIZE: the size for userland binaries KERN_ELFSIZE: the size for the kernel binaries DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the same values DB_ELFSIZE used to have. In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE for the kernel and ARCH_ELFSIZE for userland. These defaults should eliminate the need for most manual ELFSIZE setting.
2017-09-17more const.christos