inteldrm(4) diff that needs testing

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

inteldrm(4) diff that needs testing

Mark Kettenis
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.


Index: arch/amd64/conf/GENERIC
===================================================================
RCS file: /cvs/src/sys/arch/amd64/conf/GENERIC,v
retrieving revision 1.398
diff -u -p -r1.398 GENERIC
--- arch/amd64/conf/GENERIC 30 Sep 2015 12:24:44 -0000 1.398
+++ arch/amd64/conf/GENERIC 9 Oct 2015 20:40:52 -0000
@@ -300,15 +300,16 @@ wsdisplay0 at vga? console 1
 wskbd* at pckbd? mux 1
 wsmouse* at pms? mux 0
 
-intagp* at vga? # intel integrated graphics
 #mmuagp* at pchb? # amd64 mmu agp.
-
-agp* at intagp?
 #agp* at mmuagp?
 
-inteldrm* at vga? # Intel i915, i945 DRM driver
+inteldrm* at pci? # Intel i915, i945 DRM driver
+intagp* at inteldrm?
+agp* at intagp?
 drm0 at inteldrm? console 1
 drm* at inteldrm?
+wsdisplay0 at inteldrm? console 1
+wsdisplay* at inteldrm?
 radeondrm* at pci? # ATI Radeon DRM driver
 drm0 at radeondrm? console 1
 drm* at radeondrm?
Index: arch/amd64/conf/files.amd64
===================================================================
RCS file: /cvs/src/sys/arch/amd64/conf/files.amd64,v
retrieving revision 1.81
diff -u -p -r1.81 files.amd64
--- arch/amd64/conf/files.amd64 4 Sep 2015 23:22:56 -0000 1.81
+++ arch/amd64/conf/files.amd64 9 Oct 2015 16:36:41 -0000
@@ -133,7 +133,7 @@ attach amas at pci
 file dev/pci/amas.c amas
 
 # AGP bridge support. most attach at pchb
-file arch/amd64/pci/agp_machdep.c agp
+file arch/amd64/pci/agp_machdep.c agp | inteldrm
 
 #
 # CARDBUS
Index: arch/i386/conf/GENERIC
===================================================================
RCS file: /cvs/src/sys/arch/i386/conf/GENERIC,v
retrieving revision 1.806
diff -u -p -r1.806 GENERIC
--- arch/i386/conf/GENERIC 30 Sep 2015 12:15:12 -0000 1.806
+++ arch/i386/conf/GENERIC 10 Oct 2015 15:50:43 -0000
@@ -358,7 +358,6 @@ wsdisplay0 at pcdisplay? console 1
 wskbd* at pckbd? mux 1
 wsmouse* at pms? mux 0
 
-intagp* at vga? # intel integrated graphics agp
 aliagp* at pchb?
 amdagp* at pchb?
 intelagp* at pchb?
@@ -366,7 +365,6 @@ sisagp* at pchb?
 viaagp* at pchb?
 #mmuagp* at pchb?
 
-agp* at intagp? # AGP bridges
 agp* at aliagp? # AGP bridges
 agp* at amdagp? # AGP bridges
 agp* at intelagp? # AGP bridges
@@ -374,9 +372,13 @@ agp* at sisagp? # AGP bridges
 agp* at viaagp? # AGP bridges
 #agp* at mmuagp?
 
-inteldrm* at vga? # Intel i915, i945 DRM driver
+inteldrm* at pci? # Intel i915, i945 DRM driver
+intagp* at inteldrm?
+agp* at intagp?
 drm0 at inteldrm? console 1
 drm* at inteldrm?
+wsdisplay0 at inteldrm? console 1
+wsdisplay* at inteldrm?
 radeondrm* at pci? # ATI Radeon DRM driver
 drm0 at radeondrm? console 1
 drm* at radeondrm?
Index: arch/i386/conf/files.i386
===================================================================
RCS file: /cvs/src/sys/arch/i386/conf/files.i386,v
retrieving revision 1.226
diff -u -p -r1.226 files.i386
--- arch/i386/conf/files.i386 20 Aug 2015 04:41:46 -0000 1.226
+++ arch/i386/conf/files.i386 24 Oct 2015 21:28:00 -0000
@@ -113,7 +113,7 @@ attach  amas at pci
 file    dev/pci/amas.c amas
 
 # AGP bridge support. most attach at pchb
-file arch/i386/pci/agp_machdep.c agp
+file arch/i386/pci/agp_machdep.c agp | inteldrm
 
 # AMD Elan SC520 System Controller (PCI-Host bridge)
 device elansc: gpiobus
Index: dev/pci/agp_i810.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/agp_i810.c,v
retrieving revision 1.91
diff -u -p -r1.91 agp_i810.c
--- dev/pci/agp_i810.c 9 Oct 2015 13:22:54 -0000 1.91
+++ dev/pci/agp_i810.c 24 Oct 2015 21:17:05 -0000
@@ -43,11 +43,7 @@
 #include <dev/pci/pcidevs.h>
 #include <dev/pci/agpvar.h>
 #include <dev/pci/agpreg.h>
-#include <dev/ic/mc6845reg.h>
-#include <dev/ic/pcdisplayvar.h>
-#include <dev/ic/vgareg.h>
-#include <dev/ic/vgavar.h>
-#include <dev/pci/vga_pcivar.h>
+#include <dev/pci/drm/i915/i915_drv.h>
 
 #include <machine/bus.h>
 
@@ -84,7 +80,9 @@ struct agp_i810_softc {
  struct agp_softc *agpdev;
  struct agp_gatt *gatt;
  struct vga_pci_bar *map;
- struct vga_pci_bar *gtt_map;
+ bus_space_tag_t gtt_bst;
+ bus_space_handle_t gtt_bsh;
+ bus_size_t gtt_size;
  bus_dmamap_t scrib_dmamap;
  bus_addr_t isc_apaddr;
  bus_size_t isc_apsize; /* current aperture size */
@@ -241,8 +239,9 @@ agp_i810_attach(struct device *parent, s
  struct agp_i810_softc *isc = (struct agp_i810_softc *)self;
  struct agp_gatt *gatt;
  struct pci_attach_args *pa = aux, bpa;
- struct vga_pci_softc *vga = (struct vga_pci_softc *)parent;
+ struct inteldrm_softc *psc = (struct inteldrm_softc *)parent;
  bus_addr_t mmaddr, gmaddr, tmp;
+ bus_size_t gtt_off = 0;
  pcireg_t memtype, reg;
  u_int32_t stolen;
  u_int16_t gcc1;
@@ -263,11 +262,16 @@ agp_i810_attach(struct device *parent, s
  gmaddr = AGP_I965_GMADR;
  mmaddr = AGP_I965_MMADR;
  memtype = PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT;
+ if (isc->chiptype == CHIP_I965)
+ gtt_off = AGP_I965_GTT;
+ else
+ gtt_off = AGP_G4X_GTT;
  break;
  default:
  gmaddr = AGP_APBASE;
  mmaddr = AGP_I810_MMADR;
  memtype = PCI_MAPREG_TYPE_MEM;
+ gtt_off = AGP_I810_GTT;
  break;
  }
 
@@ -277,20 +281,31 @@ agp_i810_attach(struct device *parent, s
  return;
  }
 
- isc->map = vga_pci_bar_map(vga, mmaddr, 0, BUS_SPACE_MAP_LINEAR);
- if (isc->map == NULL) {
+ isc->map = psc->regs;
+ if (pci_mapreg_map(pa, mmaddr, memtype, BUS_SPACE_MAP_LINEAR,
+    &isc->map->bst, &isc->map->bsh, &isc->map->base,
+    &isc->map->size, gtt_off)) {
  printf("can't map mmadr registers\n");
  return;
  }
 
  if (isc->chiptype == CHIP_I915 || isc->chiptype == CHIP_G33 ||
     isc->chiptype == CHIP_PINEVIEW) {
- isc->gtt_map = vga_pci_bar_map(vga, AGP_I915_GTTADR, 0,
-    BUS_SPACE_MAP_LINEAR);
- if (isc->gtt_map == NULL) {
+ if (pci_mapreg_map(pa, AGP_I915_GTTADR, memtype,
+    BUS_SPACE_MAP_LINEAR, &isc->gtt_bst, &isc->gtt_bsh,
+    NULL, &isc->gtt_size, 0)) {
  printf("can't map gatt registers\n");
  goto out;
  }
+ } else {
+ isc->gtt_bst = isc->map->bst;
+ isc->gtt_size = (isc->isc_apsize >> AGP_PAGE_SHIFT) * 4;
+ if (bus_space_map(isc->gtt_bst, isc->map->base + gtt_off,
+    isc->gtt_size, BUS_SPACE_MAP_LINEAR, &isc->gtt_bsh)) {
+ printf("can't map gatt registers\n");
+ isc->gtt_size = 0;
+ goto out;
+ }
  }
 
  gatt = malloc(sizeof(*gatt), M_AGP, M_NOWAIT | M_ZERO);
@@ -512,6 +527,7 @@ agp_i810_attach(struct device *parent, s
  isc->agpdev = (struct agp_softc *)agp_attach_bus(pa, &agp_i810_methods,
     isc->isc_apaddr, isc->isc_apsize, &isc->dev);
  isc->agpdev->sc_stolen_entries = isc->stolen;
+ bus_space_unmap(isc->map->bst, isc->map->bsh, isc->map->size);
  return;
 out:
 
@@ -521,10 +537,10 @@ out:
     isc->gatt->ag_dmamap, &isc->gatt->ag_dmaseg);
  free(isc->gatt, M_AGP, sizeof (*isc->gatt));
  }
- if (isc->gtt_map != NULL)
- vga_pci_bar_unmap(isc->gtt_map);
- if (isc->map != NULL)
- vga_pci_bar_unmap(isc->map);
+ if (isc->gtt_size != 0)
+ bus_space_unmap(isc->gtt_bst, isc->gtt_bsh, isc->gtt_size);
+ if (isc->map->size != 0)
+ bus_space_unmap(isc->map->bst, isc->map->bsh, isc->map->size);
 }
 
 int
@@ -777,7 +793,7 @@ void
 intagp_write_gtt(struct agp_i810_softc *isc, bus_size_t off, paddr_t v)
 {
  u_int32_t pte = 0;
- bus_size_t baseoff, wroff;
+ bus_size_t wroff;
 
  if (isc->chiptype != CHIP_I810 &&
     (off >> AGP_PAGE_SHIFT) < isc->stolen) {
@@ -800,25 +816,5 @@ intagp_write_gtt(struct agp_i810_softc *
  }
 
  wroff = (off >> AGP_PAGE_SHIFT) * 4;
-
- switch(isc->chiptype) {
- case CHIP_I915:
- /* FALLTHROUGH */
- case CHIP_G33:
- case CHIP_PINEVIEW:
- bus_space_write_4(isc->gtt_map->bst, isc->gtt_map->bsh,
-    wroff, pte);
- return;
- case CHIP_I965:
- baseoff = AGP_I965_GTT;
- break;
- case CHIP_G4X:
- case CHIP_IRONLAKE:
- baseoff = AGP_G4X_GTT;
- break;
- default:
- baseoff = AGP_I810_GTT;
- break;
- }
- bus_space_write_4(isc->map->bst, isc->map->bsh, baseoff + wroff, pte);
+ bus_space_write_4(isc->gtt_bst, isc->gtt_bsh, wroff, pte);
 }
Index: dev/pci/drm/files.drm
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/files.drm,v
retrieving revision 1.33
diff -u -p -r1.33 files.drm
--- dev/pci/drm/files.drm 23 Sep 2015 23:12:11 -0000 1.33
+++ dev/pci/drm/files.drm 9 Oct 2015 20:43:10 -0000
@@ -35,8 +35,8 @@ file dev/pci/drm/ttm/ttm_object.c ttm
 file dev/pci/drm/ttm/ttm_page_alloc.c ttm
 file dev/pci/drm/ttm/ttm_tt.c ttm
 
-device inteldrm: drmbase, wsemuldisplaydev, rasops32, i2cbus, i2c_bitbang
-attach inteldrm at drmdev
+device inteldrm: agpint, drmbase, wsemuldisplaydev, rasops32, i2cbus, i2c_bitbang
+attach inteldrm at pci
 file dev/pci/drm/i915/i915_dma.c inteldrm
 file dev/pci/drm/i915/i915_drv.c inteldrm
 file dev/pci/drm/i915/i915_gem.c inteldrm
Index: dev/pci/drm/i915/i915_drv.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.c,v
retrieving revision 1.94
diff -u -p -r1.94 i915_drv.c
--- dev/pci/drm/i915/i915_drv.c 17 Oct 2015 21:41:12 -0000 1.94
+++ dev/pci/drm/i915/i915_drv.c 24 Oct 2015 21:19:51 -0000
@@ -497,7 +497,9 @@ i915_get_device_id(int device)
 int
 inteldrm_probe(struct device *parent, void *match, void *aux)
 {
- return (drm_pciprobe((struct pci_attach_args *)aux, pciidlist));
+ if (drm_pciprobe(aux, pciidlist))
+ return 20;
+ return 0;
 }
 
 static int
@@ -954,6 +956,12 @@ int i915_reset(struct drm_device *dev)
  return 0;
 }
 
+#include "intagp.h"
+
+#if NINTAGP > 0
+int intagpsubmatch(struct device *, void *, void *);
+int intagp_print(void *, const char *);
+#endif
 
 int inteldrm_wsioctl(void *, u_long, caddr_t, int, struct proc *);
 paddr_t inteldrm_wsmmap(void *, off_t, int);
@@ -1183,18 +1191,27 @@ void
 inteldrm_attach(struct device *parent, struct device *self, void *aux)
 {
  struct inteldrm_softc *dev_priv = (struct inteldrm_softc *)self;
- struct vga_pci_softc *vga_sc = (struct vga_pci_softc *)parent;
  struct pci_attach_args *pa = aux;
  struct rasops_info *ri = &dev_priv->ro;
  struct wsemuldisplaydev_attach_args aa;
- extern int wsdisplay_console_initted;
- struct vga_pci_bar *bar;
+ extern int vga_console_attached;
  struct drm_device *dev;
  const struct intel_device_info *info;
  int ret = 0, mmio_bar, mmio_size;
+ pcireg_t mmio_type;
  uint32_t aperture_size;
+ int console = 0;
  int i;
 
+ if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY &&
+    PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_DISPLAY_VGA &&
+    (pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG)
+    & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE))
+    == (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) {
+ console = 1;
+ vga_console_attached = 1;
+ }
+
  info = i915_get_device_id(PCI_PRODUCT(pa->pa_id));
  KASSERT(info->gen != 0);
 
@@ -1205,17 +1222,23 @@ inteldrm_attach(struct device *parent, s
  dev_priv->dmat = pa->pa_dmat;
  dev_priv->bst = pa->pa_memt;
  dev_priv->memex = pa->pa_memex;
+ dev_priv->regs = &dev_priv->bar;
 
  printf("\n");
 
  if (dev_priv->info->gen >= 6)
  inteldrm_driver.flags &= ~(DRIVER_AGP | DRIVER_AGP_REQUIRE);
+#if NINTAGP > 0
+ else {
+ config_found_sm(self, aux, intagp_print, intagpsubmatch);
+ }
+#endif
 
  inteldrm_driver.num_ioctls = i915_max_ioctl;
 
  /* All intel chipsets need to be treated as agp, so just pass one */
  dev = dev_priv->dev = (struct drm_device *)
-    drm_attach_pci(&inteldrm_driver, pa, 1, 1, self);
+    drm_attach_pci(&inteldrm_driver, pa, 1, console, self);
 
  intel_gtt_chipset_setup(dev);
  mtx_init(&mchdev_lock, IPL_TTY);
@@ -1262,16 +1285,11 @@ inteldrm_attach(struct device *parent, s
  else
  mmio_size = 2*1024*1024;
 
- /* we need to use this api for now due to sharing with intagp */
- bar = vga_pci_bar_info(vga_sc, mmio_bar);
- if (bar == NULL) {
- printf("%s: can't get BAR info\n",
-    dev_priv->sc_dev.dv_xname);
- goto free_priv;
- }
-
- dev_priv->regs = vga_pci_bar_map(vga_sc, bar->addr, mmio_size, 0);
- if (dev_priv->regs == NULL) {
+ mmio_bar = 0x10 + mmio_bar * 0x04;
+ mmio_type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, mmio_bar);
+ if (pci_mapreg_map(pa, mmio_bar, mmio_type, 0, &dev_priv->regs->bst,
+    &dev_priv->regs->bsh, &dev_priv->regs->base,
+    &dev_priv->regs->size, mmio_size)) {
  printf("%s: can't map mmio space\n",
     dev_priv->sc_dev.dv_xname);
  goto free_priv;
@@ -1473,23 +1491,22 @@ inteldrm_attach(struct device *parent, s
  inteldrm_stdscreen.fontwidth = ri->ri_font->fontwidth;
  inteldrm_stdscreen.fontheight = ri->ri_font->fontheight;
 
- aa.console = 0;
+ aa.console = console;
  aa.scrdata = &inteldrm_screenlist;
  aa.accessops = &inteldrm_accessops;
  aa.accesscookie = dev_priv;
  aa.defaultscreens = 0;
 
- if (wsdisplay_console_initted) {
+ if (console) {
  long defattr;
 
  ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
  wsdisplay_cnattach(&inteldrm_stdscreen, ri->ri_active,
     0, 0, defattr);
- aa.console = 1;
  }
 
- vga_sc->sc_type = -1;
- config_found(parent, &aa, wsemuldisplaydevprint);
+ config_found_sm(self, &aa, wsemuldisplaydevprint,
+    wsemuldisplaydevsubmatch);
  return;
 
 out_power_well:
@@ -1524,7 +1541,8 @@ out_regs:
 #ifdef __linux__
  pci_iounmap(dev->pdev, dev_priv->regs);
 #else
- vga_pci_bar_unmap(dev_priv->regs);
+ bus_space_unmap(dev_priv->regs->bst, dev_priv->regs->bsh,
+    dev_priv->regs->size);
 #endif
 free_priv:
  dev->dev_private = NULL;
@@ -1556,7 +1574,8 @@ inteldrm_detach(struct device *self, int
  pci_intr_disestablish(dev_priv->pc, dev_priv->irqh);
 
  if (dev_priv->regs != NULL)
- vga_pci_bar_unmap(dev_priv->regs);
+ bus_space_unmap(dev_priv->regs->bst, dev_priv->regs->bsh,
+    dev_priv->regs->size);
 
  return (0);
 }
Index: dev/pci/drm/i915/i915_drv.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.h,v
retrieving revision 1.70
diff -u -p -r1.70 i915_drv.h
--- dev/pci/drm/i915/i915_drv.h 17 Oct 2015 21:41:12 -0000 1.70
+++ dev/pci/drm/i915/i915_drv.h 24 Oct 2015 20:42:44 -0000
@@ -1457,6 +1457,7 @@ typedef struct inteldrm_softc {
  pci_intr_handle_t ih;
  void *irqh;
 
+ struct vga_pci_bar bar;
  struct vga_pci_bar *regs;
 
  int nscreens;

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Jonathan Gray-11
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

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Philip Guenther-2
In reply to this post by Mark Kettenis
On Sat, Oct 24, 2015 at 2:48 PM, Mark Kettenis <[hidden email]> 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.

dmesg from Thinkpad Yoga12, booting in compat mode (not UEFI), below.
I didn't save a dmesg from immediately before, but at least back in
June intagp was reported as "intagp at vga1 not configured".  If you
need a dmesg from kernel without this, let me know...

Philip Guenther


OpenBSD 5.8-current (LOCAL) #26: Sat Oct 24 23:19:11 PDT 2015
    [hidden email]:/usr/src/sys-clean/arch/amd64/compile/LOCAL
RTC BIOS diagnostic error 80<clock_battery>
real mem = 8204083200 (7824MB)
avail mem = 7951233024 (7582MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xccbfd000 (63 entries)
bios0: vendor LENOVO version "JEET58WW (1.07 )" date 02/02/2015
bios0: LENOVO 20DL003AUS
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC ASF! HPET APIC MCFG WDAT SSDT SSDT SSDT
SSDT SSDT SSDT PCCT SSDT TCPA SSDT UEFI MSDM BATB FPDT UEFI
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4)
PEG2(S4) GLAN(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S4) PXSX(S4)
RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.62 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.23 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.23 MHz
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2494.23 MHz
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 2 (RP01)
acpiprt5 at acpi0: bus -1 (RP02)
acpiprt6 at acpi0: bus 4 (RP03)
acpiprt7 at acpi0: bus 5 (RP04)
acpiprt8 at acpi0: bus -1 (RP05)
acpiprt9 at acpi0: bus -1 (RP06)
acpiprt10 at acpi0: bus -1 (RP07)
acpiprt11 at acpi0: bus -1 (RP08)
acpiec0 at acpi0: not present
acpiec1 at acpi0
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: PUBS
acpipwrres4 at acpi0: PUBS
acpithinkpad0 at acpi0
acpibat0 at acpi0: BAT0 model "45N1705" serial   475 type LiP oem "SONY"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
cpu0: Enhanced SpeedStep 2494 MHz: speeds: 2601, 2600, 2500, 2300,
2100, 2000, 1800, 1700, 1500, 1400, 1200, 1100, 900, 800, 600, 500 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 5500" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1920x1080
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 9 Series MEI" rev 0x03 at pci0 dev 22 function 0 not configured
azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x03: msi
azalia1: codecs: Conexant/0x510f
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xe3
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 2 "Intel 9 Series PCIE" rev 0xe3: msi
pci2 at ppb1 bus 4
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7265" rev 0x59, msi
ppb2 at pci0 dev 28 function 3 "Intel 9 Series PCIE" rev 0xe3: msi
pci3 at ppb2 bus 5
rtsx0 at pci3 dev 0 function 0 "Realtek RTS5227 Card Reader" rev 0x01: msi
sdmmc0 at rtsx0
ehci0 at pci0 dev 29 function 0 "Intel 9 Series USB" rev 0x03: apic 2 int 23
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel 9 Series LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 9 Series AHCI" rev 0x03: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, TOSHIBA THNSFJ25, JULA> SCSI3
0/direct fixed naa.500080d91030209f
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x03: apic 2 int 18
iic0 at ichiic0
"Intel 9 Series Thermal" rev 0x03 at pci0 dev 31 function 6 not configured
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics clickpad, firmware 8.1
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhub0: device problem, disabling port 1
uhidev0 at uhub0 port 5 configuration 1 interface 0 "SYNAPTICS
Synaptics Touch Digitizer V04" rev 2.00/0.04 addr 2
uhidev0: iclass 3/0, 15 report ids
ums0 at uhidev0 reportid 1: 1 button, tip
wsmouse2 at ums0 mux 0
ums1 at uhidev0 reportid 2: 2 buttons
wsmouse3 at ums1 mux 0
ums2 at uhidev0 reportid 7
ums2: mouse has no X report
uhid0 at uhidev0 reportid 8: input=0, output=0, feature=1
uhid1 at uhidev0 reportid 9: input=0, output=63, feature=0
uhid2 at uhidev0 reportid 10: input=0, output=5, feature=0
uhid3 at uhidev0 reportid 11: input=61, output=0, feature=0
uhid4 at uhidev0 reportid 12: input=1, output=0, feature=0
uhid5 at uhidev0 reportid 15: input=0, output=0, feature=3
uvideo0 at uhub0 port 6 configuration 1 interface 0 "CON4A41GT
Integrated Camera" rev 2.00/0.04 addr 3
video0 at uvideo0
uhidev1 at uhub0 port 8 configuration 1 interface 0 "Tablet ISD-V4"
rev 2.00/1.31 addr 4
uhidev1: iclass 3/1, 17 report ids
ums3 at uhidev1 reportid 1: 2 buttons
wsmouse4 at ums3 mux 0
ums4 at uhidev1 reportid 2: 3 buttons, tip, barrel, eraser
wsmouse5 at ums4 mux 0
uhid6 at uhidev1 reportid 17: input=7, output=0, feature=3
uhub2 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.03 addr 2
uhidev2 at uhub2 port 7 configuration 1 interface 0
"STMicroelectronics ST_SENSOR_HUB" rev 2.00/0.35 addr 3
uhidev2: iclass 3/0, 14 report ids
uhid7 at uhidev2 reportid 1: input=50, output=0, feature=57
uhid8 at uhidev2 reportid 2: input=50, output=0, feature=57
uhid9 at uhidev2 reportid 3: input=50, output=0, feature=57
uhid10 at uhidev2 reportid 4: input=50, output=0, feature=57
uhid11 at uhidev2 reportid 5: input=50, output=0, feature=57
uhid12 at uhidev2 reportid 6: input=50, output=0, feature=57
uhid13 at uhidev2 reportid 7: input=50, output=0, feature=57
uhid14 at uhidev2 reportid 14: input=16, output=16, feature=0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 244190MB, 512 bytes/sector, 500102858 sectors
root on sd1a (3b03b0fd20119702.a) swap on sd1b dump on sd1b

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Stefan Sperling-5
In reply to this post by Mark Kettenis
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.
>

No apparent regression on my Thinkpad x201i.

vga1 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1280x800

 0:2:0: Intel HD Graphics
         0x0000: Vendor ID: 8086 Product ID: 0046

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Gregor Best-2
In reply to this post by Mark Kettenis
Hi Mark,

On Sat, Oct 24, 2015 at 11:48:01PM +0200, Mark Kettenis wrote:
> [...]
> 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.
> [...]

I got a UVM fault with the following trace:

        vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
        intagp0 at vga1uvm_fault(0xffffffff81932280, 0x28, 0, 2) -> e
        kernel: page fault trap, code=0
        Stopped at      pci_mapreg_map+0x1a8:   movq    %rbx,0(%rdx)
        ddb{0}> pci_mapreg_map() at pci_mapreg_map+0x1a8
        agp_i810_attach() at agp_i810_attach+0x177
        config_attach() at config_attach+0x1bc
        vga_pci_attach() at vga_pci_attach+0x17b
        config_attach() at config_attach+0x1bc
        pci_probe_device() at pci_probe_device+0x467
        pci_enumerate_bus() at pci_enumerate_bus+0xe9
        config_attach() at config_attach+0x1bc
        mainbus_attach() at mainbus_attach+0x174
        config_attach() at config_attach+0x1bc
        cpu_configure() at cpu_configure+0x1b
        main() at main+0x410
        end trace frame: 0x0, count: -12
        ddb{0}> rebooting...

The full dmesg is this:

OpenBSD 5.8-current (GENERIC.MP) #132: Sun Oct 25 13:28:17 CET 2015
    [hidden email]:/sys/arch/amd64/compile/GENERIC.MP
real mem = 6314201088 (6021MB)
avail mem = 6118703104 (5835MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (80 entries)
bios0: vendor LENOVO version "7UET94WW (3.24 )" date 10/17/2012
bios0: LENOVO 6474B84
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA DMAR SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB3(S3) USB5(S3) EHC0(S3) EHC1(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 2394.40 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (applicatioL2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus -1 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB3, USB5, EHC0, EHC1
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4645" serial   597 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 2394 MHz: speeds: 2401, 2400, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
intagp0 at vga1uvm_fault(0xffffffff81932280, 0x28, 0, 2) -> e
kernel: page fault trap, code=0
Stopped at      pci_mapreg_map+0x1a8:   movq    %rbx,0(%rdx)
ddb{0}> pci_mapreg_map() at pci_mapreg_map+0x1a8
agp_i810_attach() at agp_i810_attach+0x177
config_attach() at config_attach+0x1bc
vga_pci_attach() at vga_pci_attach+0x17b
config_attach() at config_attach+0x1bc
pci_probe_device() at pci_probe_device+0x467
pci_enumerate_bus() at pci_enumerate_bus+0xe9
config_attach() at config_attach+0x1bc
mainbus_attach() at mainbus_attach+0x174
config_attach() at config_attach+0x1bc
cpu_configure() at cpu_configure+0x1b
main() at main+0x410
end trace frame: 0x0, count: -12
ddb{0}> rebooting...

--
        Gregor

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Sebastien Marie-2
In reply to this post by Mark Kettenis
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.
>

With the patch, under i386, the machine panic.

As I don't have serial on the machine, and "boot dump" don't work this
time, I transcribe a small part of it, but I could provide all the
backtrace on demand:

wsdisplay at inteldrm0 not configured
panic: vga_common_setup: can't map vga i/o
Stopped at Debuffer+0x7: leave

The panic() call is in vga_init() at dev/ic/vga.c:482.

The dmesg of the machine without the patch provided below.

Regards
--
Sebastien Marie

OpenBSD 5.8-current (GENERIC.MP) #36: Sun Oct 25 12:36:42 CET 2015
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2400 @ 1.83GHz ("GenuineIntel" 686-class) 1.83 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF,SENSOR
real mem  = 2137354240 (2038MB)
avail mem = 2083864576 (1987MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 06/13/07, BIOS32 rev. 0 @ 0xffa10, SMBIOS rev. 2.4 @ 0xf7980 (44 entries)
bios0: vendor Dell Inc. version "A17" date 06/13/2007
bios0: Dell Inc. MM061
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG SLIC BOOT SSDT
acpi0: wakeup devices LID_(S3) PBTN(S4) MBTN(S5) PCI0(S3) USB0(S0) USB1(S0) USB2(S0) USB3(S0) EHCI(S0) AZAL(S3) PCIE(S4) RP01(S4) RP02(S3) RP03(S3) RP04(S3) RP05(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2400 @ 1.83GHz ("GenuineIntel" 686-class) 1.83 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF,SENSOR
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 3 (PCIE)
acpiprt3 at acpi0: bus 11 (RP01)
acpiprt4 at acpi0: bus -1 (RP02)
acpiprt5 at acpi0: bus -1 (RP03)
acpiprt6 at acpi0: bus 12 (RP04)
acpiprt7 at acpi0: bus -1 (RP05)
acpiprt8 at acpi0: bus -1 (RP06)
acpicpu0 at acpi0: !C3(250@85 io@0x1015), !C2(500@1 io@0x1014), C1(1000@1 halt), PSS
acpicpu1 at acpi0: !C3(250@85 io@0x1015), !C2(500@1 io@0x1014), C1(1000@1 halt), PSS
acpitz0 at acpi0: critical temperature is 126 degC
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model " DELLUD2649" serial 878 type LION oem "Sanyo"
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpivideo0 at acpi0: VID_
acpivideo1 at acpi0: VID_
acpivout0 at acpivideo1: LCD_
acpivideo2 at acpi0: VID2
bios0: ROM list: 0xc0000/0xe800! 0xce800/0x1800
cpu0: Enhanced SpeedStep 1829 MHz: speeds: 1833, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: apic 2 int 16
inteldrm0: 1280x800
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x01: msi
azalia0: codecs: Sigmatel STAC9200, Conexant/0x2bfa, using Sigmatel STAC9200
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: apic 2 int 16
pci1 at ppb0 bus 11
wpi0 at pci1 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi, MoW2, address 00:13:02:2e:8b:46
ppb1 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x01: apic 2 int 19
pci2 at ppb1 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 2 int 20
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 2 int 21
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 2 int 22
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 2 int 23
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 2 int 20
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe1
pci3 at ppb2 bus 3
bce0 at pci3 dev 0 function 0 "Broadcom BCM4401B1" rev 0x02: apic 2 int 17, address 00:15:c5:0b:8b:7a
bmtphy0 at bce0 phy 1: BCM4401 10/100baseTX PHY, rev. 0
"Ricoh 5C832 Firewire" rev 0x00 at pci3 dev 1 function 0 not configured
sdhc0 at pci3 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x19: apic 2 int 18
sdmmc0 at sdhc0
"Ricoh 5C843 MMC" rev 0x01 at pci3 dev 1 function 2 not configured
"Ricoh 5C592 Memory Stick" rev 0x0a at pci3 dev 1 function 3 not configured
"Ricoh 5C852 xD" rev 0x05 at pci3 dev 1 function 4 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x01: PM disabled
pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <ST96812AS>
wd0: 16-sector PIO, LBA48, 57241MB, 117231408 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <_NEC, DVD+-RW ND-6650A, 102C> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 2 int 17
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 6.2
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (3c4eae72daef4fa1.a) swap on wd0b dump on wd0b

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Norman Golisz-3
In reply to this post by Mark Kettenis
On Sat Oct 24 2015 23:48, Mark Kettenis wrote:
> 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.

No problems on my Thinkpad T400 (also running X11).


OpenBSD 5.8-current (GENERIC.MP) #0: Sun Oct 25 14:55:23 CET 2015
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4166717440 (3973MB)
avail mem = 4036304896 (3849MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (80 entries)
bios0: vendor LENOVO version "7UET94WW (3.24 )" date 10/17/2012
bios0: LENOVO 6475BE3
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA DMAR SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB3(S3) USB5(S3) EHC0(S3) EHC1(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.36 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 265MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.00 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 3MB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus -1 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(250@17 mwait.3@0x20), !C2(500@1 mwait.1@0x10), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB3, USB5, EHC0, EHC1
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T5264" serial  3499 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK docked (15)
cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2267, 2266, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1440x900
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
"Intel GM45 HECI" rev 0x07 at pci0 dev 3 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi, address 00:1c:25:95:39:e7
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 22
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
azalia0: codecs: Conexant CX20561
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: msi
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5300" rev 0x00: msi, MIMO 3T3R, MoW, address 00:16:ea:b3:62:e8
ppb2 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 5
ppb3 at pci0 dev 28 function 4 "Intel 82801I PCIE" rev 0x03: msi
pci4 at ppb3 bus 13
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 16
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 17
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 19
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 21
cbb0 at pci5 dev 0 function 0 "Ricoh 5C476 CardBus" rev 0xba: apic 1 int 16
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 22 device 0 cacheline 0x10, lattimer 0xb0
pcmcia0 at cardslot0
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, HGST HTS725050A7, GH2O> SCSI3 0/direct fixed naa.5000cca76cc03cc3
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVDRAM GSA-U20N, HX10> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 1 int 23
iic0 at ichiic0
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
uhub8 at uhub0 port 5 "IBM product 0x4485" rev 2.00/0.01 addr 2
uhidev0 at uhub8 port 3 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/18.00 addr 3
uhidev0: iclass 3/1
ums0 at uhidev0: 6 buttons, Z dir
wsmouse1 at ums0 mux 0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 250876MB, 512 bytes/sector, 513794592 sectors
softraid0: volume sd1 is roaming, it used to be sd2, updating metadata
root on sd1a (d2946bed46ef4222.a) swap on sd1b dump on sd1b

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Stefan Sperling-5
In reply to this post by Mark Kettenis
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.

On the Thinkpad Helix 2 (UEFI only machine) inteldrm now attaches.
However, it crashes shortly after:

inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 5300" rev 0x09
drm1 at inteldrm
inteldrm0: msi
inteldrm0: 1920x1080
wsdisplay1 at inteldrm0 mux 1
uvm_fault(0xffffffff81928280, 0x20, 0, 2) -> e
kernel: page fault trap code = 0
Stopped at   rasops_doswitch+0x76: mvol    $0x1,0x20(%r14)
ddb>

Keyboard is unresponsive.

Also, the screen is shifted left such that most lines start on the right
half of the screen and flow back in on the left hand side.
So the above actually appears like this on the screen:

                                              inteldrm0 at pci0 dev 2 function 0
"Intel HD Graphics 5300" rev 0x09
                                              drm1 at inteldrm
                                              inteldrm0: msi
                                              inteldrm0: 1920x1080
                                              wsdisplay1 at inteldrm0 mux 1
                                              uvm_fault(0xffffffff81928280, 0x20
, 0, 2) -> e
                                              kernel: page fault trap code = 0
                                              Stopped at   rasops_doswitch+0x
76: mvol    $0x1,0x20(%r14)
ddb>

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Philip Guenther-2
In reply to this post by Gregor Best-2
On Sun, Oct 25, 2015 at 5:43 AM, Gregor Best <[hidden email]> wrote:

> Hi Mark,
>
> On Sat, Oct 24, 2015 at 11:48:01PM +0200, Mark Kettenis wrote:
>> [...]
>> 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.
>> [...]
>
> I got a UVM fault with the following trace:
>
>         vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
>         intagp0 at vga1uvm_fault(0xffffffff81932280, 0x28, 0, 2) -> e
>         kernel: page fault trap, code=0
>         Stopped at      pci_mapreg_map+0x1a8:   movq    %rbx,0(%rdx)

This looks like the result of applying the diff but not running config
(such as by doing "make config" inside your kernel build directory)
before recompiling.  No shame: I made that mistake got a panic and
started to write it up before saying "wait a moment...." and having it
work with a reconfigured kernel.

(Sebastien, your panic looks close to the one I got when I made that
very mistake, so verify you ran config...)


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Gregor Best-2
On Sun, Oct 25, 2015 at 08:20:50AM -0700, Philip Guenther wrote:
> [...]
> This looks like the result of applying the diff but not running config
> [...]

<groan>

Thanks for the clue bat. It's working fine on a Thinkpad T400.

--
        Gregor

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Sebastien Marie-2
In reply to this post by Philip Guenther-2
On Sun, Oct 25, 2015 at 08:20:50AM -0700, Philip Guenther wrote:

> On Sun, Oct 25, 2015 at 5:43 AM, Gregor Best <[hidden email]> wrote:
> > Hi Mark,
> >
> > On Sat, Oct 24, 2015 at 11:48:01PM +0200, Mark Kettenis wrote:
> >> [...]
> >> 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.
> >> [...]
> >
>
> This looks like the result of applying the diff but not running config
> (such as by doing "make config" inside your kernel build directory)
> before recompiling.  No shame: I made that mistake got a panic and
> started to write it up before saying "wait a moment...." and having it
> work with a reconfigured kernel.
>
> (Sebastien, your panic looks close to the one I got when I made that
> very mistake, so verify you ran config...)

Hey, you are right !

running config before rebuilding help a lot: I see no more problem.
--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Mark Kettenis
In reply to this post by Mark Kettenis
> Date: Sat, 24 Oct 2015 23:48:01 +0200 (CEST)
> From: Mark Kettenis <[hidden email]>
>
> 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.

Several people reported that the diff crashed their system.  It looks
like those people forgot to reconfig their kernel before building.
Please try again and run "make config" before rebuilding your kernel.

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Mark Kettenis
In reply to this post by Stefan Sperling-5
> Date: Sun, 25 Oct 2015 15:50:51 +0100
> From: Stefan Sperling <[hidden email]>
>
> 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.
>
> On the Thinkpad Helix 2 (UEFI only machine) inteldrm now attaches.
> However, it crashes shortly after:

Yes.  This diff is only a step towards properly supporting UEFI.

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Ralf Horstmann-2
In reply to this post by Jonathan Gray-11
* Jonathan Gray <[hidden email]> [2015-10-25 05:51]:

> 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.

I see similar behaviour on an Asus i386 laptop with 855GM. It stops after
"root on wd0a". No video mode switch during boot and no ssh login possible, but
ddb still works. See dmesg below without and with patch applied.

Regards,
Ralf

OpenBSD 5.8-current (GENERIC) #1278: Tue Oct 20 09:46:53 MDT 2015
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1400MHz ("GenuineIntel" 686-class) 1.41 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE,EST,TM2,PERF
real mem  = 527187968 (502MB)
avail mem = 504582144 (481MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 03/08/04, SMBIOS rev. 2.3 @ 0xf5620 (37 entries)
bios0: vendor American Megatrends Inc. version "0208" date 03/08/2004
bios0: ASUSTeK Computer Inc. M2N
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP OEMB
acpi0: wakeup devices P0P1(S4) LAN0(S4) CBS0(S3) CBS1(S3) P394(S3) MODM(S3) USB1(S3) USB2(S3) USB3(S3) EHCI(S3) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpiec0 at acpi0
acpicpu0 at acpi0: !C3(@101 io@0xe415), !C2(@1 io@0xe414), C1(@1 halt!), PSS
acpitz0 at acpi0: critical temperature is 110 degC
acpipwrres0 at acpi0: GFAN, resource for SBRG, FN00
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "M2N" serial   type LIon oem "ASUSTEK"
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
acpiasus at acpi0 not configured
bios0: ROM list: 0xc0000/0xd200! 0xcd800/0x1000
cpu0 at mainbus0: (uniprocessor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: Enhanced SpeedStep 1401 MHz: speeds: 1400, 1400, 1400, 1400, 1400, 1400, 1200, 1000, 800, 600 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82855GM Host" rev 0x02
"Intel 82855GM Memory" rev 0x02 at pci0 dev 0 function 1 not configured
"Intel 82855GM Config" rev 0x02 at pci0 dev 0 function 3 not configured
vga1 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xf0000000, size 0x8000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: irq 5
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
uhci0 at pci0 dev 29 function 0 "Intel 82801DB USB" rev 0x03: irq 5
uhci1 at pci0 dev 29 function 1 "Intel 82801DB USB" rev 0x03: irq 5
uhci2 at pci0 dev 29 function 2 "Intel 82801DB USB" rev 0x03: irq 5
ehci0 at pci0 dev 29 function 7 "Intel 82801DB USB" rev 0x03: irq 4
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb0 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x83
pci1 at ppb0 bus 1
cbb0 at pci1 dev 3 function 0 "Ricoh 5C476 CardBus" rev 0xa9: irq 5, CardBus support disabled
cbb1 at pci1 dev 3 function 1 "Ricoh 5C476 CardBus" rev 0xa9: irq 5, CardBus support disabled
"Ricoh 5C552 Firewire" rev 0x01 at pci1 dev 3 function 2 not configured
rl0 at pci1 dev 4 function 0 "Realtek 8139" rev 0x10: irq 5, address 00:0e:a6:0b:e8:5d
rlphy0 at rl0 phy 0: RTL internal PHY
ipw0 at pci1 dev 5 function 0 "Intel PRO/Wireless 2100" rev 0x04: irq 5, address 00:04:23:7e:2f:f7
cardslot0 at cbb0 slot 0 flags 0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 "Intel 82801DBM LPC" rev 0x03
pciide0 at pci0 dev 31 function 1 "Intel 82801DBM IDE" rev 0x03: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <SAMSUNG HM120JC>
wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <TOSHIBA, DVD-ROM SD-R2312, 1708> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
auich0 at pci0 dev 31 function 5 "Intel 82801DB AC97" rev 0x03: irq 5, ICH4 AC97
ac97: codec id 0x83847650 (SigmaTel STAC9750/51)
ac97: codec features headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
audio0 at auich0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 4.6
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (55d5aed9e690033c.a) swap on wd0b dump on wd0b

OpenBSD 5.8-current (GENERIC) #0: Sun Oct 25 18:04:24 CET 2015
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1400MHz ("GenuineIntel" 686-class) 1.41 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE,EST,TM2,PERF
real mem  = 527187968 (502MB)
avail mem = 504582144 (481MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 03/08/04, SMBIOS rev. 2.3 @ 0xf5620 (37 entries)
bios0: vendor American Megatrends Inc. version "0208" date 03/08/2004
bios0: ASUSTeK Computer Inc. M2N
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP OEMB
acpi0: wakeup devices P0P1(S4) LAN0(S4) CBS0(S3) CBS1(S3) P394(S3) MODM(S3) USB1(S3) USB2(S3) USB3(S3) EHCI(S3) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpi0: WARNING EC not initialized
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpiec0 at acpi0
acpicpu0 at acpi0: !C3(@101 io@0xe415), !C2(@1 io@0xe414), C1(@1 halt!), PSS
acpitz0 at acpi0: critical temperature is 110 degC
acpipwrres0 at acpi0: GFAN, resource for SBRG, FN00
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "M2N" serial   type LIon oem "ASUSTEK"
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
acpiasus at acpi0 not configured
bios0: ROM list: 0xc0000/0xd200! 0xcd800/0x1000
cpu0 at mainbus0: (uniprocessor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: Enhanced SpeedStep 1401 MHz: speeds: 1400, 1400, 1400, 1400, 1400, 1400, 1200, 1000, 800, 600 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82855GM Host" rev 0x02
"Intel 82855GM Memory" rev 0x02 at pci0 dev 0 function 1 not configured
"Intel 82855GM Config" rev 0x02 at pci0 dev 0 function 3 not configured
inteldrm0 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xf0000000, 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
uhci0 at pci0 dev 29 function 0 "Intel 82801DB USB" rev 0x03: irq 5
uhci1 at pci0 dev 29 function 1 "Intel 82801DB USB" rev 0x03: irq 5
uhci2 at pci0 dev 29 function 2 "Intel 82801DB USB" rev 0x03: irq 5
ehci0 at pci0 dev 29 function 7 "Intel 82801DB USB" rev 0x03: irq 4
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb0 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x83
pci1 at ppb0 bus 1
cbb0 at pci1 dev 3 function 0 "Ricoh 5C476 CardBus" rev 0xa9: irq 5, CardBus support disabled
cbb1 at pci1 dev 3 function 1 "Ricoh 5C476 CardBus" rev 0xa9: irq 5, CardBus support disabled
"Ricoh 5C552 Firewire" rev 0x01 at pci1 dev 3 function 2 not configured
rl0 at pci1 dev 4 function 0 "Realtek 8139" rev 0x10: irq 5, address 00:0e:a6:0b:e8:5d
rlphy0 at rl0 phy 0: RTL internal PHY
ipw0 at pci1 dev 5 function 0 "Intel PRO/Wireless 2100" rev 0x04: irq 5, address 00:04:23:7e:2f:f7
cardslot0 at cbb0 slot 0 flags 0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 "Intel 82801DBM LPC" rev 0x03
pciide0 at pci0 dev 31 function 1 "Intel 82801DBM IDE" rev 0x03: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <SAMSUNG HM120JC>
wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <TOSHIBA, DVD-ROM SD-R2312, 1708> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
auich0 at pci0 dev 31 function 5 "Intel 82801DB AC97" rev 0x03: irq 5, ICH4 AC97
ac97: codec id 0x83847650 (SigmaTel STAC9750/51)
ac97: codec features headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
audio0 at auich0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 4.6
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (55d5aed9e690033c.a) swap on wd0b dump on wd0b

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Matthieu Herrb-7
In reply to this post by Mark Kettenis
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.
Works for me on my X240. Dmesg below. Same result as jsg@ on the X40
(hangs at root on  ...

OpenBSD 5.8-current (GENERIC.MP) #126: Sun Oct 25 19:44:49 CET 2015
    [hidden email]:/usr/obj/GENERIC.MP
real mem = 8246276096 (7864MB)
avail mem = 7992229888 (7621MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdcd3d000 (60 entries)
bios0: vendor LENOVO version "GIET73WW (2.23 )" date 04/10/2014
bios0: LENOVO 20ALCTO1WW
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT PCCT SSDT TCPA UEFI MSDM ASF! BATB FPDT UEFI SSDT DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 798.29 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 798.16 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 798.16 MHz
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, 798.16 MHz
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1
acpitz0 at acpi0: critical temperature is 200 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "45N1773" serial 16792 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 model "45N1738" serial  3066 type LION oem "LGC"
acpiac0 at acpi0: AC unit offline
acpithinkpad0 at acpi0
cpu0: Enhanced SpeedStep 798 MHz: speeds: 2701, 2700, 2600, 2400, 2300, 2100, 2000, 1800, 1700, 1600, 1400, 1300, 1100, 1000, 800, 756 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x0b
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x0b
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1366x768
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x0b: msi
"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 8 Series KT" rev 0x04: ports: 1 com
com4 at puc0 port 0 apic 2 int 17: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel I218-LM" rev 0x04: msi, address 28:d2:44:80:83:15
azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: msi
azalia1: codecs: Realtek ALC292
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xe4: msi
pci1 at ppb0 bus 2
rtsx0 at pci1 dev 0 function 0 "Realtek RTS5227 Card Reader" rev 0x01: msi
sdmmc0 at rtsx0
ppb1 at pci0 dev 28 function 1 "Intel 8 Series PCIE" rev 0xe4: msi
pci2 at ppb1 bus 3
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0x83, msi
ehci0 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel 8 Series LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG MZ7TD256, DXT0> SCSI3 0/direct fixed naa.5002538500000000
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 8 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics clickpad, firmware 8.1
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
error: [drm:pid0:intel_uncore_check_errors] *ERROR* Unclaimed register before interrupt
uhub1 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2
ugen0 at uhub1 port 7 "Intel product 0x07dc" rev 2.00/0.01 addr 3
uvideo0 at uhub1 port 8 configuration 1 interface 0 "SunplusIT INC. Integrated Camera" rev 2.00/26.03 addr 4
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 235839MB, 512 bytes/sector, 482999472 sectors
root on sd1a (201dbc67447a4c28.a) swap on sd1b dump on sd1b
iwm0: hw rev 0x140, fw ver 25.228 (API ver 9), address 7c:7a:91:ef:4e:d0
ntpd(14666): syscall 5

--
Matthieu Herrb

signature.asc (476 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Mark Kettenis
In reply to this post by Jonathan Gray-11
> Date: Sun, 25 Oct 2015 15:51:54 +1100
> From: Jonathan Gray <[hidden email]>
>
> 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.
>
> 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

The diff below should fix the issue on the x40 and similar machines
with 2nd generation Intel graphics.


Index: arch/amd64/conf/GENERIC
===================================================================
RCS file: /cvs/src/sys/arch/amd64/conf/GENERIC,v
retrieving revision 1.398
diff -u -p -r1.398 GENERIC
--- arch/amd64/conf/GENERIC 30 Sep 2015 12:24:44 -0000 1.398
+++ arch/amd64/conf/GENERIC 9 Oct 2015 20:40:52 -0000
@@ -300,15 +300,16 @@ wsdisplay0 at vga? console 1
 wskbd* at pckbd? mux 1
 wsmouse* at pms? mux 0
 
-intagp* at vga? # intel integrated graphics
 #mmuagp* at pchb? # amd64 mmu agp.
-
-agp* at intagp?
 #agp* at mmuagp?
 
-inteldrm* at vga? # Intel i915, i945 DRM driver
+inteldrm* at pci? # Intel i915, i945 DRM driver
+intagp* at inteldrm?
+agp* at intagp?
 drm0 at inteldrm? console 1
 drm* at inteldrm?
+wsdisplay0 at inteldrm? console 1
+wsdisplay* at inteldrm?
 radeondrm* at pci? # ATI Radeon DRM driver
 drm0 at radeondrm? console 1
 drm* at radeondrm?
Index: arch/amd64/conf/files.amd64
===================================================================
RCS file: /cvs/src/sys/arch/amd64/conf/files.amd64,v
retrieving revision 1.81
diff -u -p -r1.81 files.amd64
--- arch/amd64/conf/files.amd64 4 Sep 2015 23:22:56 -0000 1.81
+++ arch/amd64/conf/files.amd64 9 Oct 2015 16:36:41 -0000
@@ -133,7 +133,7 @@ attach amas at pci
 file dev/pci/amas.c amas
 
 # AGP bridge support. most attach at pchb
-file arch/amd64/pci/agp_machdep.c agp
+file arch/amd64/pci/agp_machdep.c agp | inteldrm
 
 #
 # CARDBUS
Index: arch/i386/conf/GENERIC
===================================================================
RCS file: /cvs/src/sys/arch/i386/conf/GENERIC,v
retrieving revision 1.807
diff -u -p -r1.807 GENERIC
--- arch/i386/conf/GENERIC 25 Oct 2015 19:32:33 -0000 1.807
+++ arch/i386/conf/GENERIC 25 Oct 2015 20:21:06 -0000
@@ -358,7 +358,6 @@ wsdisplay0 at pcdisplay? console 1
 wskbd* at pckbd? mux 1
 wsmouse* at pms? mux 0
 
-intagp* at vga? # intel integrated graphics agp
 aliagp* at pchb?
 amdagp* at pchb?
 intelagp* at pchb?
@@ -366,7 +365,6 @@ sisagp* at pchb?
 viaagp* at pchb?
 #mmuagp* at pchb?
 
-agp* at intagp? # AGP bridges
 agp* at aliagp? # AGP bridges
 agp* at amdagp? # AGP bridges
 agp* at intelagp? # AGP bridges
@@ -374,9 +372,13 @@ agp* at sisagp? # AGP bridges
 agp* at viaagp? # AGP bridges
 #agp* at mmuagp?
 
-inteldrm* at vga? # Intel i915, i945 DRM driver
+inteldrm* at pci? # Intel i915, i945 DRM driver
+intagp* at inteldrm?
+agp* at intagp?
 drm0 at inteldrm? console 1
 drm* at inteldrm?
+wsdisplay0 at inteldrm? console 1
+wsdisplay* at inteldrm?
 radeondrm* at pci? # ATI Radeon DRM driver
 drm0 at radeondrm? console 1
 drm* at radeondrm?
Index: arch/i386/conf/files.i386
===================================================================
RCS file: /cvs/src/sys/arch/i386/conf/files.i386,v
retrieving revision 1.226
diff -u -p -r1.226 files.i386
--- arch/i386/conf/files.i386 20 Aug 2015 04:41:46 -0000 1.226
+++ arch/i386/conf/files.i386 24 Oct 2015 21:28:00 -0000
@@ -113,7 +113,7 @@ attach  amas at pci
 file    dev/pci/amas.c amas
 
 # AGP bridge support. most attach at pchb
-file arch/i386/pci/agp_machdep.c agp
+file arch/i386/pci/agp_machdep.c agp | inteldrm
 
 # AMD Elan SC520 System Controller (PCI-Host bridge)
 device elansc: gpiobus
Index: dev/pci/agp_i810.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/agp_i810.c,v
retrieving revision 1.91
diff -u -p -r1.91 agp_i810.c
--- dev/pci/agp_i810.c 9 Oct 2015 13:22:54 -0000 1.91
+++ dev/pci/agp_i810.c 24 Oct 2015 21:17:05 -0000
@@ -43,11 +43,7 @@
 #include <dev/pci/pcidevs.h>
 #include <dev/pci/agpvar.h>
 #include <dev/pci/agpreg.h>
-#include <dev/ic/mc6845reg.h>
-#include <dev/ic/pcdisplayvar.h>
-#include <dev/ic/vgareg.h>
-#include <dev/ic/vgavar.h>
-#include <dev/pci/vga_pcivar.h>
+#include <dev/pci/drm/i915/i915_drv.h>
 
 #include <machine/bus.h>
 
@@ -84,7 +80,9 @@ struct agp_i810_softc {
  struct agp_softc *agpdev;
  struct agp_gatt *gatt;
  struct vga_pci_bar *map;
- struct vga_pci_bar *gtt_map;
+ bus_space_tag_t gtt_bst;
+ bus_space_handle_t gtt_bsh;
+ bus_size_t gtt_size;
  bus_dmamap_t scrib_dmamap;
  bus_addr_t isc_apaddr;
  bus_size_t isc_apsize; /* current aperture size */
@@ -241,8 +239,9 @@ agp_i810_attach(struct device *parent, s
  struct agp_i810_softc *isc = (struct agp_i810_softc *)self;
  struct agp_gatt *gatt;
  struct pci_attach_args *pa = aux, bpa;
- struct vga_pci_softc *vga = (struct vga_pci_softc *)parent;
+ struct inteldrm_softc *psc = (struct inteldrm_softc *)parent;
  bus_addr_t mmaddr, gmaddr, tmp;
+ bus_size_t gtt_off = 0;
  pcireg_t memtype, reg;
  u_int32_t stolen;
  u_int16_t gcc1;
@@ -263,11 +262,16 @@ agp_i810_attach(struct device *parent, s
  gmaddr = AGP_I965_GMADR;
  mmaddr = AGP_I965_MMADR;
  memtype = PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT;
+ if (isc->chiptype == CHIP_I965)
+ gtt_off = AGP_I965_GTT;
+ else
+ gtt_off = AGP_G4X_GTT;
  break;
  default:
  gmaddr = AGP_APBASE;
  mmaddr = AGP_I810_MMADR;
  memtype = PCI_MAPREG_TYPE_MEM;
+ gtt_off = AGP_I810_GTT;
  break;
  }
 
@@ -277,20 +281,31 @@ agp_i810_attach(struct device *parent, s
  return;
  }
 
- isc->map = vga_pci_bar_map(vga, mmaddr, 0, BUS_SPACE_MAP_LINEAR);
- if (isc->map == NULL) {
+ isc->map = psc->regs;
+ if (pci_mapreg_map(pa, mmaddr, memtype, BUS_SPACE_MAP_LINEAR,
+    &isc->map->bst, &isc->map->bsh, &isc->map->base,
+    &isc->map->size, gtt_off)) {
  printf("can't map mmadr registers\n");
  return;
  }
 
  if (isc->chiptype == CHIP_I915 || isc->chiptype == CHIP_G33 ||
     isc->chiptype == CHIP_PINEVIEW) {
- isc->gtt_map = vga_pci_bar_map(vga, AGP_I915_GTTADR, 0,
-    BUS_SPACE_MAP_LINEAR);
- if (isc->gtt_map == NULL) {
+ if (pci_mapreg_map(pa, AGP_I915_GTTADR, memtype,
+    BUS_SPACE_MAP_LINEAR, &isc->gtt_bst, &isc->gtt_bsh,
+    NULL, &isc->gtt_size, 0)) {
  printf("can't map gatt registers\n");
  goto out;
  }
+ } else {
+ isc->gtt_bst = isc->map->bst;
+ isc->gtt_size = (isc->isc_apsize >> AGP_PAGE_SHIFT) * 4;
+ if (bus_space_map(isc->gtt_bst, isc->map->base + gtt_off,
+    isc->gtt_size, BUS_SPACE_MAP_LINEAR, &isc->gtt_bsh)) {
+ printf("can't map gatt registers\n");
+ isc->gtt_size = 0;
+ goto out;
+ }
  }
 
  gatt = malloc(sizeof(*gatt), M_AGP, M_NOWAIT | M_ZERO);
@@ -512,6 +527,7 @@ agp_i810_attach(struct device *parent, s
  isc->agpdev = (struct agp_softc *)agp_attach_bus(pa, &agp_i810_methods,
     isc->isc_apaddr, isc->isc_apsize, &isc->dev);
  isc->agpdev->sc_stolen_entries = isc->stolen;
+ bus_space_unmap(isc->map->bst, isc->map->bsh, isc->map->size);
  return;
 out:
 
@@ -521,10 +537,10 @@ out:
     isc->gatt->ag_dmamap, &isc->gatt->ag_dmaseg);
  free(isc->gatt, M_AGP, sizeof (*isc->gatt));
  }
- if (isc->gtt_map != NULL)
- vga_pci_bar_unmap(isc->gtt_map);
- if (isc->map != NULL)
- vga_pci_bar_unmap(isc->map);
+ if (isc->gtt_size != 0)
+ bus_space_unmap(isc->gtt_bst, isc->gtt_bsh, isc->gtt_size);
+ if (isc->map->size != 0)
+ bus_space_unmap(isc->map->bst, isc->map->bsh, isc->map->size);
 }
 
 int
@@ -777,7 +793,7 @@ void
 intagp_write_gtt(struct agp_i810_softc *isc, bus_size_t off, paddr_t v)
 {
  u_int32_t pte = 0;
- bus_size_t baseoff, wroff;
+ bus_size_t wroff;
 
  if (isc->chiptype != CHIP_I810 &&
     (off >> AGP_PAGE_SHIFT) < isc->stolen) {
@@ -800,25 +816,5 @@ intagp_write_gtt(struct agp_i810_softc *
  }
 
  wroff = (off >> AGP_PAGE_SHIFT) * 4;
-
- switch(isc->chiptype) {
- case CHIP_I915:
- /* FALLTHROUGH */
- case CHIP_G33:
- case CHIP_PINEVIEW:
- bus_space_write_4(isc->gtt_map->bst, isc->gtt_map->bsh,
-    wroff, pte);
- return;
- case CHIP_I965:
- baseoff = AGP_I965_GTT;
- break;
- case CHIP_G4X:
- case CHIP_IRONLAKE:
- baseoff = AGP_G4X_GTT;
- break;
- default:
- baseoff = AGP_I810_GTT;
- break;
- }
- bus_space_write_4(isc->map->bst, isc->map->bsh, baseoff + wroff, pte);
+ bus_space_write_4(isc->gtt_bst, isc->gtt_bsh, wroff, pte);
 }
Index: dev/pci/drm/files.drm
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/files.drm,v
retrieving revision 1.33
diff -u -p -r1.33 files.drm
--- dev/pci/drm/files.drm 23 Sep 2015 23:12:11 -0000 1.33
+++ dev/pci/drm/files.drm 9 Oct 2015 20:43:10 -0000
@@ -35,8 +35,8 @@ file dev/pci/drm/ttm/ttm_object.c ttm
 file dev/pci/drm/ttm/ttm_page_alloc.c ttm
 file dev/pci/drm/ttm/ttm_tt.c ttm
 
-device inteldrm: drmbase, wsemuldisplaydev, rasops32, i2cbus, i2c_bitbang
-attach inteldrm at drmdev
+device inteldrm: agpint, drmbase, wsemuldisplaydev, rasops32, i2cbus, i2c_bitbang
+attach inteldrm at pci
 file dev/pci/drm/i915/i915_dma.c inteldrm
 file dev/pci/drm/i915/i915_drv.c inteldrm
 file dev/pci/drm/i915/i915_gem.c inteldrm
Index: dev/pci/drm/i915/i915_drv.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.c,v
retrieving revision 1.94
diff -u -p -r1.94 i915_drv.c
--- dev/pci/drm/i915/i915_drv.c 17 Oct 2015 21:41:12 -0000 1.94
+++ dev/pci/drm/i915/i915_drv.c 25 Oct 2015 19:51:02 -0000
@@ -497,7 +497,11 @@ i915_get_device_id(int device)
 int
 inteldrm_probe(struct device *parent, void *match, void *aux)
 {
- return (drm_pciprobe((struct pci_attach_args *)aux, pciidlist));
+ struct pci_attach_args *pa = aux;
+
+ if (drm_pciprobe(aux, pciidlist) && pa->pa_function == 0)
+ return 20;
+ return 0;
 }
 
 static int
@@ -954,6 +958,12 @@ int i915_reset(struct drm_device *dev)
  return 0;
 }
 
+#include "intagp.h"
+
+#if NINTAGP > 0
+int intagpsubmatch(struct device *, void *, void *);
+int intagp_print(void *, const char *);
+#endif
 
 int inteldrm_wsioctl(void *, u_long, caddr_t, int, struct proc *);
 paddr_t inteldrm_wsmmap(void *, off_t, int);
@@ -1183,18 +1193,27 @@ void
 inteldrm_attach(struct device *parent, struct device *self, void *aux)
 {
  struct inteldrm_softc *dev_priv = (struct inteldrm_softc *)self;
- struct vga_pci_softc *vga_sc = (struct vga_pci_softc *)parent;
  struct pci_attach_args *pa = aux;
  struct rasops_info *ri = &dev_priv->ro;
  struct wsemuldisplaydev_attach_args aa;
- extern int wsdisplay_console_initted;
- struct vga_pci_bar *bar;
+ extern int vga_console_attached;
  struct drm_device *dev;
  const struct intel_device_info *info;
  int ret = 0, mmio_bar, mmio_size;
+ pcireg_t mmio_type;
  uint32_t aperture_size;
+ int console = 0;
  int i;
 
+ if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY &&
+    PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_DISPLAY_VGA &&
+    (pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG)
+    & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE))
+    == (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) {
+ console = 1;
+ vga_console_attached = 1;
+ }
+
  info = i915_get_device_id(PCI_PRODUCT(pa->pa_id));
  KASSERT(info->gen != 0);
 
@@ -1205,17 +1224,23 @@ inteldrm_attach(struct device *parent, s
  dev_priv->dmat = pa->pa_dmat;
  dev_priv->bst = pa->pa_memt;
  dev_priv->memex = pa->pa_memex;
+ dev_priv->regs = &dev_priv->bar;
 
  printf("\n");
 
  if (dev_priv->info->gen >= 6)
  inteldrm_driver.flags &= ~(DRIVER_AGP | DRIVER_AGP_REQUIRE);
+#if NINTAGP > 0
+ else {
+ config_found_sm(self, aux, intagp_print, intagpsubmatch);
+ }
+#endif
 
  inteldrm_driver.num_ioctls = i915_max_ioctl;
 
  /* All intel chipsets need to be treated as agp, so just pass one */
  dev = dev_priv->dev = (struct drm_device *)
-    drm_attach_pci(&inteldrm_driver, pa, 1, 1, self);
+    drm_attach_pci(&inteldrm_driver, pa, 1, console, self);
 
  intel_gtt_chipset_setup(dev);
  mtx_init(&mchdev_lock, IPL_TTY);
@@ -1262,16 +1287,15 @@ inteldrm_attach(struct device *parent, s
  else
  mmio_size = 2*1024*1024;
 
- /* we need to use this api for now due to sharing with intagp */
- bar = vga_pci_bar_info(vga_sc, mmio_bar);
- if (bar == NULL) {
- printf("%s: can't get BAR info\n",
-    dev_priv->sc_dev.dv_xname);
- goto free_priv;
- }
-
- dev_priv->regs = vga_pci_bar_map(vga_sc, bar->addr, mmio_size, 0);
- if (dev_priv->regs == NULL) {
+ /* XXX */
+ if (info->gen < 3)
+ mmio_size = 64*1024;
+
+ mmio_bar = 0x10 + mmio_bar * 0x04;
+ mmio_type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, mmio_bar);
+ if (pci_mapreg_map(pa, mmio_bar, mmio_type, 0, &dev_priv->regs->bst,
+    &dev_priv->regs->bsh, &dev_priv->regs->base,
+    &dev_priv->regs->size, mmio_size)) {
  printf("%s: can't map mmio space\n",
     dev_priv->sc_dev.dv_xname);
  goto free_priv;
@@ -1473,23 +1497,22 @@ inteldrm_attach(struct device *parent, s
  inteldrm_stdscreen.fontwidth = ri->ri_font->fontwidth;
  inteldrm_stdscreen.fontheight = ri->ri_font->fontheight;
 
- aa.console = 0;
+ aa.console = console;
  aa.scrdata = &inteldrm_screenlist;
  aa.accessops = &inteldrm_accessops;
  aa.accesscookie = dev_priv;
  aa.defaultscreens = 0;
 
- if (wsdisplay_console_initted) {
+ if (console) {
  long defattr;
 
  ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr);
  wsdisplay_cnattach(&inteldrm_stdscreen, ri->ri_active,
     0, 0, defattr);
- aa.console = 1;
  }
 
- vga_sc->sc_type = -1;
- config_found(parent, &aa, wsemuldisplaydevprint);
+ config_found_sm(self, &aa, wsemuldisplaydevprint,
+    wsemuldisplaydevsubmatch);
  return;
 
 out_power_well:
@@ -1524,7 +1547,8 @@ out_regs:
 #ifdef __linux__
  pci_iounmap(dev->pdev, dev_priv->regs);
 #else
- vga_pci_bar_unmap(dev_priv->regs);
+ bus_space_unmap(dev_priv->regs->bst, dev_priv->regs->bsh,
+    dev_priv->regs->size);
 #endif
 free_priv:
  dev->dev_private = NULL;
@@ -1556,7 +1580,8 @@ inteldrm_detach(struct device *self, int
  pci_intr_disestablish(dev_priv->pc, dev_priv->irqh);
 
  if (dev_priv->regs != NULL)
- vga_pci_bar_unmap(dev_priv->regs);
+ bus_space_unmap(dev_priv->regs->bst, dev_priv->regs->bsh,
+    dev_priv->regs->size);
 
  return (0);
 }
Index: dev/pci/drm/i915/i915_drv.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.h,v
retrieving revision 1.70
diff -u -p -r1.70 i915_drv.h
--- dev/pci/drm/i915/i915_drv.h 17 Oct 2015 21:41:12 -0000 1.70
+++ dev/pci/drm/i915/i915_drv.h 24 Oct 2015 20:42:44 -0000
@@ -1457,6 +1457,7 @@ typedef struct inteldrm_softc {
  pci_intr_handle_t ih;
  void *irqh;
 
+ struct vga_pci_bar bar;
  struct vga_pci_bar *regs;
 
  int nscreens;

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Daniel Bolgheroni-3
In reply to this post by Mark Kettenis
On Sat, Oct 24, 2015 at 11:48:01PM +0200, Mark Kettenis wrote:
> 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.

Works for me on a ThinkPad T420.

OpenBSD 5.8-current (GENERIC.MP) #0: Sun Oct 25 21:19:34 BRST 2015
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8451125248 (8059MB)
avail mem = 8190865408 (7811MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (65 entries)
bios0: vendor LENOVO version "83ET70WW (1.40 )" date 06/12/2012
bios0: LENOVO 4180DL4
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT SSDT UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EHC1(S3) EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2492.25 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2491.91 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2491.91 MHz
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2491.91 MHz
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus 5 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu2 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu3 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 98 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4791" serial 18416 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
cpu0: Enhanced SpeedStep 2492 MHz: speeds: 2501, 2500, 2200, 2000, 1800, 1600, 1400, 1200, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1600x900
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 6 Series KT" rev 0x04: ports: 1 com
com4 at puc0 port 0 apic 2 int 19: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 00:21:cc:ba:e3:5d
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x04: msi
azalia0: codecs: Conexant CX20590, Conexant/0x2c06, Intel/0x2805, using Conexant CX20590
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb4: msi
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 6 Series PCIE" rev 0xb4: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6205" rev 0x34: msi, MIMO 2T2R, MoW, address 10:0b:a9:96:72:30
ppb2 at pci0 dev 28 function 3 "Intel 6 Series PCIE" rev 0xb4: msi
pci3 at ppb2 bus 5
ppb3 at pci0 dev 28 function 4 "Intel 6 Series PCIE" rev 0xb4: msi
pci4 at ppb3 bus 13
sdhc0 at pci4 dev 0 function 0 "Ricoh 5U822 SD/MMC" rev 0x08: apic 2 int 16
sdmmc0 at sdhc0
ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel QM67 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, HITACHI HTS72323, EC2Z> SCSI3 0/direct fixed naa.5000cca6d4cc4334
sd0: 305245MB, 512 bytes/sector, 625142448 sectors
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVDRAM GT33N, LT20> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.2
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
ugen0 at uhub2 port 4 "Broadcom Corp Broadcom Bluetooth Device" rev 2.00/7.48 addr 3
uvideo0 at uhub2 port 6 configuration 1 interface 0 "Chicony Electronics Co., Ltd. Integrated Camera" rev 2.00/7.52 addr 4
video0 at uvideo0
uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (67871fe00f1ba2f6.a) swap on sd0b dump on sd0b

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Jonathan Gray-11
In reply to this post by Mark Kettenis
On Sun, Oct 25, 2015 at 09:38:14PM +0100, Mark Kettenis wrote:

> > Date: Sun, 25 Oct 2015 15:51:54 +1100
> > From: Jonathan Gray <[hidden email]>
> >
> > 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.
> >
> > 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
>
> The diff below should fix the issue on the x40 and similar machines
> with 2nd generation Intel graphics.

With that the screen goes black on attaching inteldrm and hangs.

When booting with serial the last output is:

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: apic 1 int 16

It looks like we need to map more than 64, the i815 registers
are documented to go up to 512/0x80000
"Cursor, Display, and Pixel Pipe Registers (70000h-7FFFFh)"

When trying to map 512 with the attach diff it seems
pci_mapreg_map() fails in it's bus_space_map() call

bus_space_map_failed base 0xd0000000 size 0x80000 flags 0x0

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

YASUOKA Masahiko-3
In reply to this post by Mark Kettenis
On Sat, 24 Oct 2015 23:48:01 +0200 (CEST)
Mark Kettenis <[hidden email]> 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.

works for me on vaio z (UEFI only).

On UEFI boot, efifb(4) tries to become the console and seems to break
the wsdisplay on inteldrm0 (switching X <=> console became unusable).
To avoid this I used the diff following.

Index: sys/arch/amd64/amd64/efifb.c
===================================================================
RCS file: /disk/cvs/openbsd/src/sys/arch/amd64/amd64/efifb.c,v
retrieving revision 1.6
diff -u -p -r1.6 efifb.c
--- sys/arch/amd64/amd64/efifb.c 7 Sep 2015 18:19:58 -0000 1.6
+++ sys/arch/amd64/amd64/efifb.c 26 Oct 2015 05:49:37 -0000
@@ -91,6 +91,10 @@ int
 efifb_match(struct device *parent, void *cf, void *aux)
 {
  struct efifb_attach_args *eaa = aux;
+ extern int vga_console_attached;
+
+ if (vga_console_attached)
+ return (0);
 
  if (strcmp(eaa->eaa_name, efifb_cd.cd_name) == 0 &&
     bios_efiinfo != NULL)


OpenBSD 5.8-current (GENERIC.MP) #63: Mon Oct 26 14:59:03 JST 2015
    [hidden email]:/home/yasuoka/source/openbsd/cvs/head/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error 7f<ROM_cksum,config_unit,memory_size,fixed_disk,invalid_time>
real mem = 8470687744 (8078MB)
avail mem = 8209833984 (7829MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xacd70000 (20 entries)
bios0: vendor Phoenix Technologies Ltd. version "R0181B6" date 02/19/2015
bios0: VAIO Corporation VAIO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP ASF! HPET LPIT APIC MCFG WDAT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT PCCT SSDT UEFI MSDM TPM2 SSDT BATB FPDT UEFI BGRT CSRT DMAR
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) GLAN(S4) EHC1(S4) EHC2(S4) XHC_(S4) TPD4(S4) TPD7(S0) TPD8(S0) HDEF(S4) PXSX(S4) RP01(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz, 2594.46 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz, 2594.01 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz, 2594.01 MHz
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz, 2594.01 MHz
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus -1 (RP01)
acpiprt5 at acpi0: bus -1 (RP02)
acpiprt6 at acpi0: bus 1 (RP03)
acpiprt7 at acpi0: bus -1 (RP04)
acpiprt8 at acpi0: bus -1 (RP05)
acpiprt9 at acpi0: bus 2 (RP06)
acpiprt10 at acpi0: bus -1 (RP07)
acpiprt11 at acpi0: bus -1 (RP08)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: PX04, resource for HS04
acpipwrres4 at acpi0: PX0C, resource for SSP3
acpipwrres5 at acpi0: PSEN, resource for SHUB, I2C0, TPL2
acpipwrres6 at acpi0: PXTC, resource for SHUB, I2C0, TPL2
acpipwrres7 at acpi0: PAUD, resource for HDEF
acpitz0 at acpi0: critical temperature is 102 degC
acpitz1 at acpi0: no critical temperature defined
acpibat0 at acpi0: BAT1 model "VAIO Battery" serial 123456789 type VAIO oem "VAIO"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2701, 2700, 2600, 2400, 2200, 2100, 1900, 1800, 1600, 1400, 1300, 1100, 1000, 800, 700, 500 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel Iris Graphics 6100" rev 0x09
drm0 at inteldrm0
inteldrm0: msi
LP PCH doesn't have FDI
inteldrm0: 2560x1440
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 9 Series MEI" rev 0x03 at pci0 dev 22 function 0 not configured
azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x03: msi
azalia1: codecs: Realtek ALC282
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xe3: msi
pci1 at ppb0 bus 1
iwm0 at pci1 dev 0 function 0 "Intel Dual Band Wireless AC 7265" rev 0x59, msi
ppb1 at pci0 dev 28 function 5 "Intel 9 Series PCIE" rev 0xe3: msi
pci2 at ppb1 bus 2
ahci0 at pci2 dev 0 function 0 "Samsung SM951" rev 0x01: apic 2 int 16, AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG MZHPV512, BXW2> SCSI3 0/direct fixed naa.500253890000f48b
sd0: 488386MB, 512 bytes/sector, 1000215216 sectors, thin
pcib0 at pci0 dev 31 function 0 "Intel 9 Series LPC" rev 0x03
ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x03: apic 2 int 17
iic0 at ichiic0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
efifb0 at mainbus0
wsdisplay at efifb0 not configured
nvram: invalid checksum
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Microsoft Microsoft\M-. Nano Transceiver v1.0" rev 2.00/7.04 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Microsoft Microsoft\M-. Nano Transceiver v1.0" rev 2.00/7.04 addr 2
uhidev1: iclass 3/1, 26 report ids
uhid0 at uhidev1 reportid 18: input=0, output=0, feature=1
uhid1 at uhidev1 reportid 23: input=0, output=0, feature=1
ums0 at uhidev1 reportid 26: 5 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev2 at uhub0 port 2 configuration 1 interface 2 "Microsoft Microsoft\M-. Nano Transceiver v1.0" rev 2.00/7.04 addr 2
uhidev2: iclass 3/0, 8 report ids
uhid2 at uhidev2 reportid 3: input=1, output=0, feature=0
uhid3 at uhidev2 reportid 4: input=1, output=0, feature=0
uhid4 at uhidev2 reportid 7: input=7, output=0, feature=0
uhid5 at uhidev2 reportid 8: input=1, output=0, feature=0
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Chicony Front Camera" rev 2.00/32.61 addr 3
video0 at uvideo0
ugen0 at uhub0 port 5 "Intel product 0x0a2a" rev 2.01/0.01 addr 4
umass0 at uhub0 port 8 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.01/77.11 addr 5
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <Generic-, SD/MMC/MS PRO, 1.00> SCSI2 0/direct removable serial.0bda0177112761000000
sd1: 60906MB, 512 bytes/sector, 124735488 sectors
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (3aac7e66fb7d173d.a) swap on sd0b dump on sd0b
WARNING: / was not properly unmounted
clock: unknown CMOS layout
iwm0: hw rev 0x210, fw ver 25.228 (API ver 9), address xx:xx:xx:xx:xx:xx

Reply | Threaded
Open this post in threaded view
|

Re: inteldrm(4) diff that needs testing

Jan Stary
In reply to this post by Mark Kettenis
On Oct 24 23:48:01, [hidden email] 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.

This is an old MacBook2,1 running current/amd64.
Both dmesg below, this is the hightlight of the dmesg diff:

-vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
-intagp0 at vga1
+inteldrm0 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
+intagp0 at inteldrm0
 agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
-inteldrm0 at vga1
 drm0 at inteldrm0
 inteldrm0: apic 1 int 16
 inteldrm0: 1280x800
-wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
+wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
 wsdisplay0: screen 1-5 added (std, vt100 emulation)
 "Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
 vendor "Intel", unknown product 0x27a3 (class DASP subclass Time and Frequency, rev 0x03) at pci0 dev 7 function 0 not configured

With the patch applied, X seems to run just fine,
including video-heavy things like firefox or mplayer .

It suspends but does not resume correctly; the resume does happen
(see below for /var/log/messages), but the screen is mostly black
with seemingly random color patches.

Unfortunately, I do not have any other access to the machine right now
(will try again on one of my networks where I can connect remotely).


        Jan


Before:

OpenBSD 5.8-current (GENERIC.MP) #1537: Tue Oct 20 09:44:09 MDT 2015
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3171901440 (3024MB)
avail mem = 3071705088 (2929MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (37 entries)
bios0: vendor Apple Inc. version "MB21.88Z.00A5.B07.0706270922" date 06/27/07
bios0: Apple Inc. MacBook2,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT
acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB7(S3) EC__(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.61 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.26 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-255
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP02)
acpiprt3 at acpi0: bus 3 (PCIB)
acpicpu0 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS
acpicpu1 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "15253732082930497" type 15253732284385612 oem "15253732284387396"
acpivideo0 at acpi0: GFX0
cpu0: Enhanced SpeedStep 2161 MHz: speeds: 2167, 2000, 1833, 1667, 1500, 1333, 1000 MHz
memory map conflict 0xbef00000/0x100000
memory map conflict 0xbf000000/0x1000000
memory map conflict 0xf00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xfffb0000/0x30000
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
intagp0 at vga1
agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: apic 1 int 16
inteldrm0: 1280x800
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
vendor "Intel", unknown product 0x27a3 (class DASP subclass Time and Frequency, rev 0x03) at pci0 dev 7 function 0 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Sigmatel STAC9220/1
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x22, Yukon-2 EC rev. A3 (0x2): apic 1 int 16
msk0 at mskc0 port A: address 00:1b:63:36:2b:5d
eephy0 at msk0 phy 0: 88E1111 Gigabit PHY, rev. 2
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR5418" rev 0x01: apic 1 int 17
athn0: MAC AR5418 rev 2, RF AR5133 (2T3R), ROM rev 4, address 00:1c:b3:c4:b2:ae
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 21
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 21
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci3 at ppb2 bus 3
"AT&T/Lucent FW322 1394" rev 0x61 at pci3 dev 3 function 0 not configured
pcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <MATSHITA, DVD-R UJ-857E, ZB0E> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 1 int 19 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 1: <ST980811AS>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 6
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 19
iic0 at ichiic0
iic0: addr 0x48 00=3d 01=00 02=4b 03=50 words 00=3c80 01=00ff 02=4b00 03=5000 04=ffff 05=ffff 06=ffff 07=ffff
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
asmc0 at isa0 port 0x300/32
asmc0: rev 1.17f517, 226 keys, 10 temperatures, 1 fan, motions
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
error: [drm:pid0:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
umass0 at uhub0 port 3 configuration 1 interface 0 "HTC HTC" rev 2.00/2.31 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd0 at scsibus2 targ 1 lun 0: <HTC, Android Phone, 0000> SCSI2 0/direct removable serial.0bb40ff9SH0BHRT00209
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 3
video0 at uvideo0
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub1 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub3 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub4 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub4 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd1 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 19801MB, 512 bytes/sector, 40552459 sectors
softraid0: volume sd1 is roaming, it used to be sd0, updating metadata
root on sd1a (6a43b4ff960b63d7.a) swap on sd1b dump on sd1b


After:

OpenBSD 5.8-current (GENERIC.MP) #6: Mon Oct 26 12:46:46 CET 2015
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3171901440 (3024MB)
avail mem = 3071705088 (2929MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (37 entries)
bios0: vendor Apple Inc. version "MB21.88Z.00A5.B07.0706270922" date 06/27/07
bios0: Apple Inc. MacBook2,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT
acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB7(S3) EC__(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.54 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.25 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-255
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP02)
acpiprt3 at acpi0: bus 3 (PCIB)
acpicpu0 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS
acpicpu1 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "15253732082930497" type 15253732284385612 oem "15253732284387396"
acpivideo0 at acpi0: GFX0
cpu0: Enhanced SpeedStep 2161 MHz: speeds: 2167, 2000, 1833, 1667, 1500, 1333, 1000 MHz
memory map conflict 0xbef00000/0x100000
memory map conflict 0xbf000000/0x1000000
memory map conflict 0xf00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xfffb0000/0x30000
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
inteldrm0 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
drm0 at inteldrm0
inteldrm0: apic 1 int 16
inteldrm0: 1280x800
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
vendor "Intel", unknown product 0x27a3 (class DASP subclass Time and Frequency, rev 0x03) at pci0 dev 7 function 0 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Sigmatel STAC9220/1
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x22, Yukon-2 EC rev. A3 (0x2): apic 1 int 16
msk0 at mskc0 port A: address 00:1b:63:36:2b:5d
eephy0 at msk0 phy 0: 88E1111 Gigabit PHY, rev. 2
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR5418" rev 0x01: apic 1 int 17
athn0: MAC AR5418 rev 2, RF AR5133 (2T3R), ROM rev 4, address 00:1c:b3:c4:b2:ae
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 21
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 21
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci3 at ppb2 bus 3
"AT&T/Lucent FW322 1394" rev 0x61 at pci3 dev 3 function 0 not configured
pcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <MATSHITA, DVD-R UJ-857E, ZB0E> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 1 int 19 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 1: <ST980811AS>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 6
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 19
iic0 at ichiic0
iic0: addr 0x48 00=3e 01=00 02=4b 03=50 words 00=3e00 01=00ff 02=4b00 03=5000 04=ffff 05=ffff 06=ffff 07=ffff
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
asmc0 at isa0 port 0x300/32: rev 1.17f517, 226 keys
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
error: [drm:pid0:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
umass0 at uhub0 port 3 configuration 1 interface 0 "HTC HTC" rev 2.00/2.31 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd0 at scsibus2 targ 1 lun 0: <HTC, Android Phone, 0000> SCSI2 0/direct removable serial.0bb40ff9SH0BHRT00209
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 3
video0 at uvideo0
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub1 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub3 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub4 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub4 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd1 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 19801MB, 512 bytes/sector, 40552459 sectors
root on sd1a (6a43b4ff960b63d7.a) swap on sd1b dump on sd1b

messages:

[...]
Oct 26 12:53:48 mac apmd: system suspending
Oct 26 12:53:50 mac /bsd: ukbd0: was console keyboard
Oct 26 12:53:50 mac /bsd: wskbd0 detached
Oct 26 12:53:50 mac /bsd: ukbd0 detached
Oct 26 12:53:50 mac /bsd: uhidev0 detached
Oct 26 12:54:04 mac /bsd: wsmouse0 detached
Oct 26 12:54:04 mac /bsd: ums0 detached
Oct 26 12:54:04 mac /bsd: ums1 detached
Oct 26 12:54:04 mac /bsd: uhidev1 detached
Oct 26 12:54:04 mac /bsd: uhid0 detached
Oct 26 12:54:04 mac /bsd: uhidev2 detached
Oct 26 12:54:04 mac /bsd: uhub1 detached
Oct 26 12:54:04 mac /bsd: uhub2 detached
Oct 26 12:54:04 mac /bsd: uhid1 detached
Oct 26 12:54:04 mac /bsd: uhid2 detached
Oct 26 12:54:04 mac /bsd: uhid3 detached
Oct 26 12:54:04 mac /bsd: uhidev3 detached
Oct 26 12:54:04 mac /bsd: uhub3 detached
Oct 26 12:54:04 mac /bsd: wskbd1: disconnecting from wsdisplay0
Oct 26 12:54:04 mac /bsd: wskbd1 detached
Oct 26 12:54:04 mac /bsd: ukbd1 detached
Oct 26 12:54:04 mac /bsd: uhidev4 detached
Oct 26 12:54:04 mac /bsd: wsmouse1 detached
Oct 26 12:54:04 mac /bsd: ums2 detached
Oct 26 12:54:04 mac /bsd: uhidev5 detached
Oct 26 12:54:04 mac /bsd: uhub4 detached
Oct 26 12:54:04 mac /bsd: sd0 detached
Oct 26 12:54:04 mac /bsd: scsibus2 detached
Oct 26 12:54:04 mac /bsd: umass0 detached
Oct 26 12:54:04 mac /bsd: video0 detached
Oct 26 12:54:04 mac /bsd: uvideo0 detached
Oct 26 12:54:04 mac /bsd: uhub0 detached
Oct 26 12:54:04 mac /bsd: uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
Oct 26 12:54:04 mac /bsd: uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
Oct 26 12:54:04 mac /bsd: uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
Oct 26 12:54:04 mac /bsd: uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
Oct 26 12:54:04 mac /bsd: uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
Oct 26 12:54:04 mac /bsd: drm: render error detected, EIR: 0x00000010
Oct 26 12:54:04 mac /bsd: drm: page table error
Oct 26 12:54:04 mac /bsd: drm:   PGTBL_ER: 0x00000003
Oct 26 12:54:04 mac /bsd: error: [drm:pid2877:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
Oct 26 12:54:04 mac /bsd: drm: render error detected, EIR: 0x00000010
Oct 26 12:54:04 mac /bsd: drm: page table error
Oct 26 12:54:04 mac /bsd: drm:   PGTBL_ER: 0x00000003
Oct 26 12:54:04 mac apmd: system resumed from sleep
Oct 26 12:54:05 mac /bsd: umass0 at uhub4
Oct 26 12:54:05 mac /bsd:  port 3 configuration 1 interface 0 "HTC HTC" rev 2.00/2.31 addr 2
Oct 26 12:54:05 mac /bsd: umass0: using SCSI over Bulk-Only
Oct 26 12:54:05 mac /bsd: scsibus2 at umass0: 2 targets, initiator 0
Oct 26 12:54:06 mac /bsd: sd0 at scsibus2 targ 1 lun 0: <HTC, Android Phone, 0000> SCSI2 0/direct removable serial.0bb40ff9SH0BHRT00209
Oct 26 12:54:06 mac /bsd: uvideo0 at uhub4
Oct 26 12:54:06 mac /bsd:  port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 3
Oct 26 12:54:06 mac /bsd: video0 at uvideo0
Oct 26 12:54:08 mac /bsd: uhidev0 at uhub0
Oct 26 12:54:08 mac /bsd:  port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
Oct 26 12:54:09 mac /bsd: uhidev0: iclass 3/1
Oct 26 12:54:09 mac /bsd: ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
Oct 26 12:54:09 mac /bsd: wskbd0 at ukbd0: console keyboard, using wsdisplay0
Oct 26 12:54:09 mac /bsd: uhidev1 at uhub0
Oct 26 12:54:09 mac /bsd:  port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
Oct 26 12:54:09 mac /bsd: uhidev1: iclass 3/1, 5 report ids
Oct 26 12:54:09 mac /bsd: ums0 at uhidev1 reportid 2: 3 buttons
Oct 26 12:54:09 mac /bsd: wsmouse0 at ums0 mux 0
Oct 26 12:54:09 mac /bsd: ums1 at uhidev1 reportid 5
Oct 26 12:54:09 mac /bsd:
Oct 26 12:54:09 mac /bsd: ums1: mouse has no X report
Oct 26 12:54:09 mac /bsd: uhidev2 at uhub0
Oct 26 12:54:09 mac /bsd:  port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
Oct 26 12:54:09 mac /bsd: uhidev2: iclass 3/0
Oct 26 12:54:09 mac /bsd: uhid0 at uhidev2: input=1, output=0, feature=0
Oct 26 12:54:10 mac /bsd: uhidev3 at uhub2
Oct 26 12:54:10 mac /bsd:  port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
Oct 26 12:54:10 mac /bsd: uhidev3: iclass 3/0, 38 report ids
Oct 26 12:54:10 mac /bsd: uhid1 at uhidev3 reportid 36
Oct 26 12:54:10 mac /bsd: : input=4, output=0, feature=0
Oct 26 12:54:10 mac /bsd: uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
Oct 26 12:54:10 mac /bsd: uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
Oct 26 12:54:11 mac /bsd: uhidev4 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
Oct 26 12:54:11 mac /bsd: uhidev4: iclass 3/1
Oct 26 12:54:11 mac /bsd: ukbd1 at uhidev4: 8 variable keys, 6 key codes
Oct 26 12:54:12 mac /bsd: wskbd1 at ukbd1 mux 1
Oct 26 12:54:12 mac /bsd:
Oct 26 12:54:12 mac /bsd: wskbd1: connecting to wsdisplay0
Oct 26 12:54:12 mac /bsd: uhidev5 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
Oct 26 12:54:12 mac /bsd: uhidev5: iclass 3/1
Oct 26 12:54:12 mac /bsd: ums2 at uhidev5: 5 buttons
Oct 26 12:54:12 mac /bsd: wsmouse1 at ums2 mux 0
Oct 26 12:54:59 mac newsyslog[16753]: logfile turned over

12