diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2025-08-26 11:52:02 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-26 11:52:02 -0300 |
| commit | 02c684185da1c20dcb41501c198ad6cd5c5f1d54 (patch) | |
| tree | c152c3add81e8083b244aeb0e7cf0984f41f4f2e | |
| parent | d0dfdedb3919ca012066916f6d274b2c23a1b0ec (diff) | |
| parent | c2672fc026f0f71e621bb1d0c29490715ace5c8b (diff) | |
| download | meta-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
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 @@ | |||
| 1 | From 2be7793ca658015470fe0d60c0c973e12ce68d73 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 3 | Date: Thu, 12 Jun 2025 06:49:58 -0700 | ||
| 4 | Subject: [PATCH 1/2] YOCIMX-9281-1: Fix gcc15 errors | ||
| 5 | |||
| 6 | Fix 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 | |||
| 24 | Upstream-Status: Backport [Pending] | ||
| 25 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 26 | Signed-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 | |||
| 35 | diff --git a/hypervisor/include/jailhouse/header.h b/hypervisor/include/jailhouse/header.h | ||
| 36 | index 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. | ||
| 48 | diff --git a/hypervisor/include/jailhouse/types.h b/hypervisor/include/jailhouse/types.h | ||
| 49 | index 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 { | ||
| 62 | diff --git a/include/jailhouse/cell-config.h b/include/jailhouse/cell-config.h | ||
| 63 | index 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 | |||
| 84 | diff --git a/include/jailhouse/hypercall.h b/include/jailhouse/hypercall.h | ||
| 85 | index 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. */ \ | ||
| 97 | diff --git a/inmates/lib/include/inmate_common.h b/inmates/lib/include/inmate_common.h | ||
| 98 | index 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 | -- | ||
| 112 | 2.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 @@ | |||
| 1 | From 98f6f8dc23d6b3d4fe5b15045ccb3d3ef36747be Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peng Fan <peng.fan@nxp.com> | ||
| 3 | Date: Mon, 25 Aug 2025 09:48:05 +0800 | ||
| 4 | Subject: [PATCH 2/2] YOCIMX-9281-2: hypervisor: arm64: fix strh usage | ||
| 5 | |||
| 6 | hypervisor/arch/arm64/entry.S:555: Error: immediate offset out of range | ||
| 7 | |||
| 8 | Per ARM spec: | ||
| 9 | STRH (immediate) | ||
| 10 | <pimm> Is the optional positive immediate byte offset, a multiple of 2 in | ||
| 11 | the range 0 to 8190, defaulting to 0 and encoded in the "imm12" field | ||
| 12 | as <pimm>/2. | ||
| 13 | |||
| 14 | So align sdei_event to 2 bytes aligned. | ||
| 15 | |||
| 16 | Upstream-Status: Pending | ||
| 17 | Signed-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 | |||
| 22 | diff --git a/hypervisor/arch/arm64/include/asm/percpu_fields.h b/hypervisor/arch/arm64/include/asm/percpu_fields.h | ||
| 23 | index 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 | -- | ||
| 33 | 2.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 \ | |||
| 16 | PROVIDES = "jailhouse" | 16 | PROVIDES = "jailhouse" |
| 17 | RPROVIDES:${PN} += "jailhouse" | 17 | RPROVIDES:${PN} += "jailhouse" |
| 18 | 18 | ||
| 19 | SRCBRANCH = "lf-6.6.52_2.2.0" | 19 | SRCBRANCH = "lf-6.12.3_1.0.0" |
| 20 | SRCREV = "44dd492a745cd8b8313fb6c7c03fb45a36d70e8a" | 20 | SRCREV = "a68ba027402013ae444544d33ae676ddce9a6bbf" |
| 21 | |||
| 22 | PV = "2023.03+git${SRCPV}" | ||
| 21 | 23 | ||
| 22 | IMX_JAILHOUSE_SRC ?= "git://github.com/nxp-imx/imx-jailhouse.git;protocol=https" | 24 | IMX_JAILHOUSE_SRC ?= "git://github.com/nxp-imx/imx-jailhouse.git;protocol=https" |
| 23 | SRC_URI = "${IMX_JAILHOUSE_SRC};branch=${SRCBRANCH} \ | 25 | SRC_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 | ||
| 27 | DEPENDS = " \ | 31 | DEPENDS = " \ |
| @@ -106,6 +110,12 @@ RDEPENDS:pyjailhouse = " \ | |||
| 106 | python3-shell \ | 110 | python3-shell \ |
| 107 | " | 111 | " |
| 108 | 112 | ||
| 109 | INSANE_SKIP:${PN} = "ldflags" | 113 | INSANE_SKIP:${PN} = "ldflags buildpaths" |
| 114 | INSANE_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 | ||
| 118 | ERROR_QA:remove = "buildpaths" | ||
| 119 | INSANE_SKIP:kernel-module-${KERNEL_VERSION} = "buildpaths" | ||
| 110 | 120 | ||
| 111 | COMPATIBLE_MACHINE = "(mx8m-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)" | 121 | COMPATIBLE_MACHINE = "(mx8m-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)" |
