[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-08-28 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

longw...@incore.de changed:

   What|Removed |Added

 Status|New |Closed
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-16 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #12 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kib
Date: Tue Apr 16 17:16:19 UTC 2019
New revision: 346284
URL: https://svnweb.freebsd.org/changeset/base/346284

Log:
  MFC r346062:
  pci_cfgreg.c: Use io port config access for early boot time.

  PR:   236838

Changes:
_U  stable/12/
  stable/12/sys/amd64/pci/pci_cfgreg.c
  stable/12/sys/i386/pci/pci_cfgreg.c
  stable/12/sys/x86/include/pci_cfgreg.h
  stable/12/sys/x86/x86/legacy.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #11 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kib
Date: Tue Apr  9 18:07:18 UTC 2019
New revision: 346062
URL: https://svnweb.freebsd.org/changeset/base/346062

Log:
  pci_cfgreg.c: Use io port config access for early boot time.

  Some early PCIe chipsets are explicitly listed in the white-list to
  enable use of the MMIO config space accesses, perhaps because ACPI
  tables were not reliable source of the base MCFG address at that time.
  For that chipsets, MCFG base was read from the known chipset MCFGbase
  config register.

  During very early stage of boot, when access to the PCI config space
  is performed (see e.g. pci_early_quirks.c), we cannot map 255MB of
  registers because the method used with pre-boot pmap overflows initial
  kernel page tables.

  Move fallback to read MCFGbase to the attachment method of the
  x86/legacy device, which removes code duplication, and results in the
  use of io accesses until MCFG is parsed or legacy attach called.

  For amd64, pre-initialize cfgmech with CFGMECH_1, right now we
  dynamically assign CFGMECH_1 to it anyway, and remove checks for
  CFGMECH_NONE.

  There is a mention in the Intel documentation for corresponding
  chipsets that OS must use either io port or MMIO access method, but we
  already break this rule by reading MCFGbase register, so one more
  access seems to be innocent.

  Reported by:  longw...@incore.de
  PR:   236838
  Reviewed by:  avg (other version), jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D19833

Changes:
  head/sys/amd64/pci/pci_cfgreg.c
  head/sys/i386/pci/pci_cfgreg.c
  head/sys/x86/include/pci_cfgreg.h
  head/sys/x86/x86/legacy.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-05 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #10 from Konstantin Belousov  ---
I put a review to allow some more eyes on this patch.

https://reviews.freebsd.org/D19833

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-05 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #9 from longw...@incore.de ---
I can confirm the patch based on the variable pmap_initialized works for my
older hardware with vid=0x8086 and did=0x3590. The hang without the patch was
in the function pcie_cfgregopen().

For my other servers with vid=0x8086 and did=0x25d8 (E5420) the check for
pmap_initialized triggers also, I suppose this is ok.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: [Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-04 Thread Bruce Evans

On Thu, 4 Apr 2019 a bug that dpesnt want repl...@freebsd.org wrote:


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #5 from longw...@incore.de ---
Created attachment 203384
 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203384=edit
Output serial console of full verbose boot

I use amd64, the commit r340224 (r339979) does only affect amd64. Removing the
line with 'case 0x3590' helps, kernel now boots fine. With the patch

--- pci_cfgreg.c.orig   2018-11-26 16:43:04.706033000 +0100
+++ pci_cfgreg.c2019-04-04 11:30:51.847357000 +0200
@@ -90,13 +90,15 @@
* This also implies that it can do PCIe extended config cycles.
*/

+   printf("pci_cfgregopen called\n");
...



together with a 'printf(Calling pci_early_quirks())' in machdep.c and setting
"debug.late_console=0" in loader.conf I got the attached output on the serial
console.


I checked that vt still crashes with debug.late_console=0.  So configuring
vt breaks early console use even for console drivers that work early.

Bruce
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #8 from Konstantin Belousov  ---
Created attachment 203388
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203388=edit
Do not use memory-mapped config space access for PCIe on older chipsets until
pmap is ready to create the mapping.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #7 from Konstantin Belousov  ---
Created attachment 203387
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203387=edit
Do not use memory-mapped config space access for PCIe on older chipsets until
pmap is ready to create the mapping.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #6 from Konstantin Belousov  ---
(In reply to longwitz from comment #5)
I think it is not the 0xce register read which causes the hang, but the need to
map very large (255MB) region by chomping from virtual_avail which causes the
breakage.  You can recheck this by keeping your debugging printfs but reverting
the removal of the case line.

You dmesg shows the
""PCIe: Memory Mapped configuration base @..."
line so the memory-mapped config access method works, and this is what I looked
for when asking for dmesg.

Please try the attached patch, if my understanding is right, it should be
the proper fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #5 from longw...@incore.de ---
Created attachment 203384
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203384=edit
Output serial console of full verbose boot

I use amd64, the commit r340224 (r339979) does only affect amd64. Removing the
line with 'case 0x3590' helps, kernel now boots fine. With the patch

--- pci_cfgreg.c.orig   2018-11-26 16:43:04.706033000 +0100
+++ pci_cfgreg.c2019-04-04 11:30:51.847357000 +0200
@@ -90,13 +90,15 @@
 * This also implies that it can do PCIe extended config cycles.
 */

+   printf("pci_cfgregopen called\n");
/* Check for supported chipsets */
vid = pci_cfgregread(0, 0, 0, PCIR_VENDOR, 2);
+   printf("pci_cfgregopen: vid=%x\n", vid);
did = pci_cfgregread(0, 0, 0, PCIR_DEVICE, 2);
+   printf("pci_cfgregopen: vid=%x\n", did);
switch (vid) {
case 0x8086:
switch (did) {
-   case 0x3590:
case 0x3592:
/* Intel 7520 or 7320 */
pciebar = pci_cfgregread(0, 0, 0, 0xce, 2) << 16;
@@ -112,6 +114,7 @@
}
}

+   printf("pci_cfgregopen returns\n");
return (1);
 }

together with a 'printf(Calling pci_early_quirks())' in machdep.c and setting
"debug.late_console=0" in loader.conf I got the attached output on the serial
console.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #4 from Konstantin Belousov  ---
Are you running i386 or amd64 ? Select right file sys/i386/pci/pci_cfgreg.c or
sys/amd64/pci/pci_cfgreg.c, find the pci_cfgregopen() function and remove the
'case 0x3590:' line.  Does it help ?

Also please show the verbose dmesg from the successful boot.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

longw...@incore.de changed:

   What|Removed |Added

 CC||longw...@incore.de

--- Comment #3 from longw...@incore.de ---
Created attachment 203352
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203352=edit
Output of pciconf -lvcb

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-02 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

--- Comment #2 from Konstantin Belousov  ---
Can you show the output of 'pciconf -lvcb' ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-04-01 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

Ed Maste  changed:

   What|Removed |Added

 CC||ema...@freebsd.org,
   ||k...@freebsd.org

--- Comment #1 from Ed Maste  ---
Reverted commit r340224 is:
MFC r339979: Add pci_early function to detect Intel stolen memory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 236838] Commit r340224 prevents loading the kernel for some Intel Xeon hardware

2019-03-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236838

Bug ID: 236838
   Summary: Commit r340224 prevents loading the kernel for some
Intel Xeon hardware
   Product: Base System
   Version: 12.0-STABLE
  Hardware: amd64
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: kern
  Assignee: b...@freebsd.org
  Reporter: longw...@incore.de

I run GENERIC kernel of 12.0-STABLE FreeBSD 12.0-STABLE #1 r345004M on
different hardware. On one type I must revert commit r340224, otherwise the
kernel hangs at boot without giving any message. This hardware is

CPU: Intel(R) Xeon(TM) CPU 3.60GHz (3591.07-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0xf43  Family=0xf  Model=0x4  Stepping=3
 
Features=0xbfebfbff
  Features2=0x659d
  AMD Features=0x20100800
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 8287981568 (7904 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s) x 2 hardware threads

>From pciconf -lv:
vgapci0@pci0:5:12:0:class=0x03 card=0x10798086 chip=0x47521002 rev=0x27
hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Rage 3 [Rage XL PCI]'
class  = display
subclass   = VGA

I use kern.vty=sc, but same problem with vt. Also the problem is independent of
the loader (forth or lua).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"