Skip to content

Commit

Permalink
update(guests/zephyr): update zephyr to version 3.5.0-rc1
Browse files Browse the repository at this point in the history
Update zephyr to version 3.5.0-rc1.

In addition to version update for zephyr, also specify the commit hash
for cmsis.

Signed-off-by: Yan-Jie Wang <yanjiewtw@gmail.com>
  • Loading branch information
yanjiew1 committed Oct 13, 2023
1 parent e06a96d commit 880060d
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 153 deletions.
2 changes: 1 addition & 1 deletion guests/zephyr/boards/arm64/baovm_fvp-a/baovm_fvp-a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
interrupt-parent = <&gic>;

gic: interrupt-controller@2f000000 {
compatible = "arm,gic";
compatible = "arm,gic-v3", "arm,gic";
reg = <0x2f000000 0x10000>, // GICD
<0x2f100000 0x200000>; // GICR
interrupt-controller;
Expand Down
19 changes: 17 additions & 2 deletions guests/zephyr/boards/arm64/baovm_fvp-r/baovm_fvp-r.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// #include <arm64/fvp/fvp-aemv8r.dtsi>
#include <mem.h>
#include <zephyr/dt-bindings/interrupt-controller/arm-gic.h>
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>

/ {
model = "Bao VM for FVP BaseR AEMv8R";
Expand Down Expand Up @@ -77,7 +78,7 @@
interrupt-parent = <&gic>;

gic: interrupt-controller@af000000 {
compatible = "arm,gic";
compatible = "arm,gic-v3", "arm,gic";
reg = <0xaf000000 0x10000>,
<0xaf100000 0x200000>;
interrupt-controller;
Expand All @@ -102,7 +103,21 @@

dram0: memory@24000000 {
compatible = "mmio-dram";
reg = <0x24000000 DT_SIZE_M((512*3)-64)>;
reg = <0x24000000 DT_SIZE_M(64)>;
};

baoipc_region: memory@70000000 {
compatible = "zephyr,memory-region";
reg = <0x70000000 0x00010000>;
zephyr,memory-region = "BAOIPC";
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM) )>;
};

device_region: memory@9a000000 {
compatible = "zephyr,memory-region", "mmio-dram";
reg = <0x9a000000 0x66000000>;
zephyr,memory-region = "DEVICE_REGION";
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>;
};
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
interrupt-parent = <&gic>;

gic: interrupt-controller@8000000 {
compatible = "arm,gic";
compatible = "arm,gic-v3", "arm,gic";
reg = <0x8000000 0x10000>, // GICD
<0x80a0000 0x200000>; // GICR
interrupt-controller;
Expand Down
4 changes: 3 additions & 1 deletion guests/zephyr/make.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
zephyr_src:=$(wrkdir_src)/zephyr
zephyr_repo:=https://github.com/zephyrproject-rtos/zephyr.git
zephyr_version:=v3.3.0
zephyr_version:=v3.5.0-rc1
zephyr_cmsis_repo:=https://github.com/zephyrproject-rtos/cmsis.git
zephyr_cmsis_src:=$(wrkdir_src)/cmsis
zephyr_cmsis_commit:=5a00331455dd74e31e80efa383a489faea0590e3
zephyr_build:=$(wrkdir_demo_imgs)/zephyr_build
zephyr_board_root:=$(bao_demos)/guests/zephyr
zephyr_board:=baovm_$(PLATFORM)
Expand All @@ -20,6 +21,7 @@ zephyr_bin:=$(zephyr_build)/zephyr/zephyr.bin

$(zephyr_cmsis_src):
git clone $(zephyr_cmsis_repo) $@
git -C $(zephyr_cmsis_src) checkout $(zephyr_cmsis_commit)

$(zephyr_build): $(zephyr_src) $(zephyr_cmsis_src)
$(zephyr_env) cmake -DCMAKE_PREFIX_PATH=$(zephyr_src)/share/zephyr-package \
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From cd6b2086227930794a6021dc295c92da5a70d638 Mon Sep 17 00:00:00 2001
From 48283f9d251d5e74f51b00ca47e7d6829a5a5605 Mon Sep 17 00:00:00 2001
From: Jose Martins <josemartins90@gmail.com>
Date: Sat, 4 Feb 2023 16:54:22 +0000
Subject: [PATCH] add bao ipcshmem drivers
Subject: [PATCH 1/3] add bao ipcshmem drivers

Signed-off-by: Jose Martins <josemartins90@gmail.com>
---
Expand All @@ -20,18 +20,18 @@ Signed-off-by: Jose Martins <josemartins90@gmail.com>
create mode 100644 include/zephyr/drivers/virtualization/bao_ipcshmem.h

diff --git a/drivers/virtualization/CMakeLists.txt b/drivers/virtualization/CMakeLists.txt
index 2829e641..8e65cbd7 100644
index c16ed84e31..6150c91e69 100644
--- a/drivers/virtualization/CMakeLists.txt
+++ b/drivers/virtualization/CMakeLists.txt
@@ -6,3 +6,6 @@ zephyr_library_sources_ifdef(CONFIG_IVSHMEM virt_ivshmem.c)
@@ -10,3 +10,6 @@ zephyr_library_sources_ifdef(CONFIG_IVSHMEM virt_ivshmem.c)
zephyr_library_sources_ifdef(CONFIG_IVSHMEM_SHELL virt_ivshmem_shell.c)

zephyr_library_sources_ifdef(CONFIG_USERSPACE virt_ivshmem_handlers.c)
+
+zephyr_library_sources_ifdef(CONFIG_BAO_IPCSHMEM bao_ipcshmem.c)
+zephyr_library_sources_ifdef(CONFIG_BAO_IPCSHMEM_SHELL bao_ipcshmem_shell.c)
diff --git a/drivers/virtualization/Kconfig b/drivers/virtualization/Kconfig
index a5ac6820..fc9b4a68 100644
index 4f32552f09..a0dac412e1 100644
--- a/drivers/virtualization/Kconfig
+++ b/drivers/virtualization/Kconfig
@@ -12,6 +12,23 @@ menuconfig VIRTUALIZATION
Expand Down Expand Up @@ -60,7 +60,7 @@ index a5ac6820..fc9b4a68 100644
depends on PCIE
diff --git a/drivers/virtualization/bao_ipcshmem.c b/drivers/virtualization/bao_ipcshmem.c
new file mode 100644
index 00000000..a323cf0c
index 0000000000..a323cf0ca5
--- /dev/null
+++ b/drivers/virtualization/bao_ipcshmem.c
@@ -0,0 +1,108 @@
Expand Down Expand Up @@ -174,7 +174,7 @@ index 00000000..a323cf0c
+DT_INST_FOREACH_STATUS_OKAY(BAO_IPCSHMEM_INSTANTIATE)
diff --git a/drivers/virtualization/bao_ipcshmem_internal.h b/drivers/virtualization/bao_ipcshmem_internal.h
new file mode 100644
index 00000000..f3292812
index 0000000000..f32928126e
--- /dev/null
+++ b/drivers/virtualization/bao_ipcshmem_internal.h
@@ -0,0 +1,28 @@
Expand Down Expand Up @@ -208,7 +208,7 @@ index 00000000..f3292812
+#endif /* BAO_IPCSHMEM_INTERNAL_H_ */
diff --git a/drivers/virtualization/bao_ipcshmem_shell.c b/drivers/virtualization/bao_ipcshmem_shell.c
new file mode 100644
index 00000000..9bb5c73e
index 0000000000..9bb5c73e86
--- /dev/null
+++ b/drivers/virtualization/bao_ipcshmem_shell.c
@@ -0,0 +1,97 @@
Expand Down Expand Up @@ -311,7 +311,7 @@ index 00000000..9bb5c73e
+ "Bao IPC Shared Memory Commands", NULL);
diff --git a/dts/bindings/virtualization/bao,ipcshmem.yaml b/dts/bindings/virtualization/bao,ipcshmem.yaml
new file mode 100644
index 00000000..ed7cedef
index 0000000000..ed7cedef9a
--- /dev/null
+++ b/dts/bindings/virtualization/bao,ipcshmem.yaml
@@ -0,0 +1,15 @@
Expand All @@ -332,7 +332,7 @@ index 00000000..ed7cedef
+ type: int
diff --git a/include/zephyr/drivers/virtualization/bao_ipcshmem.h b/include/zephyr/drivers/virtualization/bao_ipcshmem.h
new file mode 100644
index 00000000..5f6e6fe9
index 0000000000..5f6e6fe957
--- /dev/null
+++ b/include/zephyr/drivers/virtualization/bao_ipcshmem.h
@@ -0,0 +1,46 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
From 6e8232b9462de3a950a56a51d8718ac60c2fce0f Mon Sep 17 00:00:00 2001
From a25559cde559e6fc0e41026a8367f4d71357fc86 Mon Sep 17 00:00:00 2001
From: Jose Martins <josemartins90@gmail.com>
Date: Mon, 6 Feb 2023 19:20:41 +0000
Subject: [PATCH] add smc support for aarch32-r
Subject: [PATCH 2/3] add smc support for aarch32-r

Signed-off-by: Jose Martins <josemartins90@gmail.com>
---
.../core/aarch32/cortex_a_r/CMakeLists.txt | 1 +
arch/arm/core/aarch32/cortex_a_r/Kconfig | 7 +++
arch/arm/core/aarch32/cortex_a_r/smccc-call.S | 41 +++++++++++++++
include/zephyr/arch/arm/aarch32/arm-smccc.h | 51 +++++++++++++++++++
arch/arm/core/cortex_a_r/CMakeLists.txt | 1 +
arch/arm/core/cortex_a_r/Kconfig | 7 ++++
arch/arm/core/cortex_a_r/smccc-call.S | 41 ++++++++++++++++++++
include/zephyr/arch/arm/arm-smccc.h | 51 +++++++++++++++++++++++++
4 files changed, 100 insertions(+)
create mode 100644 arch/arm/core/aarch32/cortex_a_r/smccc-call.S
create mode 100644 include/zephyr/arch/arm/aarch32/arm-smccc.h
create mode 100644 arch/arm/core/cortex_a_r/smccc-call.S
create mode 100644 include/zephyr/arch/arm/arm-smccc.h

diff --git a/arch/arm/core/aarch32/cortex_a_r/CMakeLists.txt b/arch/arm/core/aarch32/cortex_a_r/CMakeLists.txt
index d3337a67..878800f4 100644
--- a/arch/arm/core/aarch32/cortex_a_r/CMakeLists.txt
+++ b/arch/arm/core/aarch32/cortex_a_r/CMakeLists.txt
@@ -17,3 +17,4 @@ zephyr_library_sources(
zephyr_library_sources_ifdef(CONFIG_USERSPACE thread.c)
diff --git a/arch/arm/core/cortex_a_r/CMakeLists.txt b/arch/arm/core/cortex_a_r/CMakeLists.txt
index 8b0dac374e..78271d9a2a 100644
--- a/arch/arm/core/cortex_a_r/CMakeLists.txt
+++ b/arch/arm/core/cortex_a_r/CMakeLists.txt
@@ -25,3 +25,4 @@ zephyr_library_sources_ifdef(CONFIG_USERSPACE thread.c)
zephyr_library_sources_ifdef(CONFIG_SEMIHOST semihost.c)
zephyr_library_sources_ifdef(CONFIG_THREAD_LOCAL_STORAGE __aeabi_read_tp.S)
zephyr_library_sources_ifdef(CONFIG_ARCH_CACHE cache.c)
+zephyr_library_sources_ifdef(CONFIG_HAS_ARM_SMCCC smccc-call.S)
diff --git a/arch/arm/core/aarch32/cortex_a_r/Kconfig b/arch/arm/core/aarch32/cortex_a_r/Kconfig
index 418aa9a0..c9b52a22 100644
--- a/arch/arm/core/aarch32/cortex_a_r/Kconfig
+++ b/arch/arm/core/aarch32/cortex_a_r/Kconfig
@@ -126,9 +126,16 @@ config ARMV7_R_FP
diff --git a/arch/arm/core/cortex_a_r/Kconfig b/arch/arm/core/cortex_a_r/Kconfig
index 10bf721a87..c43a6e586d 100644
--- a/arch/arm/core/cortex_a_r/Kconfig
+++ b/arch/arm/core/cortex_a_r/Kconfig
@@ -127,9 +127,16 @@ config ARMV7_R_FP
This option signifies the use of an ARMv7-R processor
implementation supporting the Floating-Point Extension.

Expand All @@ -43,11 +43,11 @@ index 418aa9a0..c9b52a22 100644
help
This option signifies the use of an ARMv8-R AArch32 processor
implementation.
diff --git a/arch/arm/core/aarch32/cortex_a_r/smccc-call.S b/arch/arm/core/aarch32/cortex_a_r/smccc-call.S
diff --git a/arch/arm/core/cortex_a_r/smccc-call.S b/arch/arm/core/cortex_a_r/smccc-call.S
new file mode 100644
index 00000000..f655def9
index 0000000000..f655def9b2
--- /dev/null
+++ b/arch/arm/core/aarch32/cortex_a_r/smccc-call.S
+++ b/arch/arm/core/cortex_a_r/smccc-call.S
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
Expand Down Expand Up @@ -90,11 +90,11 @@ index 00000000..f655def9
+GTEXT(arm_smccc_hvc)
+SECTION_FUNC(TEXT, arm_smccc_hvc)
+ SMCCC hvc
diff --git a/include/zephyr/arch/arm/aarch32/arm-smccc.h b/include/zephyr/arch/arm/aarch32/arm-smccc.h
diff --git a/include/zephyr/arch/arm/arm-smccc.h b/include/zephyr/arch/arm/arm-smccc.h
new file mode 100644
index 00000000..e702ce22
index 0000000000..e702ce2280
--- /dev/null
+++ b/include/zephyr/arch/arm/aarch32/arm-smccc.h
+++ b/include/zephyr/arch/arm/arm-smccc.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2020 Carlo Caione <ccaione@baylibre.com>
Expand Down
Loading

0 comments on commit 880060d

Please sign in to comment.