| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
These files had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
|
|
|
|
|
| |
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
|
|
|
|
|
| |
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
|
|
|
|
| |
Close #4644.
|
| |
|
|
|
|
|
|
|
| |
The other ports included that architecture's version of this file from
NetBSD. This patch follows that pattern.
closes #4641
|
|
|
|
|
|
| |
Permission received from Anthony Green.
Updates #3053.
|
| |
|
|
|
|
|
|
|
| |
Add SMP-specifc SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR
fatal error. This fatal error helps to diagnose a broken SMP startup
sequence. Without this error a context switch using the NULL pointer
for the thread control block happens which may be difficult to debug.
|
|
|
|
|
|
|
| |
This function may be used to burn a couple of processor cycles with
minimum impact on the system bus. It may be used in busy wait loops.
Since it is a global function, it is possible to wrap it in device
driver test code.
|
|
|
|
|
|
| |
Add an architecture-specific implementation for
_CPU_Get_current_per_CPU_control() to reduce overhead for getting the
current CPU's Per_CPU_Control structure.
|
|
|
|
|
| |
Fix move of regions. Allow sections to be contained in a region (may
happen due to region alignment).
|
|
|
|
| |
This simplifies unit testing.
|
|
|
|
| |
Updates #4625.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous SMP multitasking start assumed that the initial heir thread of a
processor starts execution in _Thread_Handler(). The _Thread_Handler() sets
the interrupt state explicitly by _ISR_Set_level() before it calls the thread
entry. Under certain timing conditions, processors may perform an initial
context switch to a thread which already executes its thread body (see
smptests/smpstart01). In this case, interrupts are disabled after the context
switch on targets which do not save/restore the interrupt state during a
context switch (aarch64, arm, and riscv).
Close #4627.
|
|
|
|
|
|
|
| |
Disable thread dispatching earlier on secondary processors. This ensures that
fatal error and per-CPU job handlers are called with thread dispatching
disabled. On the boot processor, the thread dispatching is already disabled by
_Thread_Dispatch_initialization().
|
| |
|
|
|
|
| |
Updates #3053.
|
| |
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
| |
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
|
|
| |
sse_test.c was deliberarely NOT changed.
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
|
|
|
|
|
|
| |
This is required for ISA 2.0 support, see chapter
"Zicsr", Control and Status Register (CSR) Instructions, Version 2.0
in
RISC-V Instruction Set Manual, Volume I: RISC-V User-Level ISA
|
| |
|
|
|
|
| |
Updates #3053.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add MicroBlaze support for libdebugger. This uses only software break
type instructions to provide self-hosted GDB debugging support for
applications since internal control of debug hardware is not possible.
Also of note, this implementation for MicroBlaze would typically use the
brki instruction for software break, but instead uses an illegal opcode
to manage software breaks as exceptions. This is due to poor interaction
with the debug hardware where the debug hardware will intercept software
breaks instead of allowing the software break vector to execute.
|
|
|
|
|
|
|
|
| |
Exception handling should be enabled at all times during execution to
ensure that exceptions are not ignored which would cause further
problems. This separates use of the exception enable bit from use of the
interrupt enable bit in the machine status register so that they can be
manipulated independently.
|
|
|
|
|
|
| |
Remove previous adjtime() implementation.
Update #2348.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The file was imported from this repository:
https://github.com/freebsd/freebsd.git
This commit was used:
commit 3ec0dc367bff27c345ad83240625b2057af391b9
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Mon Feb 7 14:16:16 2022 -0700
kern_ntptime.c: Remove ntp_init()
The ntp_init() function did set a couple of global objects to zero. These
objects are in the .bss section and already initialized to zero during kernel
or module loading.
Update #2348.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two places where we convert from a timecounter delta to
a bintime delta: tc_windup and bintime_off.
Both functions use the same calculations when the timecounter delta is
small. But for a large delta (greater than approximately an equivalent
of 1 second) the calculations were different. Both functions use
approximate calculations based on th_scale that avoid division. Both
produce values slightly greater than a true value, calculated with
division by tc_frequency, would be. tc_windup is slightly more
accurate, so its result is closer to the true value and, thus, smaller
than bintime_off result.
As a consequence there can be a jump back in time when time hands are
switched after a long period of time (a large delta). Just before the
switch the time would be calculated with a large delta from
th_offset_count in bintime_off. tc_windup does the switch using its own
calculations of a new th_offset using the large delta. As explained
earlier, the new th_offset may end up being less than the previously
produced binuptime. So, for a period of time new binuptime values may
be "back in time" comparing to values just before the switch.
Such a jump must never happen. All the code assumes that the uptime is
monotonically nondecreasing and some code works incorrectly when that
assumption is broken. For example, we have observed sleepq_timeout()
ignoring a timeout when the sbinuptime value obtained by the callout
code was greater than the expiration value, but the sbinuptime obtained
in sleepq_timeout() was less than it. In that case the target thread
would never get woken up.
The unified calculations should ensure the monotonic property of the
uptime.
The problem is quite rare as normally tc_windup should be called HZ
times per second (typically 1000 or 100). But it may happen in VMs on
very busy hypervisors where a VM's virtual CPU may not get an execution
time slot for a second or more.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Panzura LLC
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hyper-V wants to register its MSR-based timecounter during
SI_SUB_HYPERVISOR, before SI_SUB_LOCK, since an emulated 8254 may not be
available for DELAY(). So we cannot use MTX_SYSINIT to initialize the
timecounter lock.
PR: 259878
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33014
|
|
|
|
|
|
| |
The dispatch code was unnecessarily saving and restoring an extra
interrupt frame. This avoids the extra frame and folds the dispatch call
into a fallthrough to the interrupt frame restoration code.
|
|
|
|
|
|
| |
Avoid use of magic numbers in favor of named constants and add MSR to
the interrupt frame so that thread dispatch can occur on exceptions as
well.
|
|
|
|
|
| |
Add the functions necessary to support RTEMS_EXCEPTION_EXTENSIONS and
mark this functionality as available on MicroBlaze.
|
|
|
|
|
|
| |
This patch adds a vector for debug events along with a hook similar to
the exception framework. The debug vector generates an exception frame
for use by libdebugger.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch updates the CPU_Exception_frame to include all necessary
registers, combines hardware snd software exception handlers into a
shared vector, provides an architecture-specific hook for taking
control of exception handling, and moves exception handling over to
actually using the CPU_Exception_frame instead of a minimal interrupt
stack frame. As the significant contents of _exception_handler.S have
been entirely rewritten, the copyright information on this file has been
updated to reflect that.
|
|
|
|
|
| |
This includes fixes and improvements necessary to get libbsd networking
running.
|
|
|
|
|
| |
Use the SRS (Store Return State) instruction if available. This
considerably simplifies the context save and restore.
|
|
|
|
|
|
|
|
|
|
|
| |
On a public interface, the stack pointer must be aligned on an 8-byte
boundary. However, it may temporarily be only aligned on a 4-byte
boundary. The interrupt handling code must ensure that the stack
pointer is properly aligned before it calls a function. See also:
https://developer.arm.com/documentation/den0013/d/Interrupt-Handling/External-interrupt-requests/Nested-interrupt-handling
Update #4579.
|