On Sat, Oct 24, 2015 at 11:48:01PM +0200, Mark Kettenis wrote:
> The diff below makes inteldrm(4) attach directly to pci(4) instead of
> vga(1). Because inteldrm(4) depends on intagp(4), this also make
> intagp(4) a child of inteldrm(4). Ultimately I'd like to integrate
> intagp(4) into inteldrm(4), but that's going to be a bit more work.
>
> This diff is needed to make inteldrm(4) work when OpenBSD gets booted
> by UEFI firmware. It will also make inteldrm(4) work on machines with
> discrete graphics.
>
> This diff needs to be tested on a wide range of hardware. So if you
> have a machine with inteldrm(4), please give it a shot. I'm
> particularly interested in testing on an x40.
x40 before the diff:
vga1 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xe0000000, size 0x8000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: apic 1 int 16
inteldrm0: 1024x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82855GM Video" rev 0x02 at pci0 dev 2 function 1 not configured
after with serial console:
inteldrm0 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xe0000000, size 0x8000000
drm0 at inteldrm0
inteldrm0: can't map mmio space
inteldrm1 at pci0 dev 2 function 1 "Intel 82855GM Video" rev 0x02
intagp at inteldrm1 not configured
drm1 at inteldrm1
inteldrm1: couldn't map interrupt
Memory manager not clean. Delaying takedown
video mode doesn't switch and can't change to vt, goes
multiuser and can login via ssh.
With glass console it hangs after "root on wd0a" with no mode
switch.
0:2:0: Intel 82855GM Video
0x0000: Vendor ID: 8086 Product ID: 3582
0x0004: Command: 0007 Status: 0090
0x0008: Class: 03 Subclass: 00 Interface: 00 Revision: 02
0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00
0x0010: BAR mem prefetchable 32bit addr: 0xe0000000/0x08000000
0x0014: BAR mem 32bit addr: 0xd0000000/0x00080000
0x0018: BAR io addr: 0x00001800/0x0008
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1014 Product ID: 0557
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
0x00d0: Capability 0x01: Power Management
0:2:1: Intel 82855GM Video
0x0000: Vendor ID: 8086 Product ID: 3582
0x0004: Command: 0003 Status: 0090
0x0008: Class: 03 Subclass: 80 Interface: 00 Revision: 02
0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00
0x0010: BAR mem prefetchable 32bit addr: 0xe8000000/0x08000000
0x0014: BAR mem 32bit addr: 0xd0080000/0x00080000
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 1014 Product ID: 0557
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
0x00d0: Capability 0x01: Power Management