Use the right bits for the AGP version.
This commit is contained in:
parent
8c56c583be
commit
10ced29306
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: agpreg.h,v 1.6 2003/07/20 18:56:32 hannken Exp $ */
|
||||
/* $NetBSD: agpreg.h,v 1.7 2004/02/04 06:58:24 soren Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Doug Rabson
|
||||
@ -36,15 +36,6 @@
|
||||
*/
|
||||
#define AGP_APBASE 0x10
|
||||
|
||||
/*
|
||||
* Offsets from the AGP Capability pointer.
|
||||
*/
|
||||
#define AGP_CAPID 0xa0
|
||||
#define AGP_CAPID_GET_MAJOR(x) (((x) & 0x00f00000U) >> 20)
|
||||
#define AGP_CAPID_GET_MINOR(x) (((x) & 0x000f0000U) >> 16)
|
||||
#define AGP_CAPID_GET_NEXT_PTR(x) (((x) & 0x0000ff00U) >> 8)
|
||||
#define AGP_CAPID_GET_CAP_ID(x) (((x) & 0x000000ffU) >> 0)
|
||||
|
||||
#define AGP_STATUS 0x4
|
||||
#define AGP_COMMAND 0x8
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci_subr.c,v 1.56 2003/06/29 22:30:26 fvdl Exp $ */
|
||||
/* $NetBSD: pci_subr.c,v 1.57 2004/02/04 06:58:24 soren Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Zubin D. Dittia. All rights reserved.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.56 2003/06/29 22:30:26 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.57 2004/02/04 06:58:24 soren Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_pci.h"
|
||||
@ -809,8 +809,8 @@ pci_conf_print_caplist(
|
||||
break;
|
||||
case PCI_CAP_AGP:
|
||||
printf("AGP, rev. %d.%d",
|
||||
(rval >> 24) & 0x0f,
|
||||
(rval >> 20) & 0x0f);
|
||||
PCI_CAP_AGP_MAJOR(rval),
|
||||
PCI_CAP_AGP_MINOR(rval));
|
||||
break;
|
||||
case PCI_CAP_VPD:
|
||||
printf("VPD");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcireg.h,v 1.44 2003/12/02 16:31:06 briggs Exp $ */
|
||||
/* $NetBSD: pcireg.h,v 1.45 2004/02/04 06:58:24 soren Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1999, 2000
|
||||
@ -405,7 +405,7 @@ typedef u_int8_t pci_revision_t;
|
||||
#define PCI_SUBSYS_ID_REG 0x2c
|
||||
|
||||
/*
|
||||
* capabilities link list (PCI rev. 2.2)
|
||||
* Capabilities link list (PCI rev. 2.2)
|
||||
*/
|
||||
#define PCI_CAPLISTPTR_REG 0x34 /* header type 0 */
|
||||
#define PCI_CARDBUS_CAPLISTPTR_REG 0x14 /* header type 2 */
|
||||
@ -416,6 +416,8 @@ typedef u_int8_t pci_revision_t;
|
||||
#define PCI_CAP_RESERVED0 0x00
|
||||
#define PCI_CAP_PWRMGMT 0x01
|
||||
#define PCI_CAP_AGP 0x02
|
||||
#define PCI_CAP_AGP_MAJOR(cr) (((cr) >> 20) & 0xf)
|
||||
#define PCI_CAP_AGP_MINOR(cr) (((cr) >> 16) & 0xf)
|
||||
#define PCI_CAP_VPD 0x03
|
||||
#define PCI_CAP_SLOTID 0x04
|
||||
#define PCI_CAP_MSI 0x05
|
||||
|
Loading…
Reference in New Issue
Block a user