#
6c730e17 |
| 22-Jul-2021 |
thorpej <thorpej@NetBSD.org> |
Various minor cleanups and bug fixes to the FP software completion code: - Use __CTASSERT() instead of rolling our own compile-time assertion using cpp. - Use __BIT() &c instead of rolling our own.
Various minor cleanups and bug fixes to the FP software completion code: - Use __CTASSERT() instead of rolling our own compile-time assertion using cpp. - Use __BIT() &c instead of rolling our own. - Improve some comments. - Define a default FP_C and FPCR value that is self-consistent, and initialize it properly at process creation time. - Fix signal information when the trap shadow cannot be resolved. - Use defined constants rather than magic numbers for the exception summary bits. - Add a machdep sysctl to enable FP software-completion debugging.
show more ...
|
#
06cd499a |
| 11-Jul-2021 |
thorpej <thorpej@NetBSD.org> |
Optimized fast-paths for rw_enter() / rw_tryenter() / rw_exit().
|
#
7189b781 |
| 04-Jul-2021 |
thorpej <thorpej@NetBSD.org> |
Remove unnecessary #include <sys/malloc.h>
|
#
ea1d1255 |
| 24-May-2021 |
thorpej <thorpej@NetBSD.org> |
Add _UC_SETSTACK / _UC_CLRSTACK handling. Fixes the t_sigaltstack test on alpha.
|
#
0e61e19d |
| 05-May-2021 |
thorpej <thorpej@NetBSD.org> |
Remove unused dot_conv() function.
|
#
9e93e049 |
| 05-May-2021 |
thorpej <thorpej@NetBSD.org> |
Disable preemption around the main work of badaddr_read() and delay(); they both use "current CPU" resources.
|
#
297ce0ff |
| 15-Oct-2020 |
thorpej <thorpej@NetBSD.org> |
Expose a bunch of CPU details, including implementation version and architecture extensions, via sysctl:
hw.cpu0.model = 21264A-0 (EV67) hw.cpu0.major = 11 hw.cpu0.minor = 0 hw.cpu0.implver = 2 hw.c
Expose a bunch of CPU details, including implementation version and architecture extensions, via sysctl:
hw.cpu0.model = 21264A-0 (EV67) hw.cpu0.major = 11 hw.cpu0.minor = 0 hw.cpu0.implver = 2 hw.cpu0.amask = 0x1307 hw.cpu0.bwx = 1 hw.cpu0.fix = 1 hw.cpu0.cix = 1 hw.cpu0.mvi = 1 hw.cpu0.pat = 1 hw.cpu0.pmi = 1 hw.cpu0.vax_fp = 1 hw.cpu0.ieee_fp = 1 hw.cpu0.primary_eligible = 1 hw.cpu0.primary = 1 hw.cpu0.cpu_id = 0 hw.cpu0.pcc_freq = 239990688
as well as some potentially interesting system-level variables:
machdep.cctr = 0 machdep.is_qemu = 1
Should address the basic concern in PR port-alpha/15835.
show more ...
|
#
3988b25e |
| 14-Oct-2020 |
thorpej <thorpej@NetBSD.org> |
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
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
show more ...
|
#
6e69b2b4 |
| 10-Oct-2020 |
thorpej <thorpej@NetBSD.org> |
G/C alpha_XXX_dmamap() / alpha_XXX_dmamap_or. They haven't been needed for a long time.
|
#
d23d0ab6 |
| 03-Oct-2020 |
thorpej <thorpej@NetBSD.org> |
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 contain
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.
show more ...
|
#
7124ce35 |
| 27-Sep-2020 |
thorpej <thorpej@NetBSD.org> |
prom_is_qemu -> alpha_is_qemu, and export it outside of prom.c.
|
#
a3f978ce |
| 04-Sep-2020 |
thorpej <thorpej@NetBSD.org> |
Use SysValue to store curlwp rather than curcpu. curlwp is acceessed much more frequently, and this makes curlwp preemption-safe.
|
#
bb445c5c |
| 03-Sep-2020 |
thorpej <thorpej@NetBSD.org> |
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.
|
#
5c592ccd |
| 02-Sep-2020 |
riastradh <riastradh@NetBSD.org> |
Nix trailing whitespace.
|
#
6c11fe5f |
| 29-Aug-2020 |
thorpej <thorpej@NetBSD.org> |
- cpu_need_resched(): Explicitly cover each RESCHED_* case, and add a comment explaining why we don't need to act on IDLE+REMOTE. - cpu_signotify(): Move to machdep.c, and if we're asked to notify
- cpu_need_resched(): Explicitly cover each RESCHED_* case, and add a comment explaining why we don't need to act on IDLE+REMOTE. - cpu_signotify(): Move to machdep.c, and if we're asked to notify an LWP running on another CPU, send an AST IPI to that CPU. Add some assertions. - cpu_need_proftick(): Move to machdep.c, add some assertions.
show more ...
|
#
e3b3a56d |
| 11-Jun-2020 |
ad <ad@NetBSD.org> |
uvm_availmem(): give it a boolean argument to specify whether a recent cached value will do, or if the very latest total must be fetched. It can be called thousands of times a second and fetching th
uvm_availmem(): give it a boolean argument to specify whether a recent cached value will do, or if the very latest total must be fetched. It can be called thousands of times a second and fetching the totals impacts not only the calling LWP but other CPUs doing unrelated activity in the VM system.
show more ...
|
#
dc096631 |
| 22-Feb-2020 |
thorpej <thorpej@NetBSD.org> |
Fix a couple of printf formats in debug messages.
|
#
f32184fa |
| 22-Feb-2020 |
thorpej <thorpej@NetBSD.org> |
Make it clear that the pfn argument to alpha_init() is no longer used.
|
#
c5342c95 |
| 31-Dec-2019 |
ad <ad@NetBSD.org> |
Rename uvm_free() -> uvm_availmem().
|
#
95a9fc32 |
| 21-Dec-2019 |
ad <ad@NetBSD.org> |
uvmexp.free -> uvm_free()
|
#
e0c5fc4a |
| 23-Nov-2019 |
ad <ad@NetBSD.org> |
cpu_need_resched():
- 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 requ
cpu_need_resched():
- 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().
show more ...
|
#
c8716e42 |
| 05-Apr-2019 |
thorpej <thorpej@NetBSD.org> |
Prrovide a basic (i.e. empty) module_init_md(). MODULAR doesn't quite work yet (missing support for a couple of relocations), but at last the kernel links.
|
#
395853bc |
| 25-Mar-2019 |
maxv <maxv@NetBSD.org> |
Remove compat_osf1, discussed on tech-kern@.
|
#
bdb86e29 |
| 27-Nov-2018 |
maxv <maxv@NetBSD.org> |
Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo has padding, so zero it out properly. While here I'm also zeroing out some other things in several ports, for safety. Same pro
Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo has padding, so zero it out properly. While here I'm also zeroing out some other things in several ports, for safety. Same problem in netbsd32, so fix that too.
I can't compile-test on each architecture, but there should be no breakage (tm).
Overall this fixes at least 14 info leaks. Prompted by the discovery by KLEAK of a leak in amd64's sendsig_siginfo.
show more ...
|
#
a8a5c538 |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|