arm64: Stop trashing the padding after boot_el

When building struct arm64_bootparams to pass to initarm we store the
boot_el field as a 64-bit value, however it is defined as an int which
is 32-bits.

Switch to store using the 'w' register as this will store a correctly
sized value.

Previously this would trash the trailing padding, so is only a
correctness issue.

Reviewed by:	emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D58988
This commit is contained in:
Andrew Turner committed 2026-08-24 15:45:18 +01:00
1 parent 4aeed6e9d2
commit d1bd7d37cd
1 file changed
+1 -1
+1 -1
View File
@@ -156,7 +156,7 @@ virtdone:
add x25, x25, :lo12:initstack
str x25, [x0, #BP_KERN_STACK]
str x27, [x0, #BP_KERN_TTBR0]
str x23, [x0, #BP_BOOT_EL]
str w23, [x0, #BP_BOOT_EL]
/* Set these before they are used in kasan_init_early */
adrp x1, pmap_sh_attr