summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2025-08-26 11:52:02 -0300
committerGitHub <noreply@github.com>2025-08-26 11:52:02 -0300
commit02c684185da1c20dcb41501c198ad6cd5c5f1d54 (patch)
treec152c3add81e8083b244aeb0e7cf0984f41f4f2e
parentd0dfdedb3919ca012066916f6d274b2c23a1b0ec (diff)
parentc2672fc026f0f71e621bb1d0c29490715ace5c8b (diff)
downloadmeta-freescale-02c684185da1c20dcb41501c198ad6cd5c5f1d54.tar.gz
Merge pull request #2280 from OSSystems/topic/jailhouse-imx
jailhouse-imx: Update branch from lf-6.6.52 -> lf-6.12.3
-rw-r--r--recipes-extended/jailhouse/files/0001-YOCIMX-9281-1-Fix-gcc15-errors.patch113
-rw-r--r--recipes-extended/jailhouse/files/0002-YOCIMX-9281-2-hypervisor-arm64-fix-strh-usage.patch34
-rw-r--r--recipes-extended/jailhouse/jailhouse-imx_git.bb16
3 files changed, 160 insertions, 3 deletions
diff --git a/recipes-extended/jailhouse/files/0001-YOCIMX-9281-1-Fix-gcc15-errors.patch b/recipes-extended/jailhouse/files/0001-YOCIMX-9281-1-Fix-gcc15-errors.patch
new file mode 100644
index 000000000..c1e3eaa25
--- /dev/null
+++ b/recipes-extended/jailhouse/files/0001-YOCIMX-9281-1-Fix-gcc15-errors.patch
@@ -0,0 +1,113 @@
1From 2be7793ca658015470fe0d60c0c973e12ce68d73 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Thu, 12 Jun 2025 06:49:58 -0700
4Subject: [PATCH 1/2] YOCIMX-9281-1: Fix gcc15 errors
5
6Fix several instances of the following errors:
7
8```
9| inmates/lib/include/inmate_common.h:87:16: error: cannot use keyword 'true' as enumeration constant
10| 87 | typedef enum { true = 1, false = 0 } bool;
11| | ^~~~
12```
13
14```
15| In file included from configs/arm64/hikey.c:16:
16| include/jailhouse/cell-config.h:318:41: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Werror=unterminated-string-initialization]
17| 318 | #define JAILHOUSE_SYSTEM_SIGNATURE "JHSYS"
18| | ^~~~~~~
19| configs/arm64/hikey.c:26:30: note: in expansion of macro 'JAILHOUSE_SYSTEM_SIGNATURE'
20| 26 | .signature = JAILHOUSE_SYSTEM_SIGNATURE,
21| | ^~~~~~~~~~~~~~~~~~~~~~~~~~
22```
23
24Upstream-Status: Backport [Pending]
25Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
26Signed-off-by: Peng Fan <peng.fan@nxp.com>
27---
28 hypervisor/include/jailhouse/header.h | 2 +-
29 hypervisor/include/jailhouse/types.h | 2 ++
30 include/jailhouse/cell-config.h | 4 ++--
31 include/jailhouse/hypercall.h | 2 +-
32 inmates/lib/include/inmate_common.h | 2 ++
33 5 files changed, 8 insertions(+), 4 deletions(-)
34
35diff --git a/hypervisor/include/jailhouse/header.h b/hypervisor/include/jailhouse/header.h
36index 518bc5cb..324eb94b 100644
37--- a/hypervisor/include/jailhouse/header.h
38+++ b/hypervisor/include/jailhouse/header.h
39@@ -55,7 +55,7 @@ struct jailhouse_header {
40 /** Signature "JAILHOUS" used for basic validity check of the
41 * hypervisor image.
42 * @note Filled at build time. */
43- char signature[8];
44+ char signature[8] __attribute__ ((nonstring));
45 /** Size of hypervisor core.
46 * It starts with the hypervisor's header and ends after its bss
47 * section. Rounded up to page boundary.
48diff --git a/hypervisor/include/jailhouse/types.h b/hypervisor/include/jailhouse/types.h
49index 6d78ad6d..f79d7428 100644
50--- a/hypervisor/include/jailhouse/types.h
51+++ b/hypervisor/include/jailhouse/types.h
52@@ -19,7 +19,9 @@
53
54 #ifndef __ASSEMBLY__
55
56+#if __GNUC__ < 15
57 typedef enum { true = 1, false = 0 } bool;
58+#endif
59
60 /** Describes a CPU set. */
61 struct cpu_set {
62diff --git a/include/jailhouse/cell-config.h b/include/jailhouse/cell-config.h
63index 17d59306..affce1c2 100644
64--- a/include/jailhouse/cell-config.h
65+++ b/include/jailhouse/cell-config.h
66@@ -91,7 +91,7 @@
67 * structure.
68 */
69 struct jailhouse_cell_desc {
70- char signature[5];
71+ char signature[5] __attribute__ ((nonstring));
72 __u8 architecture;
73 __u16 revision;
74
75@@ -330,7 +330,7 @@ struct jailhouse_pio {
76 * General descriptor of the system.
77 */
78 struct jailhouse_system {
79- char signature[5];
80+ char signature[5] __attribute__ ((nonstring));
81 __u8 architecture;
82 __u16 revision;
83
84diff --git a/include/jailhouse/hypercall.h b/include/jailhouse/hypercall.h
85index 07574d3d..cf58a4c9 100644
86--- a/include/jailhouse/hypercall.h
87+++ b/include/jailhouse/hypercall.h
88@@ -107,7 +107,7 @@
89
90 #define COMM_REGION_GENERIC_HEADER \
91 /** Communication region magic JHCOMM */ \
92- char signature[6]; \
93+ char signature[6] __attribute__ ((nonstring)); \
94 /** Communication region ABI revision */ \
95 __u16 revision; \
96 /** Cell state, initialized by hypervisor, updated by cell. */ \
97diff --git a/inmates/lib/include/inmate_common.h b/inmates/lib/include/inmate_common.h
98index 1c20a0af..43cd7a20 100644
99--- a/inmates/lib/include/inmate_common.h
100+++ b/inmates/lib/include/inmate_common.h
101@@ -84,7 +84,9 @@ typedef u32 __u32;
102 typedef s64 __s64;
103 typedef u64 __u64;
104
105+#if __GNUC__ < 15
106 typedef enum { true = 1, false = 0 } bool;
107+#endif
108
109 #include <jailhouse/hypercall.h>
110
111--
1122.34.1
113
diff --git a/recipes-extended/jailhouse/files/0002-YOCIMX-9281-2-hypervisor-arm64-fix-strh-usage.patch b/recipes-extended/jailhouse/files/0002-YOCIMX-9281-2-hypervisor-arm64-fix-strh-usage.patch
new file mode 100644
index 000000000..4c8fefa36
--- /dev/null
+++ b/recipes-extended/jailhouse/files/0002-YOCIMX-9281-2-hypervisor-arm64-fix-strh-usage.patch
@@ -0,0 +1,34 @@
1From 98f6f8dc23d6b3d4fe5b15045ccb3d3ef36747be Mon Sep 17 00:00:00 2001
2From: Peng Fan <peng.fan@nxp.com>
3Date: Mon, 25 Aug 2025 09:48:05 +0800
4Subject: [PATCH 2/2] YOCIMX-9281-2: hypervisor: arm64: fix strh usage
5
6hypervisor/arch/arm64/entry.S:555: Error: immediate offset out of range
7
8Per ARM spec:
9STRH (immediate)
10<pimm> Is the optional positive immediate byte offset, a multiple of 2 in
11the range 0 to 8190, defaulting to 0 and encoded in the "imm12" field
12as <pimm>/2.
13
14So align sdei_event to 2 bytes aligned.
15
16Upstream-Status: Pending
17Signed-off-by: Peng Fan <peng.fan@nxp.com>
18---
19 hypervisor/arch/arm64/include/asm/percpu_fields.h | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/hypervisor/arch/arm64/include/asm/percpu_fields.h b/hypervisor/arch/arm64/include/asm/percpu_fields.h
23index 32f42a53..844a9417 100644
24--- a/hypervisor/arch/arm64/include/asm/percpu_fields.h
25+++ b/hypervisor/arch/arm64/include/asm/percpu_fields.h
26@@ -18,4 +18,4 @@
27 bool suspended; \
28 bool suspending; \
29 bool resuming; \
30- bool sdei_event;
31+ bool sdei_event __attribute__((aligned(2)));
32--
332.34.1
34
diff --git a/recipes-extended/jailhouse/jailhouse-imx_git.bb b/recipes-extended/jailhouse/jailhouse-imx_git.bb
index a955c8fd3..7edc95b92 100644
--- a/recipes-extended/jailhouse/jailhouse-imx_git.bb
+++ b/recipes-extended/jailhouse/jailhouse-imx_git.bb
@@ -16,12 +16,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \
16PROVIDES = "jailhouse" 16PROVIDES = "jailhouse"
17RPROVIDES:${PN} += "jailhouse" 17RPROVIDES:${PN} += "jailhouse"
18 18
19SRCBRANCH = "lf-6.6.52_2.2.0" 19SRCBRANCH = "lf-6.12.3_1.0.0"
20SRCREV = "44dd492a745cd8b8313fb6c7c03fb45a36d70e8a" 20SRCREV = "a68ba027402013ae444544d33ae676ddce9a6bbf"
21
22PV = "2023.03+git${SRCPV}"
21 23
22IMX_JAILHOUSE_SRC ?= "git://github.com/nxp-imx/imx-jailhouse.git;protocol=https" 24IMX_JAILHOUSE_SRC ?= "git://github.com/nxp-imx/imx-jailhouse.git;protocol=https"
23SRC_URI = "${IMX_JAILHOUSE_SRC};branch=${SRCBRANCH} \ 25SRC_URI = "${IMX_JAILHOUSE_SRC};branch=${SRCBRANCH} \
24 file://arm-arm64-Makefile-Remove-march-option-from-Makefile.patch \ 26 file://arm-arm64-Makefile-Remove-march-option-from-Makefile.patch \
27 file://0001-YOCIMX-9281-1-Fix-gcc15-errors.patch \
28 file://0002-YOCIMX-9281-2-hypervisor-arm64-fix-strh-usage.patch \
25 " 29 "
26 30
27DEPENDS = " \ 31DEPENDS = " \
@@ -106,6 +110,12 @@ RDEPENDS:pyjailhouse = " \
106 python3-shell \ 110 python3-shell \
107" 111"
108 112
109INSANE_SKIP:${PN} = "ldflags" 113INSANE_SKIP:${PN} = "ldflags buildpaths"
114INSANE_SKIP:${PN}-dbg = "buildpaths"
115
116# The QA error in package kernel-module-${KERNEL_VERSION} cannot be skipped with
117# INSANE_SKIP, so adjust at the ERROR_QA level
118ERROR_QA:remove = "buildpaths"
119INSANE_SKIP:kernel-module-${KERNEL_VERSION} = "buildpaths"
110 120
111COMPATIBLE_MACHINE = "(mx8m-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)" 121COMPATIBLE_MACHINE = "(mx8m-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)"