Date: Wed, 15 Aug 2018 11:55:58 +0200 From: "O. Hartmann" <ohartmann@walstatt.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: current@freebsd.org Subject: Re: EFIRT on machines with pcid after r337773 Message-ID: <20180815115550.00f73ab9@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <20180814221755.GV2340@kib.kiev.ua>
index | next in thread | previous in thread | raw e-mail
On Wed, 15 Aug 2018 01:17:55 +0300
Konstantin Belousov <kostikbel@gmail.com> wrote:
> If you use UEFI boot, have EFIRT compiled in kernel (the case of
> GENERIC) or pre-loaded as module, and efirt is not disabled by a tunable,
> and the machine resets during kernel initialization, try this.
>
> diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
> index d5d795ab502..c9334eab916 100644
> --- a/sys/amd64/amd64/pmap.c
> +++ b/sys/amd64/amd64/pmap.c
> @@ -1188,7 +1188,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
> kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN;
> kernel_pmap->pm_pcids[i].pm_gen = 1;
> }
> - PCPU_SET(pcid_next, PMAP_PCID_KERN + 1);
> + PCPU_SET(pcid_next, PMAP_PCID_KERN + 2);
> PCPU_SET(pcid_gen, 1);
> /*
> * pcpu area for APs is zeroed during AP startup.
> @@ -2651,8 +2651,8 @@ pmap_pinit0(pmap_t pmap)
> bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
> pmap->pm_flags = pmap_flags;
> CPU_FOREACH(i) {
> - pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE;
> - pmap->pm_pcids[i].pm_gen = 0;
> + pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN + 1;
> + pmap->pm_pcids[i].pm_gen = 1;
> if (!pti) {
> __pcpu[i].pc_kcr3 = PMAP_NO_CR3;
> __pcpu[i].pc_ucr3 = PMAP_NO_CR3;
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Is this patch going to hit the tree soon? Since it seems crucial to UEFI
booting systems having options EFIRT set in the kernel (as GENERIC does).
Regards,
oh
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180815115550.00f73ab9>
