Commit Graph

37026 Commits

Author SHA1 Message Date
Sebastian Huber
2fbee001f7 bsp/tms570: Use write-back/write-allocate SDRAM
Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
b4a4baa32d bsp/tms570: Use RTI for CPU counter
The performance monitor counter is stopped when the core is waiting for
interrupts.

Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
cb43ee6969 bsp/tms570: Add TMS570_FATAL_RTI_IRQ_INSTALL
Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
575ec7ed39 bsp/tms570: Fix clock driver
The clock tick rate was off by a factor of two in some configurations.
Use the maximum counter frequency to get the best time resolution.  Do
not use the automatic interrupt clear feature.

Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
cc6f1d86cc bsp/tms570: Add clock BSP options
Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
28e4a46d67 bsp/tms570: Add TMS570LC4357 PLL support
Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
123e0e6fb6 bsps/cache: Fix ARM CP-15 get cache size
The rtems_cache_get_data_cache_size() and
rtems_cache_get_instruction_cache_size() functions shall return the entire
cache size for a level of 0.  Levels greater than 0 shall return the size of
the associated level.

Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
ef570cf157 bsps/cache: Simplify Cortex-R5 cache support
Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
f67f1c8718 arm: Add arm_cp15_data_cache_all_invalidate()
Update #4982.
2024-06-04 15:50:57 +00:00
Sebastian Huber
b89101116f validation: Improve interrupt controller tests
Update #3716.
2024-05-31 20:04:31 +00:00
Alesandro Nardin
48f6b5006b cpukit/posix/src/aio_misc.c: created helper method rtems_aio_handle_helper()
Created an helper method that will be called by rtems_aio_handle().
The method will process the various types of aio requests.
Converted the old style documentation to Doxygen.
Formatted the code to adhere to rtems formatting rules.

Closes #5017
2024-05-29 18:54:36 +02:00
Ning Yang
4b45d42aee bsps/xilinx-versal: fix BSP_INTERRUPT_VECTOR_COUNT too large
Avoid use of reserved INTIDs. BSP_INTERRUPT_VECTOR_COUNT does not allow use reserved interrupt IDs.

Details !29
2024-05-29 02:52:31 +00:00
Joel Sherrill
e63c867104 x86_64/include/rtems/score/cpuimpl.h: Relicense to 2-BSD
This file had two copyrights but was missed in the earlier review.
Both parties had given permission.

Update #3053.
2024-05-28 15:44:37 -05:00
Matheus Pecoraro
b3a4f539c9 bsps/amd64: Add comments to start.s 2024-05-24 15:26:35 -03:00
Amar Takhar
64844f4468 Promote to group for libdrvmgr and add libdebugger, libdl
Two directories were missed and I forgot Gedare for libdrvmgr so it was promoted
to a group.
2024-05-23 23:06:12 -04:00
Amar Takhar
10727117a3 Typo aarch -> aarch64
This is in the approvers group.
2024-05-23 22:35:14 -04:00
Amar Takhar
39fa5a6755 Convert librtemscxx and libstdthreads to groups.
Sebastian has been added the groups are in /approvers/cpukit/
2024-05-23 21:58:28 -04:00
Sebastian Huber
869071dfb2 score: Add _Processor_mask_And_not()
Add it for completeness.
2024-05-23 21:44:22 +00:00
Sebastian Huber
a85402f76f build: Simplify wscript code 2024-05-23 20:55:21 +00:00
Alessandro Nardin
3225f69db6 posix: Fixed header comment of aio_read.c
Corrected the header comment of aio_read.c

Fixes #5015
2024-05-23 19:10:32 +00:00
Sebastian Huber
80c94eeff4 bsps: Assign file to Doxygen group
Add standard file header.
2024-05-23 19:03:09 +00:00
Sebastian Huber
e74cea4172 arm: Fix Armv7-M floating-point support
The _ARMV7M_Pendable_service_call() and _ARMV7M_Supervisor_call() work
as a team. The --ef and ++ef is there to preserve the original exception
frame across the jump to and from _ARMV7M_Thread_dispatch().

void _ARMV7M_Pendable_service_call( void )
{
   Per_CPU_Control *cpu_self = _Per_CPU_Get();

   /*
    * We must check here if a thread dispatch is allowed.  Right after a
    * "msr basepri_max, %[basepri]" instruction an interrupt service may
still
    * take place.  However, pendable service calls that are activated during
    * this interrupt service may be delayed until interrupts are enable
again.
    */
   if (
     ( cpu_self->isr_nest_level |
cpu_self->thread_dispatch_disable_level ) == 0
   ) {
     ARMV7M_Exception_frame *ef;

     cpu_self->isr_nest_level = 1;

     _ARMV7M_SCB->icsr = ARMV7M_SCB_ICSR_PENDSVCLR;
     _ARMV7M_Trigger_lazy_floating_point_context_save();

At this point, the floating point context should be saved on the
exception frame.  The FPCCR.LSPACT bit should be 0, to indicate that lazy
state preservation is no longer active.

     ef = (ARMV7M_Exception_frame *) _ARMV7M_Get_PSP();
     --ef;
     _ARMV7M_Set_PSP( (uint32_t) ef );

This new exception frame is just there to jump to
_ARMV7M_Thread_dispatch(). Here was the problem, that FPCCR.LSPACT was
not set to 1.  This resulted in a floating-point context from
uninitialized memory which could corrupt the floating-point state.  See
also:

https://developer.arm.com/documentation/ddi0403/d/System-Level-Architecture/System-Level-Programmers--Model/ARMv7-M-exception-model/Exception-return-behavior?lang=en

     /*
      * According to "ARMv7-M Architecture Reference Manual" section B1.5.6
      * "Exception entry behavior" the return address is half-word aligned.
      */
     ef->register_pc = (void *)
       ((uintptr_t) _ARMV7M_Thread_dispatch & ~((uintptr_t) 1));

     ef->register_xpsr = 0x01000000U;
   }
}

Close #4923.
2024-05-22 01:46:00 +00:00
Matheus Pecoraro
b874f4c99d x86_64: Fix stack aligment for x86-64 SysV ABI
Makes the code in bsp/x86_64/amd64/start/start.S and the stack frame
setup by _CPU_Context_Initialize align the stack properly according to
what is expected by the x86-64 SysV ABI
2024-05-22 01:31:06 +00:00
Kinsey Moore
2c03b41fdc cpukit/libdl/aarch64: Improve debug output 2024-05-21 23:28:03 +00:00
Kinsey Moore
f094427708 bsps/shared/gicv3: Validate BSP vector count
Ensure that BSP_INTERRUPT_VECTOR_COUNT does not allow for reserved
interrupt IDs.
2024-05-21 23:26:37 +00:00
Kinsey Moore
ba1f92fcba bsps/aarch64/a72: Avoid use of reserved INTIDs
Interrupt IDs 1020, 1021, 1022, and 1023 are reserved as special INTIDs
and should be ignored for normal RTEMS operation as they signal internal
changes in the interrupt controller that RTEMS itself is directly
causing.
2024-05-21 23:26:37 +00:00
Kinsey Moore
7eb3ef09b0 spec/xilinx-zynqmp-rpu: Calculate correct RAM area
There were some problems in the math calculating RAM length and NOCACHE
origin location. These have been resolved in this patch allowing RTEMS
RAM space to be relocated above 0xfe00000 to better accomodate other
elements in the system.
2024-05-21 22:55:13 +00:00
Alesandro Nardin
fca3f2b820 corrected the content of psxaio01.scn 2024-05-21 20:21:36 +00:00
Amar Takhar
cfb9f96c51 Re-add move of maintainers group.
In e95dabc77 approvers/maintainer was moved to general/maintainer.  It was moved
back in the last commit to test permissions though I forgot to note it there.

Re-add since things are working as expected.
2024-05-21 13:36:58 -04:00
Amar Takhar
79b385c804 Add CPUKit code owners.
Also add some headings for clarity and a note about creating groups.
2024-05-21 00:55:34 -04:00
Amar Takhar
e95dabc77d Move approvers/maintainer to approvers/general/maintainer
This change is to avoid anyone who is in the 'approvers' group for maintenance
showing up as approvers.  Access goes only one level up from the current group
so having approval groups one level down was causing issues with me, Chris and
Kinsey showing up.
2024-05-19 22:15:07 -04:00
Amar Takhar
d4923b098f Remove approvers/general
This will not work as intended for now Guests were never meant to be approvers
the fact they show up in the list is a bug see:

* https://gitlab.com/gitlab-org/gitlab/-/issues/220054
* https://gitlab.com/gitlab-org/gitlab/-/issues/220627
2024-05-17 23:47:12 -04:00
Amar Takhar
fafd85e1e4 Remove [1] behind groups.
It is the default and having it there is confusing.
2024-05-17 15:31:48 -04:00
Amar Takhar
4780871435 Fix typos
Plus an additional one.

Closes administration/gitlab/#50
2024-05-17 14:16:49 -04:00
Amar Takhar
4aec3093ab Add initial CODEOWNERS file. 2024-05-14 17:25:09 -04:00
Sebastian Huber
ab8817ca03 rtems: Add get/set interrupt priorities
Add directives to get and set the priority of an interrupt vector.

Implement the directives for the following BSP families:

* arm/lpc24xx
* arm/lpc32xx
* powerpc/mpc55xxevb
* powerpc/qoriq

Implement the directives for the following interrupt controllers:

* GICv2 and GICv3 (arm and aarch64)
* NVIC (arm)
* PLIC (riscv)

Update #5002.
2024-05-10 13:26:22 +00:00
Josef 'Jeff' Sipek
89ccc65d1a Remove a reference to xrpu from timetc.h
It was removed in 2007, so doesn't make a good example.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44462
2024-05-10 13:24:36 +00:00
Jake Freeland
c71d561bf8 timerfd: Move implementation from linux compat to cpukit/score/src
Move the timerfd impelemntation from linux compat code to cpukit/score/src. Use
it to implement the new system calls for timerfd. Add a hook to kern_tc
to allow timerfd to know when the system time has stepped. Add kqueue
support to timerfd. Adjust a few names to be less Linux centric.

RelNotes: YES
Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack)
Differential Revision: https://reviews.freebsd.org/D38459
2024-05-10 13:24:36 +00:00
Warner Losh
7867005def sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2024-05-10 13:24:36 +00:00
Warner Losh
770ef97a45 sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2024-05-10 13:24:36 +00:00
Dmitriy Alexandrov
426492407b kern_ntptime: Fix undefined behavior of the shift operator
L_LINT macro is used with negative numbers [i.e.
L_LINT(time_freq, -MAXFREQ)], it could cause undefined
behavior. It should be similar to the L_RSHIFT(v, n) macro.

MFC after:	2 weeks
Reviewed by:	cy
Pull Request:	https://github.com/freebsd/freebsd-src/pull/769
Signed-off-by: Dmitriy Alexandrov <d06alexandrov@gmail.com>
2024-05-10 13:24:36 +00:00
Warner Losh
e11536c339 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2024-05-10 13:24:36 +00:00
Pedro F. Giffuni
b294ef236d sys/sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2024-05-10 13:24:36 +00:00
Sebastian Huber
f6c8726cb7 bsps/arm: Move BSP-specific header file 2024-05-10 13:20:45 +00:00
Sebastian Huber
ee7f847432 bsps/arm: Use shared object for ARM920 MMU support 2024-05-10 13:20:45 +00:00
Sebastian Huber
5a3a85ccdd bsps/arm: Move BSP-specific header file installs 2024-05-10 13:20:45 +00:00
Sebastian Huber
dfc147fd33 aarch64/xilinx-zynqmp: Enable errata workarounds
Close #5003.
2024-05-08 12:19:07 +02:00
Sebastian Huber
40ddcf9580 bsps: Use interrupt entry in clock driver
This avoids a dependency on memory allocations.
2024-05-07 23:21:31 +00:00
Vincenzo Calabretta
1f4e0c1036 bsps/powerpc: Introduction of interrupt locks
Interrupt locks are introduced in shared vme device drivers to enable
compilation in an SMP configuration of the qoriq BSP.
2024-05-07 18:26:28 +02:00
Sebastian Huber
f5b52a3af0 bsps/arm: Fix Doxygen group assignment 2024-05-07 11:16:49 +02:00