Re: EFIRT on machines with pcid after r337773
On Wed, Aug 15, 2018, Konstantin Belousov 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. > Patch fixed boot hanging for me on HP ProBook 430 G2. Thanks -- Regards, | "In theory there is no difference between theory Vladimir Zakharov | and practice. In practice there is."- Yogi Berra ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: EFIRT on machines with pcid after r337773
Am 15.08.2018 um 00:17 schrieb Konstantin Belousov: 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; Thanks a lot! Just wanted to confirm this fixed booting _without_ "efi.rt.disabled=1" for me: ---<>--- Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-FP0_ALPHA1 #0 r337804M: Wed Aug 15 12:14:43 CEST 2018 h...@preed.egn.mo1.omnilan.net:/usr/local/share/deploy-tools/obj/HEAD-HWLYNX/usr/local/share/deploy-tools/HEAD/src/amd64.amd64/ sys/HWLYNX.titan amd64 FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) WARNING: WITNESS option enabled, expect reduced performance. VT(efifb): resolution 1600x1200 link_elf_obj: symbol critical_enter undefined KLD file vboxdrv.ko - could not finalize loading info: [drm] Initialized drm 1.1.0 20060810 CPU: Intel(R) Core(TM) i3-4330 CPU @ 3.50GHz (3491.98-MHz K8-class CPU) Origin="GenuineIntel" Id=0x306c3 Family=0x6 Model=0x3c Stepping=3 Features=0xbfebfbff Features2=0x7fdafbbf AMD Features=0x2c100800 AMD Features2=0x21 Structured Extended Features=0x27ab Structured Extended Features3=0xc00 XSAVE Features=0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 17179869184 (16384 MB) avail memory = 16288931840 (15534 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads random: unblocking device. ioapic0 irqs 0-23 on motherboard Launching APs: 1 3 2 Timecounter "TSC-low" frequency 1745992496 Hz quality 1000 Cuse v0.1.35 @ /dev/cuse random: entropy device external interface random: registering fast source Intel Secure Key RNG random: fast provider: "Intel Secure Key RNG" kbd1 at kbdmux0 netmap: loaded module module_register_init: MOD_LOAD (vesa, 0x80b6f400, 0) error 19 nexus0 efirtc0: on motherboard efirtc0: registered as a time-of-day clock, resolution 1.00s Curious what this means: smbios0: SMBIOS checksum failed. Has always been there on this LynxPoint/Haswell machine... thanks, -harry ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: EFIRT on machines with pcid after r337773
On Wed, 15 Aug 2018 01:17:55 +0300 Konstantin Belousov 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-unsubscr...@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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: EFIRT on machines with pcid after r337773
Hi! Seems like this patch fixed the boot issue on Dell e5440 with UEFI. Once you get to MFC, please X-MFC-with the following patch: commit dfe1112fa878c5d8fa0605d1de10c96ecc993569 Author: rlibby Date: Fri Jul 21 17:11:36 2017 + __pcpu: gcc -Wredundant-decls Pollution from counter.h made __pcpu visible in amd64/pmap.c. Delete the existing extern decl of __pcpu in amd64/pmap.c and avoid referring to that symbol, instead accessing the pcpu region via PCPU_SET macros. Also delete an unused extern decl of __pcpu from mp_x86.c. Reviewed by:kib Approved by:markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11666 Notes: svn path=/head/; revision=321335 On 8/15/18, Konstantin Belousov 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-unsubscr...@freebsd.org" > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
EFIRT on machines with pcid after r337773
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-unsubscr...@freebsd.org"