Broadwellのagp(4)が認識されない問題

src/sys/dev/agp/agp_i810.c の agp_i810_matches にエントリがないので、足してみる。古いノートPCと比べると、どうやら pciconf -l して、vgapci0のchipのところに書いてあるアドレスが分かればいいようだ。

% pciconf -l
hostb0@pci0:0:0:0:	class=0x060000 card=0x833810f7 chip=0x16048086 rev=0x09 hdr=0x00
vgapci0@pci0:0:2:0:	class=0x030000 card=0x833810f7 chip=0x16168086 rev=0x09 hdr=0x00
(以下略)

この場合は0x16168086である。

というわけで、エントリを加えてみる。名前はよくわからない(Intel Core i7-5600Uなのだが、、、)ので、適当にしておく。中身はHaswellのコードそのままで動くことを期待してみる。

--- agp_i810.c.bk	2015-06-04 14:52:16.699075000 +0900
+++ agp_i810.c	2015-06-04 15:23:39.580476000 +0900
@@ -797,6 +797,11 @@
 		.driver = &agp_i810_hsw_driver
 	},
 	{
+		.devid = 0x16168086,
+		.name = "Broadwell",
+		.driver = &agp_i810_hsw_driver
+	},
+	{
 		.devid = 0,
 	}
 };

カーネル作りなおしてリブート。

# cd /usr/src
# make buildkernel KERNCONF=WAVE
# make installkernel KERNCONF=WAVE
# shutdown -r now

すると、

agp0: <Broadwell> on vgapci0
agp0: aperture size is 256M, detected 4194300k stolen memory

という感じで認識された。おー。

xf86-video-intelドライバ(2.99.917)でXが起動するか試してみたが、起動しなかった。

まだどこか変更しないといけないのかな。src/sys/dev/drm{,2}が怪しい?