[rtems-central commit] spec: Specify some fatal errors
Sebastian Huber
sebh at rtems.org
Tue Aug 3 08:37:35 UTC 2021
Module: rtems-central
Branch: master
Commit: c6d847e22d3ca95340cb1badaf36c5f6722f58bf
Changeset: http://git.rtems.org/rtems-central/commit/?id=c6d847e22d3ca95340cb1badaf36c5f6722f58bf
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Jul 30 11:32:00 2021 +0200
spec: Specify some fatal errors
---
config.yml | 10 +-
spec/acfg/req/fatal-init-task-construct-failed.yml | 20 ++
spec/acfg/req/fatal-too-large-tls-size.yml | 21 ++
spec/acfg/val/fatal-init-task-construct-failed.yml | 64 +++++
spec/acfg/val/fatal-too-large-tls-size.yml | 73 ++++++
spec/bsp/if/boot-card.yml | 2 +
spec/bsp/if/fatal-extension-header.yml | 15 ++
spec/bsp/if/fatal-extension.yml | 14 +
spec/bsp/if/fatal-header.yml | 17 ++
spec/bsp/if/fatal-leon3-clock-initialization.yml | 14 +
...l-leon3-invalid-cache-config-boot-processor.yml | 14 +
...n3-invalid-cache-config-secondary-processor.yml | 14 +
spec/bsp/if/group-fatal.yml | 16 ++
spec/bsp/if/group-interrupt.yml | 16 ++
spec/bsp/if/group-shared.yml | 16 ++
spec/bsp/if/group-startup.yml | 16 ++
spec/bsp/if/group.yml | 17 ++
spec/bsp/if/header-2.yml | 2 +
spec/bsp/if/header.yml | 2 +
spec/bsp/if/interrupt-spurious.yml | 2 +
.../req/fatal-cache-snooping-disabled-boot.yml | 17 ++
.../fatal-cache-snooping-disabled-secondary.yml | 18 ++
.../sparc/leon3/req/fatal-clock-initialization.yml | 16 ++
spec/bsp/sparc/leon3/req/fatal-halt.yml | 16 ++
.../bsp/sparc/leon3/req/fatal-shutdown-request.yml | 20 ++
.../sparc/leon3/req/fatal-shutdown-response.yml | 19 ++
spec/bsp/sparc/leon3/req/fatal-shutdown-self.yml | 20 ++
.../bsp/sparc/leon3/req/fatal-shutdown-timeout.yml | 21 ++
.../val/fatal-cache-snooping-disabled-boot.yml | 80 ++++++
.../fatal-cache-snooping-disabled-secondary.yml | 80 ++++++
.../sparc/leon3/val/fatal-clock-initialization.yml | 95 +++++++
.../sparc/leon3/val/fatal-shutdown-response.yml | 91 +++++++
.../bsp/sparc/leon3/val/fatal-shutdown-timeout.yml | 92 +++++++
spec/req/fatal-error.yml | 14 +
spec/req/terminate.yml | 14 +
spec/score/cpu/if/fatal-halt.yml | 12 +
spec/score/cpu/if/group.yml | 16 ++
spec/score/cpu/if/header-impl.yml | 13 +
spec/score/cpu/req/fatal-halt.yml | 17 ++
spec/score/{req => if}/group.yml | 4 +-
.../score/interr/if/init-task-construct-failed.yml | 13 +
spec/score/interr/if/source-bsp.yml | 12 +
spec/score/interr/if/source-smp.yml | 12 +
spec/score/interr/if/thread-exitted.yml | 13 +
spec/score/interr/if/thread-queue-deadlock.yml | 13 +
spec/score/interr/if/too-large-tls-size.yml | 13 +
spec/score/mtx/{req => if}/group.yml | 2 +-
spec/score/mtx/req/seize-try.yml | 2 +-
spec/score/mtx/req/seize-wait.yml | 2 +-
spec/score/object/if/group.yml | 16 ++
spec/score/object/req/allocator-mutex.yml | 15 ++
.../object/req/fatal-allocator-mutex-deadlock.yml | 19 ++
spec/score/sem/{req => if}/group.yml | 2 +-
spec/score/sem/req/seize-try.yml | 2 +-
spec/score/sem/req/seize-wait.yml | 2 +-
spec/score/smp/if/fatal-shutdown-response.yml | 12 +
spec/score/smp/if/header-impl.yml | 14 +
spec/score/thread/if/group.yml | 15 ++
.../fatal-bad-thread-dispatch-disable-level.yml | 17 ++
.../req/fatal-bad-thread-dispatch-environment.yml | 23 ++
spec/score/thread/req/fatal-thread-exitted.yml | 17 ++
.../thread/req/thread-dispatch-isr-disabled.yml | 22 ++
spec/score/tq/{req => if}/group.yml | 2 +-
spec/score/tq/req/enqueue-ceiling.yml | 2 +-
spec/score/tq/req/enqueue-deadlock.yml | 2 +-
spec/score/tq/req/enqueue-fifo.yml | 2 +-
spec/score/tq/req/enqueue-mrsp.yml | 2 +-
spec/score/tq/req/enqueue-priority.yml | 2 +-
spec/score/val/fatal.yml | 291 +++++++++++++++++++++
...sp-sparc-leon3-cache-snooping-disabled-boot.yml | 25 ++
...arc-leon3-cache-snooping-disabled-secondary.yml | 28 ++
.../fatal-bsp-sparc-leon3-clock-initialization.yml | 25 ++
.../fatal-bsp-sparc-leon3-shutdown-nop.yml | 64 +++++
.../fatal-bsp-sparc-leon3-shutdown-response.yml | 30 +++
.../fatal-bsp-sparc-leon3-shutdown-timeout.yml | 30 +++
.../fatal-init-task-construct-failed.yml | 43 +++
spec/testsuites/fatal-too-large-tls-size.yml | 30 +++
77 files changed, 1853 insertions(+), 23 deletions(-)
diff --git a/config.yml b/config.yml
index 36e0faa..ae9a9f9 100644
--- a/config.yml
+++ b/config.yml
@@ -36,19 +36,11 @@ build:
- gccdeps.py
- long_gcc.py
- testsuites/validation/tc-basedefs-pendant.h
- - testsuites/validation/tr-event-constant.h
- - testsuites/validation/tr-event-send-receive.h
- - testsuites/validation/tr-io-kernel.h
- testsuites/validation/tr-model-chains-api.h
- testsuites/validation/tr-model-events-mgr.h
- - testsuites/validation/tr-object-ident.h
- - testsuites/validation/tr-object-ident-local.h
- - testsuites/validation/tr-sem-seize-try.h
- - testsuites/validation/tr-sem-seize-wait.h
- - testsuites/validation/tr-tq-enqueue-fifo.h
- - testsuites/validation/tr-tq-enqueue-priority.h
- testsuites/validation/ts-config.h
- testsuites/validation/ts-default.h
+ - testsuites/validation/ts-fatal-sysinit.h
- testsuites/validation/tx-support.h
- testsuites/validation/tx-thread-queue.h
- waf
diff --git a/spec/acfg/req/fatal-init-task-construct-failed.yml b/spec/acfg/req/fatal-init-task-construct-failed.yml
new file mode 100644
index 0000000..4c7fcfe
--- /dev/null
+++ b/spec/acfg/req/fatal-init-task-construct-failed.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+- role: requirement-refinement
+ uid: init-task-construct-storage-size
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ Where the application was configured to construct the RTEMS initialization
+ task using ${../if/init-task-construct-storage-size:/name}, while the system
+ is initialized, if the task construction fails, then the system shall
+ terminate with the ${/score/interr/if/internal-error-core:/name} fatal source
+ and the ${/score/interr/if/init-task-construct-failed:/name} fatal code.
+type: requirement
diff --git a/spec/acfg/req/fatal-too-large-tls-size.yml b/spec/acfg/req/fatal-too-large-tls-size.yml
new file mode 100644
index 0000000..b5eefc0
--- /dev/null
+++ b/spec/acfg/req/fatal-too-large-tls-size.yml
@@ -0,0 +1,21 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+- role: requirement-refinement
+ uid: max-thread-local-storage-size
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ Where the application was configured with a value not equal to zero for
+ ${../if/max-thread-local-storage-size:/name}, while the system is
+ initialized, if the actual thread-local storage size of the application is
+ greater than the configure maximum size, then the system shall terminate with
+ the ${/score/interr/if/internal-error-core:/name} fatal source and the
+ ${/score/interr/if/too-large-tls-size:/name} fatal code.
+type: requirement
diff --git a/spec/acfg/val/fatal-init-task-construct-failed.yml b/spec/acfg/val/fatal-init-task-construct-failed.yml
new file mode 100644
index 0000000..6b69bfb
--- /dev/null
+++ b/spec/acfg/val/fatal-init-task-construct-failed.yml
@@ -0,0 +1,64 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+ The test action is carried out by configuring an invalid task priority used
+ to construct the initialization task.
+ action-code: |
+ /* Nothing to do */
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, INTERNAL_ERROR_CORE );
+ links:
+ - role: validation
+ uid: ../req/fatal-init-task-construct-failed
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong(
+ ${step},
+ ctx->code,
+ INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED
+ );
+ links:
+ - role: validation
+ uid: ../req/fatal-init-task-construct-failed
+ links: []
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-init-task-construct-failed.h
+test-includes:
+- rtems.h
+test-local-includes:
+- tr-fatal-init-task-construct-failed.h
+test-setup: null
+test-stop: null
+test-support: null
+test-target: testsuites/validation/tr-fatal-init-task-construct-failed.c
+test-teardown: null
+type: test-case
diff --git a/spec/acfg/val/fatal-too-large-tls-size.yml b/spec/acfg/val/fatal-too-large-tls-size.yml
new file mode 100644
index 0000000..00f07a1
--- /dev/null
+++ b/spec/acfg/val/fatal-too-large-tls-size.yml
@@ -0,0 +1,73 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+ The test action is carried out by providing a thread-local storage object
+ of sufficient size with respect to the application configuration of the
+ test suite.
+ action-code: |
+ if ( shall_not_load_the_value ) {
+ uint8_t value;
+
+ value = large_tls_object[ 0 ];
+ RTEMS_OBFUSCATE_VARIABLE( value );
+ }
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, INTERNAL_ERROR_CORE );
+ links:
+ - role: validation
+ uid: ../req/fatal-too-large-tls-size
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong(
+ ${step},
+ ctx->code,
+ INTERNAL_ERROR_TOO_LARGE_TLS_SIZE
+ );
+ links:
+ - role: validation
+ uid: ../req/fatal-too-large-tls-size
+ links: []
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-too-large-tls-size.h
+test-includes:
+- rtems.h
+test-local-includes:
+- tr-fatal-too-large-tls-size.h
+test-setup: null
+test-stop: null
+test-support: |
+ static volatile _Thread_local uint8_t large_tls_object[ RTEMS_TASK_STORAGE_ALIGNMENT + 1 ];
+
+ static volatile bool shall_not_load_the_value;
+test-target: testsuites/validation/tr-fatal-too-large-tls-size.c
+test-teardown: null
+type: test-case
diff --git a/spec/bsp/if/boot-card.yml b/spec/bsp/if/boot-card.yml
index 711da4c..0d46e9b 100644
--- a/spec/bsp/if/boot-card.yml
+++ b/spec/bsp/if/boot-card.yml
@@ -7,6 +7,8 @@ interface-type: unspecified-function
links:
- role: interface-placement
uid: header
+- role: interface-ingroup
+ uid: group-startup
name: boot_card
references: {}
type: interface
diff --git a/spec/bsp/if/fatal-extension-header.yml b/spec/bsp/if/fatal-extension-header.yml
new file mode 100644
index 0000000..79067e0
--- /dev/null
+++ b/spec/bsp/if/fatal-extension-header.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: This header file defines interfaces to boot the system.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: header-file
+links:
+- role: interface-placement
+ uid: domain
+- role: interface-ingroup
+ uid: group-fatal
+path: bsp/default-fatal-extension.h
+prefix: bsps/include
+type: interface
diff --git a/spec/bsp/if/fatal-extension.yml b/spec/bsp/if/fatal-extension.yml
new file mode 100644
index 0000000..c6c6f08
--- /dev/null
+++ b/spec/bsp/if/fatal-extension.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-function
+links:
+- role: interface-placement
+ uid: fatal-extension-header
+- role: interface-ingroup
+ uid: group-fatal
+name: bsp_fatal_extension
+references: {}
+type: interface
diff --git a/spec/bsp/if/fatal-header.yml b/spec/bsp/if/fatal-header.yml
new file mode 100644
index 0000000..48b6289
--- /dev/null
+++ b/spec/bsp/if/fatal-header.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+ This header file provides interfaces to indicate fatal errors occurred in the
+ ${/glossary/bsp:/term} domain.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: header-file
+links:
+- role: interface-placement
+ uid: domain
+- role: interface-ingroup
+ uid: group-fatal
+path: bsp/fatal.h
+prefix: bsps/include
+type: interface
diff --git a/spec/bsp/if/fatal-leon3-clock-initialization.yml b/spec/bsp/if/fatal-leon3-clock-initialization.yml
new file mode 100644
index 0000000..8d2a39a
--- /dev/null
+++ b/spec/bsp/if/fatal-leon3-clock-initialization.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: fatal-header
+- role: interface-ingroup
+ uid: group-fatal
+name: LEON3_FATAL_CLOCK_INITIALIZATION
+references: {}
+type: interface
diff --git a/spec/bsp/if/fatal-leon3-invalid-cache-config-boot-processor.yml b/spec/bsp/if/fatal-leon3-invalid-cache-config-boot-processor.yml
new file mode 100644
index 0000000..60483cc
--- /dev/null
+++ b/spec/bsp/if/fatal-leon3-invalid-cache-config-boot-processor.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: group-fatal
+name: LEON3_FATAL_INVALID_CACHE_CONFIG_BOOT_PROCESSOR
+references: {}
+type: interface
diff --git a/spec/bsp/if/fatal-leon3-invalid-cache-config-secondary-processor.yml b/spec/bsp/if/fatal-leon3-invalid-cache-config-secondary-processor.yml
new file mode 100644
index 0000000..adfb435
--- /dev/null
+++ b/spec/bsp/if/fatal-leon3-invalid-cache-config-secondary-processor.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: fatal-header
+- role: interface-ingroup
+ uid: group-fatal
+name: LEON3_FATAL_INVALID_CACHE_CONFIG_SECONDARY_PROCESSOR
+references: {}
+type: interface
diff --git a/spec/bsp/if/group-fatal.yml b/spec/bsp/if/group-fatal.yml
new file mode 100644
index 0000000..392e906
--- /dev/null
+++ b/spec/bsp/if/group-fatal.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSBSPsFatal
+links:
+- role: interface-ingroup
+ uid: group-shared
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The fatal ${/glossary/bsp:/term} support shall be a component containing
+ functions used to indicate ${/glossary/target:/term}-specific fatal errors.
+type: requirement
diff --git a/spec/bsp/if/group-interrupt.yml b/spec/bsp/if/group-interrupt.yml
new file mode 100644
index 0000000..acd2486
--- /dev/null
+++ b/spec/bsp/if/group-interrupt.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: bsp_interrupt
+links:
+- role: interface-ingroup
+ uid: group-shared
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The shared ${/glossary/bsp:/term} interrupt support shall be a component
+ containing functions used to manage and process interrupts.
+type: requirement
diff --git a/spec/bsp/if/group-shared.yml b/spec/bsp/if/group-shared.yml
new file mode 100644
index 0000000..d803654
--- /dev/null
+++ b/spec/bsp/if/group-shared.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSBSPsShared
+links:
+- role: interface-ingroup
+ uid: group
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The shared ${/glossary/bsp:/term} support shall be a component containing
+ functions used by multiple ${/glossary/target:/plural}.
+type: requirement
diff --git a/spec/bsp/if/group-startup.yml b/spec/bsp/if/group-startup.yml
new file mode 100644
index 0000000..f2d4447
--- /dev/null
+++ b/spec/bsp/if/group-startup.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSBSPsSharedStartup
+links:
+- role: interface-ingroup
+ uid: group-shared
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The shared ${/glossary/bsp:/term} startup support shall be a component
+ containing functions used to initialize the system.
+type: requirement
diff --git a/spec/bsp/if/group.yml b/spec/bsp/if/group.yml
new file mode 100644
index 0000000..3d6250c
--- /dev/null
+++ b/spec/bsp/if/group.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSBSPs
+links:
+- role: requirement-refinement
+ uid: /req/root
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The ${/glossary/bsp:/plural} shall be a software architecture component
+ containing the implementation specific to ${/glossary/target:/plural} and
+ ${/glossary/device:/plural}.
+type: requirement
diff --git a/spec/bsp/if/header-2.yml b/spec/bsp/if/header-2.yml
index 01c694e..dacb74d 100644
--- a/spec/bsp/if/header-2.yml
+++ b/spec/bsp/if/header-2.yml
@@ -10,6 +10,8 @@ interface-type: header-file
links:
- role: interface-placement
uid: domain
+- role: interface-ingroup
+ uid: group-interrupt
path: bsp/irq-generic.h
prefix: bsps/include
type: interface
diff --git a/spec/bsp/if/header.yml b/spec/bsp/if/header.yml
index b810985..beb2d31 100644
--- a/spec/bsp/if/header.yml
+++ b/spec/bsp/if/header.yml
@@ -8,6 +8,8 @@ interface-type: header-file
links:
- role: interface-placement
uid: domain
+- role: interface-ingroup
+ uid: group-startup
path: bsp/bootcard.h
prefix: bsps/include
type: interface
diff --git a/spec/bsp/if/interrupt-spurious.yml b/spec/bsp/if/interrupt-spurious.yml
index ecce58b..98ee692 100644
--- a/spec/bsp/if/interrupt-spurious.yml
+++ b/spec/bsp/if/interrupt-spurious.yml
@@ -7,6 +7,8 @@ interface-type: unspecified-function
links:
- role: interface-placement
uid: header-2
+- role: interface-ingroup
+ uid: group-interrupt
name: bsp_interrupt_spurious
references: {}
type: interface
diff --git a/spec/bsp/sparc/leon3/req/fatal-cache-snooping-disabled-boot.yml b/spec/bsp/sparc/leon3/req/fatal-cache-snooping-disabled-boot.yml
new file mode 100644
index 0000000..2c734ee
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-cache-snooping-disabled-boot.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the system is initialized, if the data cache snooping is disabled on
+ the boot processor, then the system shall terminate with the
+ ${/score/interr/if/source-bsp:/name} fatal source and the
+ ${/bsp/if/fatal-leon3-invalid-cache-config-boot-processor:/name} fatal code.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-cache-snooping-disabled-secondary.yml b/spec/bsp/sparc/leon3/req/fatal-cache-snooping-disabled-secondary.yml
new file mode 100644
index 0000000..a15bf1f
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-cache-snooping-disabled-secondary.yml
@@ -0,0 +1,18 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the system is initialized, if the data cache snooping is disabled on a
+ secondary processor, then the system shall terminate with the
+ ${/score/interr/if/source-bsp:/name} fatal source and the
+ ${/bsp/if/fatal-leon3-invalid-cache-config-secondary-processor:/name} fatal
+ code.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-clock-initialization.yml b/spec/bsp/sparc/leon3/req/fatal-clock-initialization.yml
new file mode 100644
index 0000000..48f7839
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-clock-initialization.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ If the installation of the clock interrupt entry fails, then the system shall
+ terminate with the ${/score/interr/if/source-bsp:/name} fatal source and the
+ ${/bsp/if/fatal-leon3-clock-initialization:/name} fatal code.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-halt.yml b/spec/bsp/sparc/leon3/req/fatal-halt.yml
new file mode 100644
index 0000000..c5e755e
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-halt.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /score/cpu/req/fatal-halt
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ The ${/score/cpu/if/fatal-halt:/name} directive shall cause a system error
+ halt with the primary exit code set to the fatal source and the secondary
+ exit code set to the fatal code.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-shutdown-request.yml b/spec/bsp/sparc/leon3/req/fatal-shutdown-request.yml
new file mode 100644
index 0000000..e989c97
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-shutdown-request.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: interface-function
+ uid: /bsp/if/fatal-extension
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the fatal source is not ${/score/interr/if/source-smp:/name} or the
+ fatal code is not ${/score/smp/if/fatal-shutdown-response:/name}, the
+ ${/bsp/if/fatal-extension:/name} directive shall request all other configured
+ and present processors to power down.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-shutdown-response.yml b/spec/bsp/sparc/leon3/req/fatal-shutdown-response.yml
new file mode 100644
index 0000000..d464454
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-shutdown-response.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: interface-function
+ uid: /bsp/if/fatal-extension
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the fatal source is ${/score/interr/if/source-smp:/name}, while the
+ fatal code is ${/score/smp/if/fatal-shutdown-response:/name}, the
+ ${/bsp/if/fatal-extension:/name} directive shall power down the processor.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-shutdown-self.yml b/spec/bsp/sparc/leon3/req/fatal-shutdown-self.yml
new file mode 100644
index 0000000..05da373
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-shutdown-self.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: interface-function
+ uid: /bsp/if/fatal-extension
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the fatal source is not ${/score/interr/if/source-smp:/name} or the
+ fatal code is not ${/score/smp/if/fatal-shutdown-response:/name}, while all
+ shutdown requests responded or a timeout occurred, the
+ ${/bsp/if/fatal-extension:/name} directive shall halt the processor.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/req/fatal-shutdown-timeout.yml b/spec/bsp/sparc/leon3/req/fatal-shutdown-timeout.yml
new file mode 100644
index 0000000..7c55f52
--- /dev/null
+++ b/spec/bsp/sparc/leon3/req/fatal-shutdown-timeout.yml
@@ -0,0 +1,21 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: interface-function
+ uid: /bsp/if/fatal-extension
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the fatal source is not ${/score/interr/if/source-smp:/name} or the
+ fatal code is not ${/score/smp/if/fatal-shutdown-response:/name}, while all
+ shutdown requests were issued, the ${/bsp/if/fatal-extension:/name} directive
+ shall wait for at most approximately one millisecond for the power down
+ response of all other configured and present processors.
+type: requirement
diff --git a/spec/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot.yml b/spec/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot.yml
new file mode 100644
index 0000000..093028d
--- /dev/null
+++ b/spec/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-boot.yml
@@ -0,0 +1,80 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links: []
+test-actions:
+- action-brief: |
+ The test action is carried out by the DisableCacheSnooping() system
+ initialization handler.
+ action-code: |
+ /* Nothing to do */
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+ links:
+ - role: validation
+ uid: ../req/fatal-cache-snooping-disabled-boot
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong(
+ ${step},
+ ctx->code,
+ LEON3_FATAL_INVALID_CACHE_CONFIG_BOOT_PROCESSOR
+ );
+ links:
+ - role: validation
+ uid: ../req/fatal-cache-snooping-disabled-boot
+ links: []
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h
+test-includes:
+- rtems/sysinit.h
+- bsp/fatal.h
+- bsp/leon3.h
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h
+test-setup: null
+test-stop: null
+test-support: |
+ static void DisableCacheSnooping( void )
+ {
+ uint32_t control;
+
+ control = leon3_get_cache_control_register();
+ control &= ~LEON3_REG_CACHE_CTRL_DS;
+ leon3_set_cache_control_register( control );
+ }
+
+ RTEMS_SYSINIT_ITEM(
+ DisableCacheSnooping,
+ RTEMS_SYSINIT_BSP_EARLY,
+ RTEMS_SYSINIT_ORDER_FIRST
+ );
+test-target: testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c
+test-teardown: null
+type: test-case
diff --git a/spec/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary.yml b/spec/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary.yml
new file mode 100644
index 0000000..cc611b2
--- /dev/null
+++ b/spec/bsp/sparc/leon3/val/fatal-cache-snooping-disabled-secondary.yml
@@ -0,0 +1,80 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links: []
+test-actions:
+- action-brief: |
+ The test action is carried out by the wrapped
+ bsp_start_on_secondary_processor() function.
+ action-code: |
+ /* Nothing to do */
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+ links:
+ - role: validation
+ uid: ../req/fatal-cache-snooping-disabled-secondary
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong(
+ ${step},
+ ctx->code,
+ LEON3_FATAL_INVALID_CACHE_CONFIG_SECONDARY_PROCESSOR
+ );
+ links:
+ - role: validation
+ uid: ../req/fatal-cache-snooping-disabled-secondary
+ links: []
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h
+test-includes:
+- bsp/bootcard.h
+- bsp/fatal.h
+- bsp/leon3.h
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h
+test-setup: null
+test-stop: null
+test-support: |
+ void __real_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self );
+
+ void __wrap_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self );
+
+ void __wrap_bsp_start_on_secondary_processor( struct Per_CPU_Control *cpu_self )
+ {
+ uint32_t control;
+
+ control = leon3_get_cache_control_register();
+ control &= ~LEON3_REG_CACHE_CTRL_DS;
+ leon3_set_cache_control_register( control );
+
+ __real_bsp_start_on_secondary_processor( cpu_self );
+ }
+test-target: testsuites/validation/tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c
+test-teardown: null
+type: test-case
diff --git a/spec/bsp/sparc/leon3/val/fatal-clock-initialization.yml b/spec/bsp/sparc/leon3/val/fatal-clock-initialization.yml
new file mode 100644
index 0000000..5890f6b
--- /dev/null
+++ b/spec/bsp/sparc/leon3/val/fatal-clock-initialization.yml
@@ -0,0 +1,95 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links: []
+test-actions:
+- action-brief: |
+ The test action is carried out by the OccupyClockInterrupt() system
+ initialization handler.
+ action-code: |
+ /* Nothing to do */
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, RTEMS_FATAL_SOURCE_BSP );
+ links:
+ - role: validation
+ uid: ../req/fatal-clock-initialization
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong(
+ ${step},
+ ctx->code,
+ LEON3_FATAL_CLOCK_INITIALIZATION
+ );
+ links:
+ - role: validation
+ uid: ../req/fatal-clock-initialization
+ links: []
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.h
+test-includes:
+- rtems/irq-extension.h
+- rtems/sysinit.h
+- bsp/fatal.h
+- bsp/leon3.h
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-clock-initialization.h
+test-setup: null
+test-stop: null
+test-support: |
+ static void ClockInterrupt( void *arg )
+ {
+ (void) arg;
+ }
+
+ static rtems_interrupt_entry interrupt_entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER(
+ ClockInterrupt,
+ NULL,
+ "Clock"
+ );
+
+ static void OccupyClockInterrupt( void )
+ {
+ rtems_vector_number vector;
+
+ vector = GPTIMER_CONFIG_IRQ_GET( grlib_load_32( &LEON3_Timer_Regs->config ) );
+ (void) rtems_interrupt_entry_install(
+ vector,
+ RTEMS_INTERRUPT_UNIQUE,
+ &interrupt_entry
+ );
+ }
+
+ RTEMS_SYSINIT_ITEM(
+ OccupyClockInterrupt,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_FIRST
+ );
+test-target: testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c
+test-teardown: null
+type: test-case
diff --git a/spec/bsp/sparc/leon3/val/fatal-shutdown-response.yml b/spec/bsp/sparc/leon3/val/fatal-shutdown-response.yml
new file mode 100644
index 0000000..11d9e75
--- /dev/null
+++ b/spec/bsp/sparc/leon3/val/fatal-shutdown-response.yml
@@ -0,0 +1,91 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links: []
+test-actions:
+- action-brief: |
+ Request an SMP shutdown on the second processor and wait for a power down
+ of this processor.
+ action-code: |
+ irqamp *regs;
+ uint32_t mpstat;
+
+ regs = LEON3_IrqCtrl_Regs;
+ mpstat = grlib_load_32( ®s->mpstat );
+ _SMP_Request_shutdown();
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, RTEMS_FATAL_SOURCE_APPLICATION );
+ links: []
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong( ${step}, ctx->code, 123456 );
+ links: []
+ - brief: |
+ Check that the second processor was not powered down before the shutdown
+ request.
+ code: |
+ T_step_eq_u32( ${step}, mpstat & 0x2U, 0 );
+ links: []
+ - brief: |
+ Wait until the second processor is powered down.
+ code: |
+ while ( ( grlib_load_32( ®s->mpstat ) & 0x2U ) != 0x2U ) {
+ /* Wait */
+ }
+ links:
+ - role: validation
+ uid: ../req/fatal-shutdown-response
+ links: []
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.h
+test-includes:
+- rtems/sysinit.h
+- rtems/score/smpimpl.h
+- bsp/leon3.h
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-shutdown-response.h
+test-setup: null
+test-stop: null
+test-support: |
+ static void TriggerTestCase( void )
+ {
+ rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123456 );
+ }
+
+ RTEMS_SYSINIT_ITEM(
+ TriggerTestCase,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+ );
+test-target: testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-response.c
+test-teardown: null
+type: test-case
diff --git a/spec/bsp/sparc/leon3/val/fatal-shutdown-timeout.yml b/spec/bsp/sparc/leon3/val/fatal-shutdown-timeout.yml
new file mode 100644
index 0000000..ee69df7
--- /dev/null
+++ b/spec/bsp/sparc/leon3/val/fatal-shutdown-timeout.yml
@@ -0,0 +1,92 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links: []
+test-actions:
+- action-brief: |
+ Request the second processor to wait in an infinite loop with maskable
+ interrupts disabled. The test suite will only finish execution if
+ bsp_fatal_extension() halts the processor after a shutdown request timeout.
+ action-code: |
+ _Per_CPU_Submit_job( _Per_CPU_Get_by_index( 1 ), &idle_job );
+ checks:
+ - brief: |
+ Check that the expected fatal source is present.
+ code: |
+ T_step_eq_int( ${step}, ctx->source, RTEMS_FATAL_SOURCE_APPLICATION );
+ links: []
+ - brief: |
+ Check that the expected fatal code is present.
+ code: |
+ T_step_eq_ulong( ${step}, ctx->code, 123456 );
+ links: []
+ links:
+ - role: validation
+ uid: ../req/fatal-shutdown-request
+ - role: validation
+ uid: ../req/fatal-shutdown-self
+ - role: validation
+ uid: ../req/fatal-shutdown-timeout
+test-brief: |
+ Tests a fatal error.
+test-context: []
+test-context-support: null
+test-description: null
+test-header:
+ code: null
+ freestanding: true
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is fatal source.
+ dir: null
+ name: source
+ specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
+ - description: |
+ is fatal code.
+ dir: null
+ name: code
+ specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
+ target: testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.h
+test-includes:
+- rtems/sysinit.h
+- rtems/score/percpu.h
+- bsp/leon3.h
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-shutdown-timeout.h
+test-setup: null
+test-stop: null
+test-support: |
+ static void IdleHandler( void *arg )
+ {
+ (void) arg;
+ (void) _CPU_Thread_Idle_body( 0 );
+ }
+
+ static const Per_CPU_Job_context idle_context = {
+ .handler = IdleHandler
+ };
+
+ static Per_CPU_Job idle_job = {
+ .context = &idle_context
+ };
+
+ static void TriggerTestCase( void )
+ {
+ rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123456 );
+ }
+
+ RTEMS_SYSINIT_ITEM(
+ TriggerTestCase,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+ );
+test-target: testsuites/validation/tr-fatal-bsp-sparc-leon3-shutdown-timeout.c
+test-teardown: null
+type: test-case
diff --git a/spec/req/fatal-error.yml b/spec/req/fatal-error.yml
new file mode 100644
index 0000000..b8a8db5
--- /dev/null
+++ b/spec/req/fatal-error.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: terminate
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ If the system detects a fatal error, then it shall terminate the system.
+type: requirement
diff --git a/spec/req/terminate.yml b/spec/req/terminate.yml
new file mode 100644
index 0000000..c756252
--- /dev/null
+++ b/spec/req/terminate.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: root
+non-functional-type: design
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The system shall have a procedure to terminate the system.
+type: requirement
diff --git a/spec/score/cpu/if/fatal-halt.yml b/spec/score/cpu/if/fatal-halt.yml
new file mode 100644
index 0000000..039c34e
--- /dev/null
+++ b/spec/score/cpu/if/fatal-halt.yml
@@ -0,0 +1,12 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified
+links:
+- role: interface-placement
+ uid: header-impl
+name: _CPU_Fatal_halt
+references: {}
+type: interface
diff --git a/spec/score/cpu/if/group.yml b/spec/score/cpu/if/group.yml
new file mode 100644
index 0000000..42db2e9
--- /dev/null
+++ b/spec/score/cpu/if/group.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSScoreCPU
+links:
+- role: interface-ingroup
+ uid: ../../if/group
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The super core shall have a component containing the implementation specific
+ to the ${/glossary/target-arch:/term} and ${/glossary/target:/term}.
+type: requirement
diff --git a/spec/score/cpu/if/header-impl.yml b/spec/score/cpu/if/header-impl.yml
new file mode 100644
index 0000000..7fcbd11
--- /dev/null
+++ b/spec/score/cpu/if/header-impl.yml
@@ -0,0 +1,13 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: This header file defines interfaces of the CPU port.
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: header-file
+links:
+- role: interface-placement
+ uid: ../../if/domain
+path: rtems/score/cpuimpl.h
+prefix: cpukit/include
+type: interface
diff --git a/spec/score/cpu/req/fatal-halt.yml b/spec/score/cpu/req/fatal-halt.yml
new file mode 100644
index 0000000..8913923
--- /dev/null
+++ b/spec/score/cpu/req/fatal-halt.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: ../if/group
+- role: interface-function
+ uid: ../if/fatal-halt
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ The ${../if/fatal-halt:/name} function shall halt or reset the
+ ${/glossary/target:/term}.
+type: requirement
diff --git a/spec/score/req/group.yml b/spec/score/if/group.yml
similarity index 71%
rename from spec/score/req/group.yml
rename to spec/score/if/group.yml
index 4dca0df..3c46947 100644
--- a/spec/score/req/group.yml
+++ b/spec/score/if/group.yml
@@ -11,6 +11,6 @@ rationale: null
references: []
requirement-type: non-functional
text: |
- The software architecture shall have a component named super core containing
- the implementation used by multiple ${/glossary/api:/plural}.
+ The super core shall be a software architecture component containing the
+ implementation used by multiple ${/glossary/api:/plural}.
type: requirement
diff --git a/spec/score/interr/if/init-task-construct-failed.yml b/spec/score/interr/if/init-task-construct-failed.yml
new file mode 100644
index 0000000..0914d1f
--- /dev/null
+++ b/spec/score/interr/if/init-task-construct-failed.yml
@@ -0,0 +1,13 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+name: INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED
+references:
+ c-user: internal_errors
+type: interface
diff --git a/spec/score/interr/if/source-bsp.yml b/spec/score/interr/if/source-bsp.yml
new file mode 100644
index 0000000..58ea7d6
--- /dev/null
+++ b/spec/score/interr/if/source-bsp.yml
@@ -0,0 +1,12 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+name: RTEMS_FATAL_SOURCE_BSP
+references: {}
+type: interface
diff --git a/spec/score/interr/if/source-smp.yml b/spec/score/interr/if/source-smp.yml
new file mode 100644
index 0000000..1ee4fdb
--- /dev/null
+++ b/spec/score/interr/if/source-smp.yml
@@ -0,0 +1,12 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+name: RTEMS_FATAL_SOURCE_SMP
+references: {}
+type: interface
diff --git a/spec/score/interr/if/thread-exitted.yml b/spec/score/interr/if/thread-exitted.yml
new file mode 100644
index 0000000..3384a7c
--- /dev/null
+++ b/spec/score/interr/if/thread-exitted.yml
@@ -0,0 +1,13 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+name: INTERNAL_ERROR_THREAD_EXITTED
+references:
+ c-user: internal_errors
+type: interface
diff --git a/spec/score/interr/if/thread-queue-deadlock.yml b/spec/score/interr/if/thread-queue-deadlock.yml
new file mode 100644
index 0000000..131db25
--- /dev/null
+++ b/spec/score/interr/if/thread-queue-deadlock.yml
@@ -0,0 +1,13 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+name: INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
+references:
+ c-user: internal_errors
+type: interface
diff --git a/spec/score/interr/if/too-large-tls-size.yml b/spec/score/interr/if/too-large-tls-size.yml
new file mode 100644
index 0000000..9d46006
--- /dev/null
+++ b/spec/score/interr/if/too-large-tls-size.yml
@@ -0,0 +1,13 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header
+name: INTERNAL_ERROR_TOO_LARGE_TLS_SIZE
+references:
+ c-user: internal_errors
+type: interface
diff --git a/spec/score/mtx/req/group.yml b/spec/score/mtx/if/group.yml
similarity index 95%
rename from spec/score/mtx/req/group.yml
rename to spec/score/mtx/if/group.yml
index 3e79587..8a6289d 100644
--- a/spec/score/mtx/req/group.yml
+++ b/spec/score/mtx/if/group.yml
@@ -5,7 +5,7 @@ enabled-by: true
identifier: RTEMSScoreMutex
links:
- role: interface-ingroup
- uid: ../../req/group
+ uid: ../../if/group
non-functional-type: design-group
rationale: null
references: []
diff --git a/spec/score/mtx/req/seize-try.yml b/spec/score/mtx/req/seize-try.yml
index 18ada09..aaee66a 100644
--- a/spec/score/mtx/req/seize-try.yml
+++ b/spec/score/mtx/req/seize-try.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Status
states:
diff --git a/spec/score/mtx/req/seize-wait.yml b/spec/score/mtx/req/seize-wait.yml
index 6d3396f..8de6df6 100644
--- a/spec/score/mtx/req/seize-wait.yml
+++ b/spec/score/mtx/req/seize-wait.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Status
states:
diff --git a/spec/score/object/if/group.yml b/spec/score/object/if/group.yml
new file mode 100644
index 0000000..7901c92
--- /dev/null
+++ b/spec/score/object/if/group.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSScoreThreadQueue
+links:
+- role: interface-ingroup
+ uid: ../../if/group
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The super core shall have a component containing the object services
+ implementation.
+type: requirement
diff --git a/spec/score/object/req/allocator-mutex.yml b/spec/score/object/req/allocator-mutex.yml
new file mode 100644
index 0000000..f39f2dd
--- /dev/null
+++ b/spec/score/object/req/allocator-mutex.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: ../if/group
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ The object services shall use a mutex to protect the object allocation and
+ deallocation.
+type: requirement
diff --git a/spec/score/object/req/fatal-allocator-mutex-deadlock.yml b/spec/score/object/req/fatal-allocator-mutex-deadlock.yml
new file mode 100644
index 0000000..2030488
--- /dev/null
+++ b/spec/score/object/req/fatal-allocator-mutex-deadlock.yml
@@ -0,0 +1,19 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+- role: requirement-refinement
+ uid: allocator-mutex
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ If obtaining the object allocator mutex would result in a deadlock, then the
+ system shall terminate with the ${/score/interr/if/internal-error-core:/name}
+ fatal source and the ${/score/interr/if/thread-queue-deadlock:/name} fatal
+ code.
+type: requirement
diff --git a/spec/score/sem/req/group.yml b/spec/score/sem/if/group.yml
similarity index 94%
rename from spec/score/sem/req/group.yml
rename to spec/score/sem/if/group.yml
index 02776e6..978f3af 100644
--- a/spec/score/sem/req/group.yml
+++ b/spec/score/sem/if/group.yml
@@ -5,7 +5,7 @@ enabled-by: true
identifier: RTEMSScoreSemaphore
links:
- role: interface-ingroup
- uid: ../../req/group
+ uid: ../../if/group
non-functional-type: design-group
rationale: null
references: []
diff --git a/spec/score/sem/req/seize-try.yml b/spec/score/sem/req/seize-try.yml
index 685f992..cf9a0cb 100644
--- a/spec/score/sem/req/seize-try.yml
+++ b/spec/score/sem/req/seize-try.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Status
states:
diff --git a/spec/score/sem/req/seize-wait.yml b/spec/score/sem/req/seize-wait.yml
index ba68fe5..3f77dad 100644
--- a/spec/score/sem/req/seize-wait.yml
+++ b/spec/score/sem/req/seize-wait.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Status
states:
diff --git a/spec/score/smp/if/fatal-shutdown-response.yml b/spec/score/smp/if/fatal-shutdown-response.yml
new file mode 100644
index 0000000..147e685
--- /dev/null
+++ b/spec/score/smp/if/fatal-shutdown-response.yml
@@ -0,0 +1,12 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: unspecified-define
+links:
+- role: interface-placement
+ uid: header-impl
+name: SMP_SHUTDOWN_RESPONSE
+references: {}
+type: interface
diff --git a/spec/score/smp/if/header-impl.yml b/spec/score/smp/if/header-impl.yml
new file mode 100644
index 0000000..a09e0da
--- /dev/null
+++ b/spec/score/smp/if/header-impl.yml
@@ -0,0 +1,14 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+ This header file provides interfaces of the SMP Handler implementation.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: header-file
+links:
+- role: interface-placement
+ uid: ../../if/domain
+path: rtems/score/smpimpl.h
+prefix: cpukit/include
+type: interface
diff --git a/spec/score/thread/if/group.yml b/spec/score/thread/if/group.yml
new file mode 100644
index 0000000..90add9f
--- /dev/null
+++ b/spec/score/thread/if/group.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+identifier: RTEMSScoreThreadQueue
+links:
+- role: interface-ingroup
+ uid: ../../if/group
+non-functional-type: design-group
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The super core shall have a component containing the thread implementation.
+type: requirement
diff --git a/spec/score/thread/req/fatal-bad-thread-dispatch-disable-level.yml b/spec/score/thread/req/fatal-bad-thread-dispatch-disable-level.yml
new file mode 100644
index 0000000..28d9a06
--- /dev/null
+++ b/spec/score/thread/req/fatal-bad-thread-dispatch-disable-level.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the thread dispatch disable level is not equal to one, if a direct
+ thread dispatch is done, then the system shall terminate with the
+ ${/score/interr/if/internal-error-core:/name} fatal source and the
+ ${/score/interr/if/bad-thread-dispatch-disable-level:/name} fatal code.
+type: requirement
diff --git a/spec/score/thread/req/fatal-bad-thread-dispatch-environment.yml b/spec/score/thread/req/fatal-bad-thread-dispatch-environment.yml
new file mode 100644
index 0000000..a8c3e08
--- /dev/null
+++ b/spec/score/thread/req/fatal-bad-thread-dispatch-environment.yml
@@ -0,0 +1,23 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - not:
+ - aarch64
+ - arm
+ - riscv
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ Where the system needs inter-processor interrupts, if a thread dispatch is
+ done with maskable interrupts disabled, then the system shall terminate with
+ the ${/score/interr/if/internal-error-core:/name} fatal source and the
+ ${/score/interr/if/bad-thread-dispatch-environment:/name} fatal code.
+type: requirement
diff --git a/spec/score/thread/req/fatal-thread-exitted.yml b/spec/score/thread/req/fatal-thread-exitted.yml
new file mode 100644
index 0000000..1dd763a
--- /dev/null
+++ b/spec/score/thread/req/fatal-thread-exitted.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/fatal-error
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ If a thread body function returned and the thread exitted extension
+ invocation for the thread returned, then the system shall terminate with the
+ ${/score/interr/if/internal-error-core:/name} fatal source and the
+ ${/score/interr/if/thread-exitted:/name} fatal code.
+type: requirement
diff --git a/spec/score/thread/req/thread-dispatch-isr-disabled.yml b/spec/score/thread/req/thread-dispatch-isr-disabled.yml
new file mode 100644
index 0000000..6f7906e
--- /dev/null
+++ b/spec/score/thread/req/thread-dispatch-isr-disabled.yml
@@ -0,0 +1,22 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - not:
+ - aarch64
+ - arm
+ - riscv
+links:
+- role: requirement-refinement
+ uid: ../if/group
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ Where the system does not need inter-processor interrupts, when a thread
+ dispatch is done with maskable interrupts disabled, the thread dispatch shall
+ be carried out.
+type: requirement
diff --git a/spec/score/tq/req/group.yml b/spec/score/tq/if/group.yml
similarity index 94%
rename from spec/score/tq/req/group.yml
rename to spec/score/tq/if/group.yml
index 0602344..a643762 100644
--- a/spec/score/tq/req/group.yml
+++ b/spec/score/tq/if/group.yml
@@ -5,7 +5,7 @@ enabled-by: true
identifier: RTEMSScoreThreadQueue
links:
- role: interface-ingroup
- uid: ../../req/group
+ uid: ../../if/group
non-functional-type: design-group
rationale: null
references: []
diff --git a/spec/score/tq/req/enqueue-ceiling.yml b/spec/score/tq/req/enqueue-ceiling.yml
index b38ea3a..1775e58 100644
--- a/spec/score/tq/req/enqueue-ceiling.yml
+++ b/spec/score/tq/req/enqueue-ceiling.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Position
states:
diff --git a/spec/score/tq/req/enqueue-deadlock.yml b/spec/score/tq/req/enqueue-deadlock.yml
index 44bd72d..f2a9600 100644
--- a/spec/score/tq/req/enqueue-deadlock.yml
+++ b/spec/score/tq/req/enqueue-deadlock.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Status
states:
diff --git a/spec/score/tq/req/enqueue-fifo.yml b/spec/score/tq/req/enqueue-fifo.yml
index 0a879e2..f9fc91d 100644
--- a/spec/score/tq/req/enqueue-fifo.yml
+++ b/spec/score/tq/req/enqueue-fifo.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Position
states:
diff --git a/spec/score/tq/req/enqueue-mrsp.yml b/spec/score/tq/req/enqueue-mrsp.yml
index faf0825..376297b 100644
--- a/spec/score/tq/req/enqueue-mrsp.yml
+++ b/spec/score/tq/req/enqueue-mrsp.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Position
states:
diff --git a/spec/score/tq/req/enqueue-priority.yml b/spec/score/tq/req/enqueue-priority.yml
index a8fd1f9..600cacd 100644
--- a/spec/score/tq/req/enqueue-priority.yml
+++ b/spec/score/tq/req/enqueue-priority.yml
@@ -5,7 +5,7 @@ enabled-by: true
functional-type: action
links:
- role: requirement-refinement
- uid: group
+ uid: ../if/group
post-conditions:
- name: Position
states:
diff --git a/spec/score/val/fatal.yml b/spec/score/val/fatal.yml
new file mode 100644
index 0000000..0002ad8
--- /dev/null
+++ b/spec/score/val/fatal.yml
@@ -0,0 +1,291 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links: []
+test-actions:
+- action-brief: |
+ Construct a task with a task body which returns. Check that the right
+ fatal error occurs.
+ action-code: |
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalExtension( FatalTaskExit );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo();
+ id = CreateTask( "EXIT", PRIO_HIGH );
+ StartTask( id, ExitTask, NULL );
+ T_eq_uint( GetFatalCounter(), counter + 1 );
+ T_eq_int( fatal_info.source, INTERNAL_ERROR_CORE );
+ T_false( fatal_info.always_set_to_false );
+ T_eq_ulong( fatal_info.code, INTERNAL_ERROR_THREAD_EXITTED );
+ RestoreRunnerPriority();
+ SetFatalExtension( NULL );
+ checks: []
+ links:
+ - role: validation
+ uid: ../thread/req/fatal-thread-exitted
+- action-brief: |
+ Construct a task which performs a thread dispatch with maskable interrupts
+ disabled. Check that the right fatal error occurs or no fatal error
+ occurs.
+ action-code: |
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalExtension( FatalBadThreadDispatchEnvironment );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo();
+ id = CreateTask( "BENV", PRIO_HIGH );
+ StartTask( id, ISRDisabledThreadDispatchTask, NULL );
+
+ if ( rtems_configuration_get_maximum_processors() > 1 ) {
+ T_eq_uint( GetFatalCounter(), counter + 1 );
+ T_eq_int( fatal_info.source, INTERNAL_ERROR_CORE );
+ T_false( fatal_info.always_set_to_false );
+ T_eq_ulong(
+ fatal_info.code,
+ INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT
+ );
+ } else {
+ T_eq_uint( GetFatalCounter(), counter );
+ }
+
+ RestoreRunnerPriority();
+ SetFatalExtension( NULL );
+ checks: []
+ links:
+ - role: validation
+ uid: ../thread/req/fatal-bad-thread-dispatch-environment
+ - role: validation
+ uid: ../thread/req/thread-dispatch-isr-disabled
+- action-brief: |
+ Construct a task which performs a direct thread dispatch with a thread
+ dispatch level not equal to one. Check that the right fatal error occurs.
+ action-code: |
+ rtems_id id;
+ unsigned int counter;
+
+ SetFatalExtension( FatalBadThreadDispatchDisableLevel );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo();
+ id = CreateTask( "BLVL", PRIO_HIGH );
+ StartTask( id, BadLevelThreadDispatchTask, NULL );
+ T_eq_uint( GetFatalCounter(), counter + 1 );
+ T_eq_int( fatal_info.source, INTERNAL_ERROR_CORE );
+ T_false( fatal_info.always_set_to_false );
+ T_eq_ulong(
+ fatal_info.code,
+ INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL
+ );
+ RestoreRunnerPriority();
+ SetFatalExtension( NULL );
+ checks: []
+ links:
+ - role: validation
+ uid: ../thread/req/fatal-bad-thread-dispatch-disable-level
+- action-brief: |
+ Create a mutex and construct a task which produces a deadlock which
+ involves the allocator mutex.
+ action-code: |
+ rtems_extensions_table extensions;
+ rtems_status_code sc;
+ rtems_id extension_id;
+ rtems_id task_id;
+ unsigned int counter;
+
+ memset( &extensions, 0, sizeof( extensions ) );
+ extensions.thread_create = ThreadCreateDeadlock;
+
+ sc = rtems_extension_create(
+ rtems_build_name( 'T', 'E', 'X', 'T' ),
+ &extensions,
+ &extension_id
+ );
+ T_rsc_success( sc );
+
+ deadlock_mutex = CreateMutex();
+
+ SetFatalExtension( FatalThreadQueueDeadlock );
+ SetSelfPriority( PRIO_NORMAL );
+ counter = ResetFatalInfo();
+
+ ObtainMutex( deadlock_mutex );
+
+ task_id = CreateTask( "WORK", PRIO_HIGH );
+ StartTask( task_id, ThreadQueueDeadlockTask, NULL );
+
+ if ( setjmp( before_deadlock ) == 0 ) {
+ (void) CreateTask( "DLCK", PRIO_NORMAL );
+ }
+
+ ReleaseMutex( deadlock_mutex );
+
+ T_eq_uint( GetFatalCounter(), counter + 1 );
+ T_eq_int( fatal_info.source, INTERNAL_ERROR_CORE );
+ T_false( fatal_info.always_set_to_false );
+ T_eq_ulong(
+ fatal_info.code,
+ INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
+ );
+
+ RestoreRunnerPriority();
+ SetFatalExtension( NULL );
+
+ sc = rtems_extension_delete( extension_id );
+ T_rsc_success( sc );
+
+ DeleteMutex( deadlock_mutex );
+ checks: []
+ links:
+ - role: validation
+ uid: ../object/req/fatal-allocator-mutex-deadlock
+test-brief: |
+ Tests some fatal errors.
+test-context: []
+test-context-support: null
+test-description: null
+test-header: null
+test-includes:
+- rtems.h
+- rtems/score/atomic.h
+- rtems/score/isrlevel.h
+- rtems/score/threaddispatch.h
+- setjmp.h
+- string.h
+test-local-includes:
+- tx-support.h
+test-setup: null
+test-stop: null
+test-support: |
+ typedef struct {
+ Atomic_Uint counter;
+ rtems_fatal_source source;
+ bool always_set_to_false;
+ rtems_fatal_code code;
+ } FatalInfo;
+
+ static FatalInfo fatal_info;
+
+ static unsigned int GetFatalCounter( void )
+ {
+ return _Atomic_Load_uint( &fatal_info.counter, ATOMIC_ORDER_RELAXED );
+ }
+
+ static unsigned int ResetFatalInfo( void )
+ {
+ fatal_info.source = RTEMS_FATAL_SOURCE_APPLICATION;
+ fatal_info.always_set_to_false = true;
+ fatal_info.code = INTERNAL_ERROR_NO_MPCI;
+
+ return GetFatalCounter();
+ }
+
+ static void Fatal(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+ )
+ {
+ fatal_info.source = source;
+ fatal_info.always_set_to_false = always_set_to_false;
+ fatal_info.code = code;
+ _Atomic_Fetch_add_uint( &fatal_info.counter, 1, ATOMIC_ORDER_RELAXED );
+ }
+
+ static void FatalTaskExit(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+ )
+ {
+ Fatal( source, always_set_to_false, code );
+ rtems_task_exit();
+ }
+
+ static void ExitTask( rtems_task_argument arg )
+ {
+ (void) arg;
+ }
+
+ static void FatalBadThreadDispatchEnvironment(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+ )
+ {
+ Fatal( source, always_set_to_false, code );
+ _ISR_Set_level( 0 );
+ _Thread_Dispatch_direct_no_return( _Per_CPU_Get() );
+ }
+
+ static void ISRDisabledThreadDispatchTask( rtems_task_argument arg )
+ {
+ rtems_interrupt_level level;
+
+ (void) arg;
+ rtems_interrupt_local_disable( level );
+ (void) level;
+ rtems_task_exit();
+ }
+
+ static void FatalBadThreadDispatchDisableLevel(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+ )
+ {
+ Per_CPU_Control *cpu_self;
+
+ Fatal( source, always_set_to_false, code );
+ cpu_self = _Per_CPU_Get();
+ _Thread_Dispatch_unnest( cpu_self );
+ _Thread_Dispatch_direct_no_return( cpu_self );
+ }
+
+ static void BadLevelThreadDispatchTask( rtems_task_argument arg )
+ {
+ (void) arg;
+ _Thread_Dispatch_disable();
+ rtems_task_exit();
+ }
+
+ static jmp_buf before_deadlock;
+
+ static rtems_id deadlock_mutex;
+
+ static bool ThreadCreateDeadlock( rtems_tcb *executing, rtems_tcb *created )
+ {
+ (void) executing;
+ (void) created;
+
+ ObtainMutex( deadlock_mutex );
+ ReleaseMutex( deadlock_mutex );
+
+ return true;
+ }
+
+ static void FatalThreadQueueDeadlock(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code code
+ )
+ {
+ Fatal( source, always_set_to_false, code );
+ longjmp( before_deadlock, 1 );
+ }
+
+ static void ThreadQueueDeadlockTask( rtems_task_argument arg )
+ {
+ rtems_id id;
+
+ (void) arg;
+ id = CreateTask( "DORM", PRIO_NORMAL );
+ DeleteTask( id );
+
+ rtems_task_exit();
+ }
+test-target: testsuites/validation/tc-score-fatal.c
+test-teardown: null
+type: test-case
diff --git a/spec/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml b/spec/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml
new file mode 100644
index 0000000..dc5e059
--- /dev/null
+++ b/spec/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.yml
@@ -0,0 +1,25 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This validation test suite contains a test case which triggers a fatal error
+ during system initialization.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalCacheSnoopingDisabledBoot_Run
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.h
+test-suite-name: FatalBspSparcLeon3CacheSnoopingDisabledBoot
+test-target: testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-boot.c
+type: test-suite
diff --git a/spec/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml b/spec/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml
new file mode 100644
index 0000000..8b3bb98
--- /dev/null
+++ b/spec/testsuites/fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.yml
@@ -0,0 +1,28 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This validation test suite contains a test case which triggers a fatal error
+ during system initialization.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN \
+ BspSparcLeon3ValFatalCacheSnoopingDisabledSecondary_Run
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.h
+test-suite-name: FatalBspSparcLeon3CacheSnoopingDisabledSecondary
+test-target: testsuites/validation/ts-fatal-bsp-sparc-leon3-cache-snooping-disabled-secondary.c
+type: test-suite
diff --git a/spec/testsuites/fatal-bsp-sparc-leon3-clock-initialization.yml b/spec/testsuites/fatal-bsp-sparc-leon3-clock-initialization.yml
new file mode 100644
index 0000000..fdda9aa
--- /dev/null
+++ b/spec/testsuites/fatal-bsp-sparc-leon3-clock-initialization.yml
@@ -0,0 +1,25 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This validation test suite contains a test case which triggers a fatal error
+ during system initialization.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalClockInitialization_Run
+
+ #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-clock-initialization.h
+test-suite-name: FatalBspSparcLeon3ClockInitialization
+test-target: testsuites/validation/ts-fatal-bsp-sparc-leon3-clock-initialization.c
+type: test-suite
diff --git a/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-nop.yml b/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-nop.yml
new file mode 100644
index 0000000..276e35b
--- /dev/null
+++ b/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-nop.yml
@@ -0,0 +1,64 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+- role: validation
+ uid: /bsp/sparc/leon3/req/fatal-shutdown-request
+test-brief: |
+ This validation test suite provides an application configuration to perform a
+ shutdown with present but not configured processors and a processor which is
+ configured but not present. It contains no test cases.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ static void FinishTestSuite( void )
+ {
+ rtems_fatal( RTEMS_FATAL_SOURCE_APPLICATION, 123456 );
+ }
+
+ RTEMS_SYSINIT_ITEM(
+ FinishTestSuite,
+ RTEMS_SYSINIT_DEVICE_DRIVERS,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+ );
+
+ #define FATAL_SYSINIT_RUN( source, code ) do { } while ( 0 )
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_PROCESSORS 5
+
+ #include <rtems/score/scheduleredfsmp.h>
+
+ #define CONFIGURE_SCHEDULER_EDF_SMP
+
+ #include <rtems/scheduler.h>
+
+ RTEMS_SCHEDULER_EDF_SMP( a );
+
+ #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
+ RTEMS_SCHEDULER_TABLE_EDF_SMP( a, TEST_SCHEDULER_A_NAME )
+
+ #define CONFIGURE_SCHEDULER_ASSIGNMENTS \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY ), \
+ RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \
+ RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \
+ RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER, \
+ RTEMS_SCHEDULER_ASSIGN( 0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL )
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes:
+- rtems.h
+- rtems/sysinit.h
+test-local-includes:
+- ts-config.h
+test-suite-name: FatalBspSparcLeon3ShutdownNop
+test-target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-nop.c
+type: test-suite
diff --git a/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-response.yml b/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-response.yml
new file mode 100644
index 0000000..c8794a0
--- /dev/null
+++ b/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-response.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This validation test suite contains a test case which performs a system
+ shutdown.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalShutdownResponse_Run
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-shutdown-response.h
+test-suite-name: FatalBspSparcLeon3ShutdownResponse
+test-target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-response.c
+type: test-suite
diff --git a/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-timeout.yml b/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-timeout.yml
new file mode 100644
index 0000000..9c32be9
--- /dev/null
+++ b/spec/testsuites/fatal-bsp-sparc-leon3-shutdown-timeout.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by:
+ and:
+ - RTEMS_SMP
+ - bsps/sparc/leon3
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+test-brief: |
+ This validation test suite contains a test case which performs a system
+ shutdown.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN BspSparcLeon3ValFatalShutdownTimeout_Run
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_PROCESSORS 2
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-bsp-sparc-leon3-shutdown-timeout.h
+test-suite-name: FatalBspSparcLeon3ShutdownTimeout
+test-target: testsuites/validation/ts-fatal-bsp-sparc-leon3-shutdown-timeout.c
+type: test-suite
diff --git a/spec/testsuites/fatal-init-task-construct-failed.yml b/spec/testsuites/fatal-init-task-construct-failed.yml
new file mode 100644
index 0000000..f6fedb0
--- /dev/null
+++ b/spec/testsuites/fatal-init-task-construct-failed.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+- role: validation
+ uid: /acfg/if/init-task-priority
+test-brief: |
+ This validation test suite contains a test case which triggers a fatal error
+ during system initialization.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN AcfgValFatalInitTaskConstructFailed_Run
+
+ static void Init( rtems_task_argument arg )
+ {
+ (void) arg;
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
+ }
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_TASKS 1
+
+ #define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE 1
+
+ #define CONFIGURE_INIT_TASK_PRIORITY 0
+
+ #define CONFIGURE_INIT_TASK_CONSTRUCT_STORAGE_SIZE RTEMS_MINIMUM_STACK_SIZE
+
+ #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-init-task-construct-failed.h
+test-suite-name: FatalInitTaskConstructFailed
+test-target: testsuites/validation/ts-fatal-init-task-construct-failed.c
+type: test-suite
diff --git a/spec/testsuites/fatal-too-large-tls-size.yml b/spec/testsuites/fatal-too-large-tls-size.yml
new file mode 100644
index 0000000..7d07b15
--- /dev/null
+++ b/spec/testsuites/fatal-too-large-tls-size.yml
@@ -0,0 +1,30 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: /req/test-suites
+- role: validation
+ uid: /acfg/if/max-thread-local-storage-size
+test-brief: |
+ This validation test suite contains a test case which triggers a fatal error
+ during system initialization.
+test-code: |
+ const char rtems_test_name[] = "${.:/test-suite-name}";
+
+ #define FATAL_SYSINIT_RUN AcfgValFatalTooLargeTlsSize_Run
+
+ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+
+ #define CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE \
+ RTEMS_TASK_STORAGE_ALIGNMENT
+
+ #include "ts-fatal-sysinit.h"
+test-description: null
+test-includes: []
+test-local-includes:
+- tr-fatal-too-large-tls-size.h
+test-suite-name: FatalTooLargeTlsSize
+test-target: testsuites/validation/ts-fatal-too-large-tls-size.c
+type: test-suite
More information about the vc
mailing list