mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-23 03:51:05 +01:00
arm64: Remove the E2H check from has_hyp
This was added to not use the physical timer when E2H was set. As we now use the correct timer in this case we can remove this extra check. Tested by: kevans Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D46086
This commit is contained in:
parent
213eb102ae
commit
db6e3260a8
@ -42,7 +42,6 @@ ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, modulep));
|
||||
ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack));
|
||||
ASSYM(BP_KERN_TTBR0, offsetof(struct arm64_bootparams, kern_ttbr0));
|
||||
ASSYM(BP_BOOT_EL, offsetof(struct arm64_bootparams, boot_el));
|
||||
ASSYM(BP_HCR_EL2, offsetof(struct arm64_bootparams, hcr_el2));
|
||||
|
||||
ASSYM(PCPU_SIZE, sizeof(struct pcpu));
|
||||
ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
|
||||
|
@ -134,7 +134,6 @@ virtdone:
|
||||
str x25, [x0, #BP_KERN_STACK]
|
||||
str x27, [x0, #BP_KERN_TTBR0]
|
||||
str x23, [x0, #BP_BOOT_EL]
|
||||
str x4, [x0, #BP_HCR_EL2]
|
||||
|
||||
#ifdef KASAN
|
||||
/* Save bootparams */
|
||||
|
@ -131,7 +131,6 @@ static struct trapframe proc0_tf;
|
||||
int early_boot = 1;
|
||||
int cold = 1;
|
||||
static int boot_el;
|
||||
static uint64_t hcr_el2;
|
||||
|
||||
struct kva_md_info kmi;
|
||||
|
||||
@ -207,12 +206,7 @@ pan_enable(void)
|
||||
bool
|
||||
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 == CURRENTEL_EL_EL2 && (hcr_el2 & HCR_E2H) == 0);
|
||||
return (boot_el == CURRENTEL_EL_EL2);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -905,7 +899,6 @@ initarm(struct arm64_bootparams *abp)
|
||||
TSRAW(&thread0, TS_ENTER, __func__, NULL);
|
||||
|
||||
boot_el = abp->boot_el;
|
||||
hcr_el2 = abp->hcr_el2;
|
||||
|
||||
/* Parse loader or FDT boot parametes. Determine last used address. */
|
||||
lastaddr = parse_boot_param(abp);
|
||||
|
@ -33,7 +33,6 @@ struct arm64_bootparams {
|
||||
vm_offset_t modulep;
|
||||
vm_offset_t kern_stack;
|
||||
vm_paddr_t kern_ttbr0;
|
||||
uint64_t hcr_el2;
|
||||
int boot_el; /* EL the kernel booted from */
|
||||
int pad;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user