Date: Wed, 21 Feb 2024 12:40:25 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 58df49801d9d - main - arm64: Fix the has_hyp check Message-ID: <202402211240.41LCePmx040031@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=58df49801d9d58e61cc2adc8fd1e6848b64d2453 commit 58df49801d9d58e61cc2adc8fd1e6848b64d2453 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-02-21 12:38:49 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-02-21 12:38:49 +0000 arm64: Fix the has_hyp check boot_el is now the CurrentEL.EL field value. Use the new macros to implement the has_hyp() check. Sponsored by: Arm Ltd --- sys/arm64/arm64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index c7f451543687..2716182ca442 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -212,7 +212,7 @@ has_hyp(void) * XXX The E2H check is wrong, but it's close enough for now. Needs to * be re-evaluated once we're running regularly in EL2. */ - return (boot_el == 2 && (hcr_el2 & HCR_E2H) == 0); + return (boot_el == CURRENTEL_EL_EL2 && (hcr_el2 & HCR_E2H) == 0); } bool
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402211240.41LCePmx040031>