KASSERT() that reads/writes from/to PCI configuration space are

aligned on 32-bit boundaries.
This commit is contained in:
dyoung 2008-01-14 18:44:17 +00:00
parent 7f75548e50
commit 47e8740d49
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.c,v 1.30 2008/01/04 21:17:43 ad Exp $ */
/* $NetBSD: pci_machdep.c,v 1.31 2008/01/14 18:44:17 dyoung Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.30 2008/01/04 21:17:43 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.31 2008/01/14 18:44:17 dyoung Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -376,6 +376,7 @@ pci_conf_read( pci_chipset_tag_t pc, pcitag_t tag,
pcireg_t data;
int s;
KASSERT((reg & 0x3) == 0);
#if defined(__i386__) && defined(XBOX)
if (arch_i386_is_xbox) {
int bus, dev, fn;
@ -428,6 +429,7 @@ pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg,
{
int s;
KASSERT((reg & 0x3) == 0);
#if defined(__i386__) && defined(XBOX)
if (arch_i386_is_xbox) {
int bus, dev, fn;