The register block specification were recently integrated in the RTEMS Software Engineering manual. Now it is time to integrate the pre-qualified LEON3 BSP which uses the generated GRLIB header files.
The existing tests in the RTEMS test suite are basically BSP independent. This patch set introduces BSP-specific validation tests. These tests are disabled for other BSPs through the build system, for example: spec/build/testsuites/validation/bsp-sparc-leon3-gr712rc.yml [...] cxxflags: [] enabled-by: sparc/gr712rc features: c cprogram [...] The patch set introduces new header files for GRLIB in "bsps/include/grlib". These header files were generated from specification items in: https://github.com/RTEMS/rtems-central/tree/master/spec/dev/grlib/if The specification was created using the GRIP reference manual (https://www.gaisler.com/products/grlib/grip.pdf) and is quite complete. The generated header files were reviewed by the ISVV activity which resulted in two tickets: https://devel.rtems.org/ticket/4828 https://devel.rtems.org/ticket/4842 In the long term, the existing GRLIB header files should be replaced by the generated header files. Using specification items for the register blocks has the potential benefit that, in addition to the C header files, files for C++/Rust/Python could be generated. The main change for the sparc/gr712rc and sparc/gr740 BSPs is the removal of the dynamic device enumeration in favor of a static initialization. This greatly simplifies the specification and validation of the BSP-specific parts. It also reduces the code and data size for applications which do not need the dynamic device enumeration. v2: * Move BSP-specific tests to "testsuites/validation/bsps". * Rearrange patches so that they build individually. v3: * Restore previous behaviour of gptimer_tlib_reset(). * Use new IRQ(A)MP register block API also for LEON_Enable_interrupt_broadcast() and LEON_Disable_interrupt_broadcast(). * Add GRCAN - CanTxIRQ. * Expand GRCLKGATE register bit fields. * Move GR740-specific register blocks. * Use GRLIB definition of GRSPW2 * Remove obsolete register block. This register block was an incomplete duplicate of spec:/dev/grlib/if/grspw2. * Use GRLIB definition of GRSPWROUTER. Rename item to match with GRLIB naming. Sebastian Huber (38): bsps/grlib: Add generated headers bsps/grlib: Fix FTMCTRL - MCFG1 bit fields bsps/grlib: Fix GRGPIO - IRQMAP bit fields bsps/grlib: Fix SpaceWire RMAP - Product ID bsps/grlib: Expand SpaceWire port bit fields bsps/grlib: Fix SPWTDP register name bsps/grlib: Add GRCAN - CanTxIRQ bsps/grlib: Expand GRCLKGATE register bit fields bsps/grlib: Move GR740-specific registers bsps/grlib: Use GRLIB definition of GRSPW2 bsps/grlib: Remove obsolete header file bsps/grlib: Use GRLIB definition of GRSPWROUTER bsps: Use new APBUART register block API bsp/leon3: Untangle interrupt controller support bsp/leon3: Move and simplify bsp_irq_fixup() bsp/leon3: Use new IRQ(A)MP register block API bsp/leon3: Move system control register support bsp/leon3: Use new GPTIMER register block API bsp/leon3: Use new L2CACHE register block API bsp/leon3: Add LEON3_APBUART_BASE bsp/leon3: LEON3_PLB_FREQUENCY_DEFINED_BY_GPTIMER bsp/leon3: Add LEON3_GPTIMER_BASE bsp/leon3: Add LEON3_IRQAMP_BASE bsp/leon3: Add LEON3_IRQAMP_PROBE_TIMESTAMP bsp/leon3: Add LEON3_HAS_ASR_22_23_UP_COUNTER bsp/leon3: Add LEON3_L2CACHE_BASE bsp/leon3: Move leon3_power_down_loop() bsp/leon3: Simplify fatal error handling bsp/leon3: Add LEON3_PROBE_ASR_22_23_UP_COUNTER bsp/leon3: Add LEON3_IRQAMP_EXTENDED_INTERRUPT bsp/leon3: Use LEON3_GPTIMER_BASE bsp/leon3: Enable up-counter conditionally bsps/sparc: Remove BSP_POWER_DOWN_AT_FATAL_HALT bsp/leon3: Fix group memberships bsp/leon3: Add specialized target hash validation: grlib validation: Test sparc/leon3 BSP family bsp/leon3: Simplify shutdown bsps/include/grlib/ahbstat-regs.h | 171 ++ bsps/include/grlib/ahbtrace-regs.h | 313 +++ bsps/include/grlib/apbuart-regs.h | 281 +++ bsps/include/grlib/apbuart.h | 108 +- bsps/include/grlib/apbuart_termios.h | 4 +- bsps/include/grlib/dsu4-regs.h | 788 +++++++ bsps/include/grlib/ftmctrl-regs.h | 322 +++ bsps/include/grlib/gptimer-regs.h | 379 ++++ bsps/include/grlib/gr1553b-regs.h | 1393 ++++++++++++ bsps/include/grlib/grcan-regs.h | 723 +++++++ bsps/include/grlib/grclkgate-regs.h | 212 ++ bsps/include/grlib/grethgbit-regs.h | 446 ++++ bsps/include/grlib/grgpio-regs.h | 630 ++++++ bsps/include/grlib/griommu-regs.h | 878 ++++++++ bsps/include/grlib/grpci2-regs.h | 875 ++++++++ bsps/include/grlib/grspw2-regs.h | 1429 ++++++++++++ bsps/include/grlib/grspwrouter-regs.h | 1925 +++++++++++++++++ bsps/include/grlib/irqamp-regs.h | 874 ++++++++ bsps/include/grlib/irqamp.h | 101 + bsps/include/grlib/l2cache-regs.h | 807 +++++++ bsps/include/grlib/l4stat-regs.h | 297 +++ bsps/include/grlib/memscrub-regs.h | 568 +++++ bsps/include/grlib/mmctrl-regs.h | 434 ++++ bsps/include/grlib/spictrl-regs.h | 464 ++++ bsps/include/grlib/spwpnp-regs.h | 553 +++++ bsps/include/grlib/spwtdp-regs.h | 1268 +++++++++++ bsps/shared/grlib/btimer/gptimer.c | 178 +- bsps/shared/grlib/uart/apbuart_cons.c | 136 +- bsps/shared/grlib/uart/apbuart_polled.c | 52 +- bsps/shared/grlib/uart/apbuart_termios.c | 49 +- .../include/bsp/irqimpl.h} | 51 +- bsps/sparc/erc32/include/erc32.h | 5 - bsps/sparc/include/grlib/io.h | 210 ++ .../include/bsp/irqimpl.h} | 53 +- bsps/sparc/leon2/include/leon.h | 5 - bsps/sparc/leon3/btimer/btimer.c | 13 +- bsps/sparc/leon3/btimer/watchdog.c | 27 +- bsps/sparc/leon3/clock/ckinit.c | 233 +- bsps/sparc/leon3/console/console.c | 2 +- bsps/sparc/leon3/console/printk_support.c | 43 +- bsps/sparc/leon3/gnatsupp/gnatsupp.c | 2 +- .../leon3/include/bsp/gr740-bootstrap-regs.h | 137 ++ .../leon3/include/bsp/gr740-iopll-regs.h | 679 ++++++ .../leon3/include/bsp/gr740-thsens-regs.h | 229 ++ bsps/sparc/leon3/include/bsp/irq.h | 4 +- bsps/sparc/leon3/include/bsp/irqimpl.h | 151 ++ bsps/sparc/leon3/include/bsp/leon3.h | 323 +++ bsps/sparc/leon3/include/leon.h | 219 +- bsps/sparc/leon3/include/tm27.h | 2 +- bsps/sparc/leon3/start/amba.c | 42 +- bsps/sparc/leon3/start/bspclean.c | 52 +- bsps/sparc/leon3/start/bspdelay.c | 8 +- bsps/sparc/leon3/start/bspsmp.c | 25 +- bsps/sparc/leon3/start/bspstart.c | 2 +- bsps/sparc/leon3/start/cache.c | 74 +- bsps/sparc/leon3/start/cpucounter.c | 116 +- bsps/sparc/leon3/start/eirq.c | 139 +- bsps/sparc/leon3/start/gettargethash.c | 71 + bsps/sparc/leon3/start/setvec.c | 2 +- bsps/sparc/shared/irq/bsp_isr_handler.c | 1 + cpukit/score/cpu/sparc/syscall.S | 2 + spec/build/bsps/sparc/erc32/bsperc32.yml | 4 +- spec/build/bsps/sparc/erc32/optpwrdwnhlt.yml | 16 - spec/build/bsps/sparc/leon2/grp.yml | 2 - spec/build/bsps/sparc/leon2/obj.yml | 2 +- spec/build/bsps/sparc/leon2/optpwrdwnhlt.yml | 16 - spec/build/bsps/sparc/leon3/grp.yml | 18 +- spec/build/bsps/sparc/leon3/obj.yml | 4 +- .../build/bsps/sparc/leon3/optapbuartbase.yml | 20 + spec/build/bsps/sparc/leon3/optasrupcnt.yml | 17 + .../bsps/sparc/leon3/optasrupcntprobe.yml | 19 + .../build/bsps/sparc/leon3/optgptimerbase.yml | 20 + spec/build/bsps/sparc/leon3/optirqampbase.yml | 19 + .../bsps/sparc/leon3/optirqampextirq.yml | 19 + spec/build/bsps/sparc/leon3/optirqampts.yml | 22 + .../build/bsps/sparc/leon3/optl2cachebase.yml | 19 + spec/build/bsps/sparc/leon3/optplbfreq.yml | 21 + spec/build/bsps/sparc/leon3/optpwrdwnhlt.yml | 16 - ...arc-leon3-cache-snooping-disabled-boot.yml | 24 + ...eon3-cache-snooping-disabled-secondary.yml | 25 + ...fatal-sparc-leon3-clock-initialization.yml | 21 + .../bsps/fatal-sparc-leon3-shutdown.yml | 25 + .../testsuites/validation/bsps/objgrlib.yml | 16 + .../validation/bsps/objsparcgr712rc.yml | 14 + .../validation/bsps/validation-bsp-0.yml | 25 + spec/build/testsuites/validation/grp.yml | 11 + .../bsps/tc-fatal-sparc-leon3-shutdown.c | 211 ++ testsuites/validation/bsps/tc-sparc-gr712rc.c | 124 ++ ...sparc-leon3-cache-snooping-disabled-boot.c | 175 ++ ...sparc-leon3-cache-snooping-disabled-boot.h | 84 + ...-leon3-cache-snooping-disabled-secondary.c | 176 ++ ...-leon3-cache-snooping-disabled-secondary.h | 84 + ...r-fatal-sparc-leon3-clock-initialization.c | 190 ++ ...r-fatal-sparc-leon3-clock-initialization.h | 84 + ...sparc-leon3-cache-snooping-disabled-boot.c | 79 + ...-leon3-cache-snooping-disabled-secondary.c | 82 + ...s-fatal-sparc-leon3-clock-initialization.c | 79 + .../ts-fatal-sparc-leon3-shutdown-response.c | 94 + .../bsps/ts-fatal-sparc-leon3-shutdown.c | 170 ++ .../validation/bsps/ts-validation-bsp-0.c | 73 + .../tc-dev-grlib-apbuart-inbyte-nonblocking.c | 348 +++ testsuites/validation/tc-dev-grlib-io.c | 295 +++ .../tc-dev-grlib-irqamp-get-timestamp.c | 304 +++ 103 files changed, 21837 insertions(+), 810 deletions(-) create mode 100644 bsps/include/grlib/ahbstat-regs.h create mode 100644 bsps/include/grlib/ahbtrace-regs.h create mode 100644 bsps/include/grlib/apbuart-regs.h create mode 100644 bsps/include/grlib/dsu4-regs.h create mode 100644 bsps/include/grlib/ftmctrl-regs.h create mode 100644 bsps/include/grlib/gptimer-regs.h create mode 100644 bsps/include/grlib/gr1553b-regs.h create mode 100644 bsps/include/grlib/grcan-regs.h create mode 100644 bsps/include/grlib/grclkgate-regs.h create mode 100644 bsps/include/grlib/grethgbit-regs.h create mode 100644 bsps/include/grlib/grgpio-regs.h create mode 100644 bsps/include/grlib/griommu-regs.h create mode 100644 bsps/include/grlib/grpci2-regs.h create mode 100644 bsps/include/grlib/grspw2-regs.h create mode 100644 bsps/include/grlib/grspwrouter-regs.h create mode 100644 bsps/include/grlib/irqamp-regs.h create mode 100644 bsps/include/grlib/irqamp.h create mode 100644 bsps/include/grlib/l2cache-regs.h create mode 100644 bsps/include/grlib/l4stat-regs.h create mode 100644 bsps/include/grlib/memscrub-regs.h create mode 100644 bsps/include/grlib/mmctrl-regs.h create mode 100644 bsps/include/grlib/spictrl-regs.h create mode 100644 bsps/include/grlib/spwpnp-regs.h create mode 100644 bsps/include/grlib/spwtdp-regs.h rename bsps/sparc/{leon3/start/bsp_fatal_halt.c => erc32/include/bsp/irqimpl.h} (70%) create mode 100644 bsps/sparc/include/grlib/io.h rename bsps/sparc/{shared/start/bsp_fatal_halt.c => leon2/include/bsp/irqimpl.h} (68%) create mode 100644 bsps/sparc/leon3/include/bsp/gr740-bootstrap-regs.h create mode 100644 bsps/sparc/leon3/include/bsp/gr740-iopll-regs.h create mode 100644 bsps/sparc/leon3/include/bsp/gr740-thsens-regs.h create mode 100644 bsps/sparc/leon3/include/bsp/irqimpl.h create mode 100644 bsps/sparc/leon3/include/bsp/leon3.h create mode 100644 bsps/sparc/leon3/start/gettargethash.c delete mode 100644 spec/build/bsps/sparc/erc32/optpwrdwnhlt.yml delete mode 100644 spec/build/bsps/sparc/leon2/optpwrdwnhlt.yml create mode 100644 spec/build/bsps/sparc/leon3/optapbuartbase.yml create mode 100644 spec/build/bsps/sparc/leon3/optasrupcnt.yml create mode 100644 spec/build/bsps/sparc/leon3/optasrupcntprobe.yml create mode 100644 spec/build/bsps/sparc/leon3/optgptimerbase.yml create mode 100644 spec/build/bsps/sparc/leon3/optirqampbase.yml create mode 100644 spec/build/bsps/sparc/leon3/optirqampextirq.yml create mode 100644 spec/build/bsps/sparc/leon3/optirqampts.yml create mode 100644 spec/build/bsps/sparc/leon3/optl2cachebase.yml create mode 100644 spec/build/bsps/sparc/leon3/optplbfreq.yml delete mode 100644 spec/build/bsps/sparc/leon3/optpwrdwnhlt.yml create mode 100644 spec/build/testsuites/validation/bsps/fatal-sparc-leon3-cache-snooping-disabled-boot.yml create mode 100644 spec/build/testsuites/validation/bsps/fatal-sparc-leon3-cache-snooping-disabled-secondary.yml create mode 100644 spec/build/testsuites/validation/bsps/fatal-sparc-leon3-clock-initialization.yml create mode 100644 spec/build/testsuites/validation/bsps/fatal-sparc-leon3-shutdown.yml create mode 100644 spec/build/testsuites/validation/bsps/objgrlib.yml create mode 100644 spec/build/testsuites/validation/bsps/objsparcgr712rc.yml create mode 100644 spec/build/testsuites/validation/bsps/validation-bsp-0.yml create mode 100644 testsuites/validation/bsps/tc-fatal-sparc-leon3-shutdown.c create mode 100644 testsuites/validation/bsps/tc-sparc-gr712rc.c create mode 100644 testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.c create mode 100644 testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-boot.h create mode 100644 testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.c create mode 100644 testsuites/validation/bsps/tr-fatal-sparc-leon3-cache-snooping-disabled-secondary.h create mode 100644 testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.c create mode 100644 testsuites/validation/bsps/tr-fatal-sparc-leon3-clock-initialization.h create mode 100644 testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-boot.c create mode 100644 testsuites/validation/bsps/ts-fatal-sparc-leon3-cache-snooping-disabled-secondary.c create mode 100644 testsuites/validation/bsps/ts-fatal-sparc-leon3-clock-initialization.c create mode 100644 testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown-response.c create mode 100644 testsuites/validation/bsps/ts-fatal-sparc-leon3-shutdown.c create mode 100644 testsuites/validation/bsps/ts-validation-bsp-0.c create mode 100644 testsuites/validation/tc-dev-grlib-apbuart-inbyte-nonblocking.c create mode 100644 testsuites/validation/tc-dev-grlib-io.c create mode 100644 testsuites/validation/tc-dev-grlib-irqamp-get-timestamp.c -- 2.35.3 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel