Commit Graph

36436 Commits

Author SHA1 Message Date
Christian Mauderer
fc68da47d5 bsps/imxrt1166*: Absolute address for pins in FDT
The i.MXRT1166 has three iomux controllers. The driver in RTEMS
(originally for i.MX6) doesn't support that. Switching to absolute
addresses for the pins in the FDT works around that.

Compared to changing the IOMUX driver, it has the following advantages:

- If a devicetree is written, the pinctrl-groups don't have to be split
up between different iomux controllers which makes device trees simpler
to read.

- A driver or application doesn't has to handle multiple pinctrl-groups
which simplifies the drivers.
2024-06-07 06:46:00 +00:00
Christian Mauderer
f83968f309 bsps/arm/imxrt: Add license header to fdt-blobs
The C files that provide the device trees are generated with
rtems-bin2c. Due to that, the license information in these files is
lost. Therefore this patch adds the header manually. Also adapt the
commands that are used to generate the files to reflect that.
2024-06-07 06:46:00 +00:00
Christian Mauderer
15f16def12 bsps/imx*: Add an i.MX* specific GPIO SPI driver
This driver uses the generic spi-gpio driver to implement one based on
the i.MX* GPIO API.
2024-06-07 06:46:00 +00:00
Christian Mauderer
0e7567bc2a bsps: Add a GPIO based SPI driver
The driver uses simple pin set or get functions to emulate an SPI. It
doesn't care much for speed settings and just tries it's best.
2024-06-07 06:46:00 +00:00
Christian Mauderer
7179f23340 bsps/imx*-gpio: Parse active level of FDT
This makes the active level of the FDT available to the user. It doesn't
change the current behaviour. It only provides a function to get the
active or inactive level of a pin.
2024-06-07 06:46:00 +00:00
Sebastian Huber
cbe60cea71 rtems: Clarify rtems_interrupt_set_priority()
Update #5002.
2024-06-06 23:41:13 +00:00
Sebastian Huber
e1be689980 smpschedaffinity02: Fix sporadic test failures
Under rare timing conditions, the polled mutex obtain can favour one processor
and starve the other.  This can lead to test failures.
2024-06-06 05:42:38 +00:00
Jacob Killelea
42ad53f395 New ST Nucleo STM32H755ZI BSP
## Implement a new ST Nucleo STM32H755ZI BSP

Hi all, for a project I recently acquired a Nucleo STM32H755ZI. Thanks to the work of @sebhub, @c-mauderer, and Karel Gardas, it was pretty easy to create a new Nucleo BSP for this chip by copying the Nucleo H743 BSP. I was not able to get the 8 MHz HSE clock enabled, so this is currently clocked off of the PLL using the 64 MHz HSI clock and the RTC clock is disabled. Other features haven't been thoroughly tested, but since they rely on the high quality STM32H7 HAL from ST, I have pretty high confidence in them. I've been able to run most testsuites.

I have tested:

* The CM7 core
* The CM4 core
* Console output on UART3 (the default USB UART) and the shell
* GPIO
* Sample programs like `hello`, `fileio` (and shell), `paranoia`, `unlimited`, etc.

Known Broken:

* Debugging with OpenOCD is wonky. I can set breakpoints, halt the processor and inspect memory and registers and return from functions, but stepping does not work.
* The program begins to run after being flashed but soon (under 1 second) stops running. Pressing the reset button makes the program run continuously afterward. The board resets nearly instantly.
* Shell commands `ls`, `cd`, `cpuuse`, etc. hang for a while before executing. I'm not sure where the time is spent because the built-in `time` command reports that these commands execute nearly instantly.

I haven't tested:

* Pretty much everything else

<!-- Default settings, if it is a dropdown it will set after submission -->
2024-06-06 05:37:35 +00:00
Sebastian Huber
25ba67963a score: Add _SMP_barrier_Wait_for_other()
This function may be used to ensure that a count of processors performed a set
of actions and then wait on the barrier performing only memory loads (no memory
stores).
2024-06-04 22:00:55 +00:00
Sebastian Huber
6c66526e82 bsp/tms570: Move ECLK pin initialization
Update #4982.
2024-06-04 15:50:57 +00:00
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