From owner-svn-src-all@FreeBSD.ORG Sun Mar 1 15:03:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21671A5C; Sun, 1 Mar 2015 15:03:32 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E3F0A1A; Sun, 1 Mar 2015 15:03:30 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B943125D385E; Sun, 1 Mar 2015 15:03:21 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 75158C76FD5; Sun, 1 Mar 2015 15:03:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id rWHSFvBdq0fU; Sun, 1 Mar 2015 15:03:18 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:49e4:e093:2f28:d615] (unknown [IPv6:fde9:577b:c1a9:4410:49e4:e093:2f28:d615]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 332AFC76FCD; Sun, 1 Mar 2015 15:03:16 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r279487 - head/sys/dev/pci From: "Bjoern A. Zeeb" In-Reply-To: <201503011247.t21Clb2p035966@svn.freebsd.org> Date: Sun, 1 Mar 2015 15:02:44 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <106186A9-DB74-4709-AAEE-7784731FD526@FreeBSD.org> References: <201503011247.t21Clb2p035966@svn.freebsd.org> To: Jean-Sebastien Pedron X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 15:03:32 -0000 > On 01 Mar 2015, at 12:47 , Jean-Sebastien Pedron = wrote: >=20 > Author: dumbbell > Date: Sun Mar 1 12:47:36 2015 > New Revision: 279487 > URL: https://svnweb.freebsd.org/changeset/base/279487 >=20 > Log: > vgapci: New vga_pci_repost() function >=20 > This can be used to restore the VGA mode after a KMS driver is = unloaded. >=20 > Differential Revision: https://reviews.freebsd.org/D687 I think this broke a couple of i386 and pc98 kernel configs: pc98 GENERIC-NODEBUG kernel failed, check _.pc98.GENERIC-NODEBUG for = details pc98 GENERIC kernel failed, check _.pc98.GENERIC for details pc98 LINT kernel failed, check _.pc98.LINT for details i386 XBOX kernel failed, check _.i386.XBOX for details i386 XEN kernel failed, check _.i386.XEN for details linking kernel.debug vga_pci.o: In function `vga_pci_repost': /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x591): undefined = reference to `x86bios_get_orm' /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x5ac): undefined = reference to `x86bios_init_regs' /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x701): undefined = reference to `x86bios_call' /scratch/tmp/bz/head.svn/sys/dev/pci/vga_pci.c:(.text+0x70d): undefined = reference to `x86bios_get_intr' --- kernel.debug --- >=20 > Modified: > head/sys/dev/pci/pcivar.h > head/sys/dev/pci/vga_pci.c >=20 > Modified: head/sys/dev/pci/pcivar.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/pci/pcivar.h Sun Mar 1 10:39:19 2015 = (r279486) > +++ head/sys/dev/pci/pcivar.h Sun Mar 1 12:47:36 2015 = (r279487) > @@ -591,5 +591,6 @@ struct pcicfg_vpd *pci_fetch_vpd_list(de > int vga_pci_is_boot_display(device_t dev); > void * vga_pci_map_bios(device_t dev, size_t *size); > void vga_pci_unmap_bios(device_t dev, void *bios); > +int vga_pci_repost(device_t dev); >=20 > #endif /* _PCIVAR_H_ */ >=20 > Modified: head/sys/dev/pci/vga_pci.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/pci/vga_pci.c Sun Mar 1 10:39:19 2015 = (r279486) > +++ head/sys/dev/pci/vga_pci.c Sun Mar 1 12:47:36 2015 = (r279487) > @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); > #include > #include >=20 > +#include /* To re-POST the card. */ > + > struct vga_resource { > struct resource *vr_res; > int vr_refs; > @@ -194,6 +196,36 @@ vga_pci_unmap_bios(device_t dev, void *b > vr->vr_res); > } >=20 > +int > +vga_pci_repost(device_t dev) > +{ > +#if defined(__amd64__) || defined(__i386__) > + x86regs_t regs; > + > + if (!vga_pci_is_boot_display(dev)) > + return (EINVAL); > + > + if (x86bios_get_orm(VGA_PCI_BIOS_SHADOW_ADDR) =3D=3D NULL) > + return (ENOTSUP); > + > + x86bios_init_regs(®s); > + > + regs.R_AH =3D pci_get_bus(dev); > + regs.R_AL =3D (pci_get_slot(dev) << 3) | (pci_get_function(dev) = & 0x07); > + regs.R_DL =3D 0x80; > + > + device_printf(dev, "REPOSTing\n"); > + x86bios_call(®s, X86BIOS_PHYSTOSEG(VGA_PCI_BIOS_SHADOW_ADDR + = 3), > + X86BIOS_PHYSTOOFF(VGA_PCI_BIOS_SHADOW_ADDR + 3)); > + > + x86bios_get_intr(0x10); > + > + return (0); > +#else > + return (ENOTSUP); > +#endif > +} > + > static int > vga_pci_probe(device_t dev) > { >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend."