diff --git a/sys/arm64/arm64/genassym.c b/sys/arm64/arm64/genassym.c index 646752c742ec..818c0e371f10 100644 --- a/sys/arm64/arm64/genassym.c +++ b/sys/arm64/arm64/genassym.c @@ -34,8 +34,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +/* Sizeof arm64_bootparams, rounded to keep stack alignment */ +ASSYM(BOOTPARAMS_SIZE, roundup2(sizeof(struct arm64_bootparams), + STACKALIGNBYTES + 1)); +ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, modulep)); +ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, kern_l1pt)); +ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); +ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); +ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams,kern_l0pt)); + ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 8b8cc4e7e8c2..9ed76fb8f688 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -153,18 +153,18 @@ virtdone: sub x26, x26, x29 sub x24, x24, x29 - sub sp, sp, #(64 * 4) + sub sp, sp, #BOOTPARAMS_SIZE mov x0, sp /* Degate the delda so it is VA -> PA */ neg x29, x29 - str x1, [x0] /* modulep */ - str x26, [x0, 8] /* kern_l1pt */ - str x29, [x0, 16] /* kern_delta */ + str x1, [x0, #BP_MODULEP] + str x26, [x0, #BP_KERN_L1PT] + str x29, [x0, #BP_KERN_DELTA] adr x25, initstack - str x25, [x0, 24] /* kern_stack */ - str x24, [x0, 32] /* kern_l0pt */ + str x25, [x0, #BP_KERN_STACK] + str x24, [x0, #BP_KERN_L0PT] /* trace back starts here */ mov fp, #0