Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 1998 18:40:55 -0400 (EDT)
From:      woods@zeus.leitch.com (Greg A. Woods)
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/6481: Patches for VIA Socket 7 chipsets
Message-ID:  <199805042240.SAA21126@brain.zeus.leitch.com>

next in thread | raw e-mail | index | archive | help
The following hunk of code (in sys/pci/pcisupport.c:chipset_probe() from
2.2.6) shows a bit more detail on the FIC PA-2012 motherboard w/VIA-VP3
that we're testing....  Chip revision details were derived from the
on-line datasheets at www.via.com.tw.  Seems a bit silly to do all this
just for the probe messages, but it is kinda neat to see it all and know
you've got what you think you have.  It might be nice if the probe
message in which these strings appear used hex for the "rev" value too...

	/* VIA Technologies -- vendor 0x1106 (no MVP3 datasheets yet) */

	case 0x05851106:
		return("VIA 82C585 (Apollo VP1/VPX) system controller");
	case 0x05861106: /* south bridge section -- IDE (0x0571) is covered in pci.c */
#if 0
	{
		char *descr;
		unsigned classreg = pci_conf_read(tag, PCI_CLASS_REG);
		unsigned chiptype;

		chiptype = (classreg >> 4) & 0x0f;
		descr = malloc(sizeof("VIA 82C586B (3041 Production) PCI-ISA bridge (silicon rev=0xF)"),
			       M_DEVBUF, M_WAITOK);
		if (descr) {
			sprintf(descr, "VIA 82C586%s PCI-ISA bridge (silicon rev=%01x)",
				chiptype == 0 ? "" : 
				chiptype == 2 ? "A" :
				chiptype == 3 ? "B (3040 OEM)" :
				chiptype == 4 ? "B (3041 Production)" : "?",
				classreg & 0x0f);
		}
		return descr;
	}
#else
		/* low nibble is silicon revision # */
		/* high nibble is chip type */
		rev = ((unsigned) pci_conf_read(tag, PCI_CLASS_REG) >> 4) & 0x0f;
		if (rev == 0)
			return("VIA 82C586 PCI-ISA bridge");
		if (rev == 2)
			return("VIA 82C586A PCI-ISA bridge");
		if (rev == 3)
			return("VIA 82C586B (3040 OEM) PCI-ISA bridge");
		if (rev == 4)
			return("VIA 82C586B (3041 Production) PCI-ISA bridge");
		return("VIA 82C586? PCI-ISA bridge");
#endif
	case 0x05951106:
	case 0x15951106: /* This code is not mentioned in the VT82C595 preliminary datasheet */
		return("VIA 82C595 (Apollo VP2) system controller");
	case 0x05971106: /* also known as the "host bridge" */
		return("VIA 82C597 Device 0 (Apollo VP3) system controller");
	case 0x85971106:
		return("VIA 82C597 Device 1 (Apollo VP3) PCI-PCI bridge");
	case 0x30381106:
		return("VIA 82C586B or 83C572 USB host controller");
	case 0x30401106:
#if 0
		/* low nibble is silicon revision #
		 * 0 = 3040 OEM
		 * 1 = 3041 Production]
		 */
		/* high nibble is silicon version code
		 * depends on revision #
		 * for 3040:  0 = 3040E, 1 = 3040F
		 * for 3041:  0 = 3041A
		 */
		rev = (unsigned) pci_conf_read (tag, PCI_CLASS_REG) & 0xff;
#endif
		return("VIA 82C586B ACPI Power Management interface");

-- 
							Greg A. Woods

+1 416 443-1734      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805042240.SAA21126>