Commit Graph

34869 Commits

Author SHA1 Message Date
Sebastian Huber
709dfd4907 mpci: Fix RTEMS_DEBUG support 2022-03-08 08:12:47 +01:00
Sebastian Huber
1b1ace7620 bsp/leon3: Fix warning 2022-03-08 08:12:47 +01:00
Sebastian Huber
cfeb3cbb68 bsp/leon3: Include missing header file
The <leon.h> include was removed from <bsp.h> in commit
1577a48369.
2022-03-08 08:12:47 +01:00
Joel Sherrill
f381e9bab2 cpukit/libblock: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
2dcc54f9c6 cpukit/ftpd: Change license to BSD-2
Not all files could be changed.

Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
2fb29836b0 cpukit/include/adainclude: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
c0ec0b29e9 score/cpu/v850: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
ef32245bee score/cpu/sparc64: Change license to BSD-2 2022-02-28 10:28:05 -06:00
Joel Sherrill
e111974ab8 score/cpu/sparc: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
87076c94d2 score/cpu/powerpc: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
2ec78aaf4a score/cpu/or1k: Change license to BSD-2 2022-02-28 10:28:05 -06:00
Joel Sherrill
3ca8895f3a score/cpu/no_cpu: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
4b5e64ac04 score/cpu/nios2: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
bf10d5b912 score/cpu/mips: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
51366002f2 score/cpu/m68k: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
f42730ae7a score/cpu/i386: Change license to BSD-2
sse_test.c was deliberarely NOT changed.

Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
e47a3b758f score/cpu/arm: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
bd2e898c9e sapi/src/*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
46a16ada0c cpukit/include/rtems/posix/*.h: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
fee27716f0 posix/src/_execve.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
380fb9fb91 cpukit/posix/src/[p-z]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
0a645dadd5 cpukit/posix/src/[a-o]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
a2ed06e38f cpukit/include/rtems/rtems/*.h: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:05 -06:00
Joel Sherrill
b3b6d21e6f cpukit/rtems/src/[s-z]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Joel Sherrill
c4fb617030 cpukit/rtems/src/[a-r]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Joel Sherrill
7b85efb8c4 cpukit/include/rtems/score/[s-z]*.h: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Joel Sherrill
7ebce35902 cpukit/include/rtems/score/[a-r]*.h: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Joel Sherrill
2a1449c517 score/src/[t-z]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Joel Sherrill
4a0e418024 score/src/[n-s]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Joel Sherrill
ab02824417 score/src/[a-m]*.c: Change license to BSD-2
Updates #3053.
2022-02-28 10:28:04 -06:00
Sebastian Huber
a286d28695 powerpc: Use .machine any for some inline asm 2022-02-26 07:40:17 +01:00
Sebastian Huber
faaffbd913 riscv: Use zicsr architecture extension
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
2022-02-25 20:38:20 +01:00
Sebastian Huber
4b09a4c7b8 bsps/riscv: Add missing include 2022-02-25 20:38:20 +01:00
Sebastian Huber
3cf618b398 bsps/riscv: Support .riscv.attributes 2022-02-25 15:34:06 +01:00
Sebastian Huber
8a640bf817 bsps/powerpc: Do no use Newlib internals
The struct _reent::__sdidinit member was renamed in a recent Newlib.
2022-02-25 15:34:06 +01:00
Joel Sherrill
4bc34704a1 cpukit/libblock: Clean up before license change 2022-02-23 16:30:46 -06:00
Joel Sherrill
cc9f4339e3 score/cpu/i386: Clean up file headers in prep for license change. 2022-02-23 16:30:46 -06:00
Joel Sherrill
1011484867 score/src/schedulersimple*.c: Replace found in found in with found in
Updates #3053.
2022-02-23 16:30:46 -06:00
Kinsey Moore
fa944c5eac spec/microblaze: Use configurable RAM size
When committed, the MicroBlaze RAM size was hard-coded to 16MB. This
changes the default to 256MB and sets the KCU105 BSPs to 2GB since that
is what the board has on it.
2022-02-23 12:33:55 -06:00
Kinsey Moore
3317d1e8f0 cpukit/libdebugger: Add MicroBlaze support
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.
2022-02-23 08:35:45 -06:00
Kinsey Moore
16d40ce7ff cpukit/libdebugger: Avoid cascade for interrupts
This updates behavior of libdebugger to handle debug exceptions in
interrupt context by temporarily removing a software breakpoint,
stepping, and then resuming afterward.
2022-02-23 08:35:45 -06:00
Kinsey Moore
dbdf38ea7b microblaze: Decouple exceptions from interrupts
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.
2022-02-23 08:35:45 -06:00
Kinsey Moore
ea1a4fd29b cpukit/libdebugger: Add pure swbreak capability
Add a capability that allows for implementations that operate purely
using software breaks. Due to this implementation method, software
breaks must not be restored until just before returning control to the
thread itself and will be handled by the implementation through thread
switch and interrupt hooks.
2022-02-23 08:35:45 -06:00
Kinsey Moore
924993a4bc cpukit/libdebugger: Avoid missed swbreak removal
It is possible to remove software breaks without actually restoring the
original instruction to memory. When this happens, the original
instruction is lost. This ensures that the original instruction is
restored when a software break is removed.
2022-02-23 08:35:45 -06:00
Sebastian Huber
fa65ad7f02 config: Document CONFIGURE_SCHEDULER_TABLE_ENTRIES 2022-02-22 16:10:03 +01:00
Sebastian Huber
8f1e8f8f26 kern_ntptime.c: Port to RTEMS
Remove previous adjtime() implementation.

Update #2348.
2022-02-21 14:16:41 +01:00
Sebastian Huber
91057b3bdf kern_ntptime.c: Import from FreeBSD
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.
2022-02-21 14:16:29 +01:00
Andriy Gapon
870cf9695f kern_tc: unify timecounter to bintime delta conversion
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
2022-02-21 14:07:29 +01:00
Mark Johnston
ede2278d8d timecounter: Initialize tc_lock earlier
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
2022-02-21 14:01:31 +01:00
Sebastian Huber
d69acf87dc config: CONFIGURE_DISABLE_NEWLIB_REENTRANCY
Do not initialize Thread_Control::libc_reent if
CONFIGURE_DISABLE_NEWLIB_REENTRANCY is defined.  This helps to catch errors
with a NULL pointer exception rather than a corruption of the thread control
block.
2022-02-21 11:08:30 +01:00