Visibility of RISCV_BOOT_HARTID
Padmarao.Begari at microchip.com
Padmarao.Begari at microchip.com
Thu Oct 13 07:09:49 UTC 2022
Hi Joel,
We can do like below to remove visibility of RISCV_BOOT_HARTID from
other architecture configurations and only visible to RISC-V.
Changes in spec/build/cpukits
1. Remove "optboothartid" build-dependency from "cpuotps"
2. Add the "cpuriscvhartid" to generate the "hartid.h" using "optbootha
rtid
"
3. Link "cpuriscvhartid" build-dependency in "cpuriscv"
4. Include "hartid.h" in "cpukit/score/cpu/riscv/include/rtems/score/ri
scv.h"
I have modified the RTEMS source like below
**********************************************************************
cpukit/score/cpu/riscv/include/rtems/score/riscv.h | 2 ++
spec/build/cpukit/cpuopts.yml | 2 --
spec/build/cpukit/cpuriscv.yml | 4 +++-
spec/build/cpukit/cpuriscvhartid.yml | 13 +++++++++++++
4 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 spec/build/cpukit/cpuriscvhartid.yml
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/riscv.h
b/cpukit/score/cpu/riscv/include/rtems/score/riscv.h
index f770578715..3e0169981b 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/riscv.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/riscv.h
@@ -36,6 +36,8 @@
#ifndef _RTEMS_SCORE_RISCV_H
#define _RTEMS_SCORE_RISCV_H
+#include <rtems/score/hartid.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/spec/build/cpukit/cpuopts.yml
b/spec/build/cpukit/cpuopts.yml
index dcfca62d05..86cc7f676a 100644
--- a/spec/build/cpukit/cpuopts.yml
+++ b/spec/build/cpukit/cpuopts.yml
@@ -33,8 +33,6 @@ links:
uid: optinstall
- role: build-dependency
uid: optada
-- role: build-dependency
- uid: optboothartid
- role: build-dependency
uid: optbuildlabel
- role: build-dependency
diff --git a/spec/build/cpukit/cpuriscv.yml
b/spec/build/cpukit/cpuriscv.yml
index 2671c5c5f0..c8365e550a 100644
--- a/spec/build/cpukit/cpuriscv.yml
+++ b/spec/build/cpukit/cpuriscv.yml
@@ -24,7 +24,9 @@ install:
- cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h
- cpukit/score/cpu/riscv/include/rtems/score/riscv-utility.h
- cpukit/score/cpu/riscv/include/rtems/score/riscv.h
-links: []
+links:
+- role: build-dependency
+ uid: cpuriscvhartid
source:
- cpukit/score/cpu/riscv/cpu.c
- cpukit/score/cpu/riscv/riscv-context-initialize.c
diff --git a/spec/build/cpukit/cpuriscvhartid.yml
b/spec/build/cpukit/cpuriscvhartid.yml
new file mode 100644
index 0000000000..60f22bd3bd
--- /dev/null
+++ b/spec/build/cpukit/cpuriscvhartid.yml
@@ -0,0 +1,13 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: config-header
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (
http://www.embedded-brains.de)
+enabled-by: true
+guard: _RTEMS_SCORE_HARTID_H
+include-headers: []
+install-path: ${BSP_INCLUDEDIR}/rtems/score
+links:
+- role: build-dependency
+ uid: optboothartid
+target: cpukit/include/rtems/score/hartid.h
+type: build
\ No newline at end of file
--
2.25.1
***********************************************************************
Regards
Padmarao
On Wed, 2022-10-12 at 09:36 -0500, Joel Sherrill wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> Hi
>
> I was looking at the bsp default settings for sparc/leon3 to show
> someone and noticed this which is out of place.
>
> # boot hartid (processor number) of risc-v cpu (default 0)
> RISCV_BOOT_HARTID = 0
>
> I looked around and see it is an architecture specific ini setting
> but placed in a directory with architecture independent settings. We
> don't appear to have any other examples of a cpukit option that is
> architecture specific. So it is lumped in with all the architecture
> independent ini settings.
>
> We had long discussions about presenting these options with better
> names, documentation, etc as part of the waf transition. Seems
> unfortunate to have this show up in all configurations.
>
> Any thoughts on how to clean this up?
>
> Thanks.
>
> --joel
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list