- use aprint_*_dev and device_xname

- use POSIX integer types
This commit is contained in:
cegger 2008-04-16 16:06:51 +00:00
parent 1ff012e906
commit 5c97fc53e8
34 changed files with 531 additions and 543 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpufunc.h,v 1.4 2008/01/01 12:51:08 yamt Exp $ */
/* $NetBSD: cpufunc.h,v 1.5 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@ -119,11 +119,11 @@ void x86_write_flags(u_long);
#define OPTERON_MSR_PASSCODE 0x9c5a203aU
uint64_t rdmsr(u_int);
u_int64_t rdmsr_locked(u_int, u_int);
uint64_t rdmsr_locked(u_int, u_int);
uint64_t rdtsc(void);
uint64_t rdpmc(u_int);
void wrmsr(u_int, uint64_t);
void wrmsr_locked(u_int, u_int, u_int64_t);
void wrmsr_locked(u_int, u_int, uint64_t);
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpuvar.h,v 1.22 2008/01/04 15:55:28 yamt Exp $ */
/* $NetBSD: cpuvar.h,v 1.23 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@ -101,7 +101,7 @@ struct cpu_attach_args {
#endif
#ifdef MULTIPROCESSOR
extern u_int32_t cpus_running;
extern uint32_t cpus_running;
#endif
int x86_ipi(int,int,int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82093var.h,v 1.4 2007/12/09 20:27:48 jmcneill Exp $ */
/* $NetBSD: i82093var.h,v 1.5 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -61,8 +61,8 @@ struct ioapic_softc {
int sc_apic_sz; /* apic size*/
int sc_flags;
paddr_t sc_pa; /* PA of ioapic */
volatile u_int32_t *sc_reg; /* KVA of ioapic addr */
volatile u_int32_t *sc_data; /* KVA of ioapic data */
volatile uint32_t *sc_reg; /* KVA of ioapic addr */
volatile uint32_t *sc_data; /* KVA of ioapic data */
struct ioapic_pin *sc_pins; /* sc_apic_sz entries */
};
@ -89,7 +89,7 @@ void *apic_intr_establish(int, int, int, int (*)(void *), void *);
void apic_intr_disestablish(void *);
void ioapic_print_redir(struct ioapic_softc *, const char *, int);
void ioapic_format_redir(char *, const char *, int, u_int32_t, u_int32_t);
void ioapic_format_redir(char *, const char *, int, uint32_t, uint32_t);
struct ioapic_softc *ioapic_find(int);
struct ioapic_softc *ioapic_find_bybase(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipmivar.h,v 1.6 2007/11/16 08:00:13 xtraeme Exp $ */
/* $NetBSD: ipmivar.h,v 1.7 2008/04/16 16:06:51 cegger Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@ -47,9 +47,9 @@ struct ipmi_softc;
struct ipmi_bmc_args{
int offset;
u_int8_t mask;
u_int8_t value;
volatile u_int8_t *v;
uint8_t mask;
uint8_t value;
volatile uint8_t *v;
};
struct ipmi_attach_args {
@ -70,8 +70,8 @@ struct ipmi_if {
int nregs;
void *(*buildmsg)(struct ipmi_softc *, int, int, int,
const void *, int *);
int (*sendmsg)(struct ipmi_softc *, int, const u_int8_t *);
int (*recvmsg)(struct ipmi_softc *, int, int *, u_int8_t *);
int (*sendmsg)(struct ipmi_softc *, int, const uint8_t *);
int (*recvmsg)(struct ipmi_softc *, int, int *, uint8_t *);
int (*reset)(struct ipmi_softc *);
int (*probe)(struct ipmi_softc *);
};
@ -136,45 +136,45 @@ struct ipmi_thread {
#define IPMI_WDOG_ACT_PRE_INTERRUPT 0x30
struct ipmi_set_watchdog {
u_int8_t wdog_use;
u_int8_t wdog_action;
u_int8_t wdog_pretimeout;
u_int8_t wdog_flags;
u_int16_t wdog_timeout;
uint8_t wdog_use;
uint8_t wdog_action;
uint8_t wdog_pretimeout;
uint8_t wdog_flags;
uint16_t wdog_timeout;
} __packed;
struct ipmi_get_watchdog {
u_int8_t wdog_use;
u_int8_t wdog_action;
u_int8_t wdog_pretimeout;
u_int8_t wdog_flags;
u_int16_t wdog_timeout;
u_int16_t wdog_countdown;
uint8_t wdog_use;
uint8_t wdog_action;
uint8_t wdog_pretimeout;
uint8_t wdog_flags;
uint16_t wdog_timeout;
uint16_t wdog_countdown;
} __packed;
void ipmi_poll_thread(void *);
int kcs_probe(struct ipmi_softc *);
int kcs_reset(struct ipmi_softc *);
int kcs_sendmsg(struct ipmi_softc *, int, const u_int8_t *);
int kcs_recvmsg(struct ipmi_softc *, int, int *len, u_int8_t *);
int kcs_sendmsg(struct ipmi_softc *, int, const uint8_t *);
int kcs_recvmsg(struct ipmi_softc *, int, int *len, uint8_t *);
int bt_probe(struct ipmi_softc *);
int bt_reset(struct ipmi_softc *);
int bt_sendmsg(struct ipmi_softc *, int, const u_int8_t *);
int bt_recvmsg(struct ipmi_softc *, int, int *, u_int8_t *);
int bt_sendmsg(struct ipmi_softc *, int, const uint8_t *);
int bt_recvmsg(struct ipmi_softc *, int, int *, uint8_t *);
int smic_probe(struct ipmi_softc *);
int smic_reset(struct ipmi_softc *);
int smic_sendmsg(struct ipmi_softc *, int, const u_int8_t *);
int smic_recvmsg(struct ipmi_softc *, int, int *, u_int8_t *);
int smic_sendmsg(struct ipmi_softc *, int, const uint8_t *);
int smic_recvmsg(struct ipmi_softc *, int, int *, uint8_t *);
struct dmd_ipmi {
u_int8_t dmd_sig[4]; /* Signature 'IPMI' */
u_int8_t dmd_i2c_address; /* Address of BMC */
u_int8_t dmd_nvram_address; /* Address of NVRAM */
u_int8_t dmd_if_type; /* IPMI Interface Type */
u_int8_t dmd_if_rev; /* IPMI Interface Revision */
uint8_t dmd_sig[4]; /* Signature 'IPMI' */
uint8_t dmd_i2c_address; /* Address of BMC */
uint8_t dmd_nvram_address; /* Address of NVRAM */
uint8_t dmd_if_type; /* IPMI Interface Type */
uint8_t dmd_if_rev; /* IPMI Interface Revision */
} __packed;
@ -219,87 +219,87 @@ struct dmd_ipmi {
#define SE_GET_SENSOR_TYPE 0x2F
struct sdrhdr {
u_int16_t record_id; /* SDR Record ID */
u_int8_t sdr_version; /* SDR Version */
u_int8_t record_type; /* SDR Record Type */
u_int8_t record_length; /* SDR Record Length */
uint16_t record_id; /* SDR Record ID */
uint8_t sdr_version; /* SDR Version */
uint8_t record_type; /* SDR Record Type */
uint8_t record_length; /* SDR Record Length */
} __packed;
/* SDR: Record Type 1 */
struct sdrtype1 {
struct sdrhdr sdrhdr;
u_int8_t owner_id;
u_int8_t owner_lun;
u_int8_t sensor_num;
uint8_t owner_id;
uint8_t owner_lun;
uint8_t sensor_num;
u_int8_t entity_id;
u_int8_t entity_instance;
u_int8_t sensor_init;
u_int8_t sensor_caps;
u_int8_t sensor_type;
u_int8_t event_code;
u_int16_t trigger_mask;
u_int16_t reading_mask;
u_int16_t settable_mask;
u_int8_t units1;
u_int8_t units2;
u_int8_t units3;
u_int8_t linear;
u_int8_t m;
u_int8_t m_tolerance;
u_int8_t b;
u_int8_t b_accuracy;
u_int8_t accuracyexp;
u_int8_t rbexp;
u_int8_t analogchars;
u_int8_t nominalreading;
u_int8_t normalmax;
u_int8_t normalmin;
u_int8_t sensormax;
u_int8_t sensormin;
u_int8_t uppernr;
u_int8_t upperc;
u_int8_t uppernc;
u_int8_t lowernr;
u_int8_t lowerc;
u_int8_t lowernc;
u_int8_t physt;
u_int8_t nhyst;
u_int8_t resvd[2];
u_int8_t oem;
u_int8_t typelen;
u_int8_t name[1];
uint8_t entity_id;
uint8_t entity_instance;
uint8_t sensor_init;
uint8_t sensor_caps;
uint8_t sensor_type;
uint8_t event_code;
uint16_t trigger_mask;
uint16_t reading_mask;
uint16_t settable_mask;
uint8_t units1;
uint8_t units2;
uint8_t units3;
uint8_t linear;
uint8_t m;
uint8_t m_tolerance;
uint8_t b;
uint8_t b_accuracy;
uint8_t accuracyexp;
uint8_t rbexp;
uint8_t analogchars;
uint8_t nominalreading;
uint8_t normalmax;
uint8_t normalmin;
uint8_t sensormax;
uint8_t sensormin;
uint8_t uppernr;
uint8_t upperc;
uint8_t uppernc;
uint8_t lowernr;
uint8_t lowerc;
uint8_t lowernc;
uint8_t physt;
uint8_t nhyst;
uint8_t resvd[2];
uint8_t oem;
uint8_t typelen;
uint8_t name[1];
} __packed;
/* SDR: Record Type 2 */
struct sdrtype2 {
struct sdrhdr sdrhdr;
u_int8_t owner_id;
u_int8_t owner_lun;
u_int8_t sensor_num;
uint8_t owner_id;
uint8_t owner_lun;
uint8_t sensor_num;
u_int8_t entity_id;
u_int8_t entity_instance;
u_int8_t sensor_init;
u_int8_t sensor_caps;
u_int8_t sensor_type;
u_int8_t event_code;
u_int16_t trigger_mask;
u_int16_t reading_mask;
u_int16_t set_mask;
u_int8_t units1;
u_int8_t units2;
u_int8_t units3;
u_int8_t share1;
u_int8_t share2;
u_int8_t physt;
u_int8_t nhyst;
u_int8_t resvd[3];
u_int8_t oem;
u_int8_t typelen;
u_int8_t name[1];
uint8_t entity_id;
uint8_t entity_instance;
uint8_t sensor_init;
uint8_t sensor_caps;
uint8_t sensor_type;
uint8_t event_code;
uint16_t trigger_mask;
uint16_t reading_mask;
uint16_t set_mask;
uint8_t units1;
uint8_t units2;
uint8_t units3;
uint8_t share1;
uint8_t share2;
uint8_t physt;
uint8_t nhyst;
uint8_t resvd[3];
uint8_t oem;
uint8_t typelen;
uint8_t name[1];
} __packed;
int ipmi_probe(struct ipmi_attach_args *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpbiosreg.h,v 1.3 2003/03/04 23:27:32 fvdl Exp $ */
/* $NetBSD: mpbiosreg.h,v 1.4 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -59,78 +59,78 @@
/* MP Floating Pointer Structure */
struct mpbios_fps {
u_int32_t signature;
uint32_t signature;
/* string defined by the Intel MP Spec as identifying the MP table */
#define MP_FP_SIG 0x5f504d5f /* _MP_ */
u_int32_t pap;
u_int8_t length;
u_int8_t spec_rev;
u_int8_t checksum;
u_int8_t mpfb1; /* system configuration */
u_int8_t mpfb2; /* flags */
uint32_t pap;
uint8_t length;
uint8_t spec_rev;
uint8_t checksum;
uint8_t mpfb1; /* system configuration */
uint8_t mpfb2; /* flags */
#define MPFPS_FLAG_IMCR 0x80 /* IMCR present */
u_int8_t mpfb3; /* unused */
u_int8_t mpfb4; /* unused */
u_int8_t mpfb5; /* unused */
uint8_t mpfb3; /* unused */
uint8_t mpfb4; /* unused */
uint8_t mpfb5; /* unused */
};
/* MP Configuration Table Header */
struct mpbios_cth {
u_int32_t signature;
uint32_t signature;
#define MP_CT_SIG 0x504d4350 /* PCMP */
u_int16_t base_len;
u_int8_t spec_rev;
u_int8_t checksum;
u_int8_t oem_id[8];
u_int8_t product_id[12];
u_int32_t oem_table_pointer;
u_int16_t oem_table_size;
u_int16_t entry_count;
u_int32_t apic_address;
u_int16_t ext_len;
u_int8_t ext_cksum;
u_int8_t reserved;
uint16_t base_len;
uint8_t spec_rev;
uint8_t checksum;
uint8_t oem_id[8];
uint8_t product_id[12];
uint32_t oem_table_pointer;
uint16_t oem_table_size;
uint16_t entry_count;
uint32_t apic_address;
uint16_t ext_len;
uint8_t ext_cksum;
uint8_t reserved;
};
struct mpbios_proc {
u_int8_t type;
u_int8_t apic_id;
u_int8_t apic_version;
u_int8_t cpu_flags;
uint8_t type;
uint8_t apic_id;
uint8_t apic_version;
uint8_t cpu_flags;
#define PROCENTRY_FLAG_EN 0x01
#define PROCENTRY_FLAG_BP 0x02
u_int32_t cpu_signature;
u_int32_t feature_flags;
u_int32_t reserved1;
u_int32_t reserved2;
uint32_t cpu_signature;
uint32_t feature_flags;
uint32_t reserved1;
uint32_t reserved2;
};
struct mpbios_bus {
u_int8_t type;
u_int8_t bus_id;
uint8_t type;
uint8_t bus_id;
char bus_type[6];
};
struct mpbios_ioapic {
u_int8_t type;
u_int8_t apic_id;
u_int8_t apic_version;
u_int8_t apic_flags;
uint8_t type;
uint8_t apic_id;
uint8_t apic_version;
uint8_t apic_flags;
#define IOAPICENTRY_FLAG_EN 0x01
u_int32_t apic_address;
uint32_t apic_address;
};
struct mpbios_int {
u_int8_t type;
u_int8_t int_type;
u_int16_t int_flags;
u_int8_t src_bus_id;
u_int8_t src_bus_irq;
u_int8_t dst_apic_id;
uint8_t type;
uint8_t int_type;
uint16_t int_flags;
uint8_t src_bus_id;
uint8_t src_bus_irq;
uint8_t dst_apic_id;
#define MPS_ALL_APICS 0xff
u_int8_t dst_apic_int;
uint8_t dst_apic_int;
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpconfig.h,v 1.9 2006/07/04 00:30:22 christos Exp $ */
/* $NetBSD: mpconfig.h,v 1.10 2008/04/16 16:06:51 cegger Exp $ */
/*
* Definitions originally from the mpbios code, but now used for ACPI
@ -40,9 +40,9 @@ struct mp_bus
const char *mb_name; /* XXX bus name */
int mb_idx; /* XXX bus index */
void (*mb_intr_print)(int);
void (*mb_intr_cfg)(const struct mpbios_int *, u_int32_t *);
void (*mb_intr_cfg)(const struct mpbios_int *, uint32_t *);
struct mp_intr_map *mb_intrs;
u_int32_t mb_data; /* random bus-specific datum. */
uint32_t mb_data; /* random bus-specific datum. */
int mb_configured; /* has been autoconfigured */
pcitag_t *mb_pci_bridge_tag;
pci_chipset_tag_t mb_pci_chipset_tag;
@ -58,7 +58,7 @@ struct mp_intr_map
int ioapic_ih; /* int handle, for apic_intr_est */
int type; /* from mp spec intr record */
int flags; /* from mp spec intr record */
u_int32_t redir;
uint32_t redir;
int cpu_id;
int global_int; /* ACPI global interrupt number */
int sflags; /* other, software flags (see below) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.h,v 1.6 2005/06/20 11:04:15 sekiya Exp $ */
/* $NetBSD: pci_machdep.h,v 1.7 2008/04/16 16:06:51 cegger Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -58,11 +58,11 @@
* Mode 2 is historical and deprecated by the Revision 2.0 specification.
*/
union x86_pci_tag_u {
u_int32_t mode1;
uint32_t mode1;
struct {
u_int16_t port;
u_int8_t enable;
u_int8_t forward;
uint16_t port;
uint8_t enable;
uint8_t forward;
} mode2;
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbiosvar.h,v 1.2 2008/03/30 15:26:20 ad Exp $ */
/* $NetBSD: smbiosvar.h,v 1.3 2008/04/16 16:06:51 cegger Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
* Copyright (c) 2005 Jordan Hargrave
@ -43,40 +43,40 @@
#define SMBIOS_UUID_REPLEN 37 /* 16 zero padded values, 4 hyphens, 1 null */
struct smbios_entry {
u_int8_t mjr;
u_int8_t min;
u_int8_t *addr;
u_int16_t len;
u_int16_t count;
uint8_t mjr;
uint8_t min;
uint8_t *addr;
uint16_t len;
uint16_t count;
};
struct smbhdr {
u_int32_t sig; /* "_SM_" */
u_int8_t checksum; /* Entry point checksum */
u_int8_t len; /* Entry point structure length */
u_int8_t majrev; /* Specification major revision */
u_int8_t minrev; /* Specification minor revision */
u_int16_t mss; /* Maximum Structure Size */
u_int8_t epr; /* Entry Point Revision */
u_int8_t fa[5]; /* value determined by EPR */
u_int8_t sasig[5]; /* Secondary Anchor "_DMI_" */
u_int8_t sachecksum; /* Secondary Checksum */
u_int16_t size; /* Length of structure table in bytes */
u_int32_t addr; /* Structure table address */
u_int16_t count; /* Number of SMBIOS structures */
u_int8_t rev; /* BCD revision */
uint32_t sig; /* "_SM_" */
uint8_t checksum; /* Entry point checksum */
uint8_t len; /* Entry point structure length */
uint8_t majrev; /* Specification major revision */
uint8_t minrev; /* Specification minor revision */
uint16_t mss; /* Maximum Structure Size */
uint8_t epr; /* Entry Point Revision */
uint8_t fa[5]; /* value determined by EPR */
uint8_t sasig[5]; /* Secondary Anchor "_DMI_" */
uint8_t sachecksum; /* Secondary Checksum */
uint16_t size; /* Length of structure table in bytes */
uint32_t addr; /* Structure table address */
uint16_t count; /* Number of SMBIOS structures */
uint8_t rev; /* BCD revision */
} __packed;
struct smbtblhdr {
u_int8_t type;
u_int8_t size;
u_int16_t handle;
uint8_t type;
uint8_t size;
uint16_t handle;
} __packed;
struct smbtable {
struct smbtblhdr *hdr;
void *tblhdr;
u_int32_t cookie;
uint32_t cookie;
};
#define SMBIOS_TYPE_BIOS 0
@ -127,17 +127,17 @@ struct smbtable {
* DMTF Specification DSP0134 Section: 3.3.1 p.g. 34
*/
struct smbios_struct_bios {
u_int8_t vendor; /* string */
u_int8_t version; /* string */
u_int16_t startaddr;
u_int8_t release; /* string */
u_int8_t romsize;
u_int64_t characteristics;
u_int32_t charext;
u_int8_t major_rel;
u_int8_t minor_rel;
u_int8_t ecf_mjr_rel; /* embedded controler firmware */
u_int8_t ecf_min_rel; /* embedded controler firmware */
uint8_t vendor; /* string */
uint8_t version; /* string */
uint16_t startaddr;
uint8_t release; /* string */
uint8_t romsize;
uint64_t characteristics;
uint32_t charext;
uint8_t major_rel;
uint8_t minor_rel;
uint8_t ecf_mjr_rel; /* embedded controler firmware */
uint8_t ecf_min_rel; /* embedded controler firmware */
} __packed;
/*
@ -147,16 +147,16 @@ struct smbios_struct_bios {
struct smbios_sys {
/* SMBIOS spec 2.0+ */
u_int8_t vendor; /* string */
u_int8_t product; /* string */
u_int8_t version; /* string */
u_int8_t serial; /* string */
uint8_t vendor; /* string */
uint8_t product; /* string */
uint8_t version; /* string */
uint8_t serial; /* string */
/* SMBIOS spec 2.1+ */
u_int8_t uuid[16];
u_int8_t wakeup;
uint8_t uuid[16];
uint8_t wakeup;
/* SMBIOS spec 2.4+ */
u_int8_t sku; /* string */
u_int8_t family; /* string */
uint8_t sku; /* string */
uint8_t family; /* string */
} __packed;
/*
@ -164,16 +164,16 @@ struct smbios_sys {
* DMTF Specification DSP0134 Section 3.3.3 p.g. 37
*/
struct smbios_board {
u_int8_t vendor; /* string */
u_int8_t product; /* string */
u_int8_t version; /* string */
u_int8_t serial; /* string */
u_int8_t asset; /* stirng */
u_int8_t feature; /* feature flags */
u_int8_t location; /* location in chassis */
u_int16_t handle; /* chassis handle */
u_int8_t type; /* board type */
u_int8_t noc; /* number of contained objects */
uint8_t vendor; /* string */
uint8_t product; /* string */
uint8_t version; /* string */
uint8_t serial; /* string */
uint8_t asset; /* stirng */
uint8_t feature; /* feature flags */
uint8_t location; /* location in chassis */
uint16_t handle; /* chassis handle */
uint8_t type; /* board type */
uint8_t noc; /* number of contained objects */
} __packed;
/*
@ -197,14 +197,14 @@ struct smbios_slot {
* DMTF Specification DSP0134 Section 3.3.39 p.g. 91
*/
struct smbios_ipmi {
u_int8_t smipmi_if_type; /* IPMI Interface Type */
u_int8_t smipmi_if_rev; /* BCD IPMI Revision */
u_int8_t smipmi_i2c_address; /* I2C address of BMC */
u_int8_t smipmi_nvram_address; /* I2C address of NVRAM
uint8_t smipmi_if_type; /* IPMI Interface Type */
uint8_t smipmi_if_rev; /* BCD IPMI Revision */
uint8_t smipmi_i2c_address; /* I2C address of BMC */
uint8_t smipmi_nvram_address; /* I2C address of NVRAM
* storage */
u_int64_t smipmi_base_address; /* Base address of BMC (BAR
uint64_t smipmi_base_address; /* Base address of BMC (BAR
* format */
u_int8_t smipmi_base_flags; /* Flags field:
uint8_t smipmi_base_flags; /* Flags field:
* bit 7:6 : register spacing
* 00 = byte
* 01 = dword
@ -214,10 +214,10 @@ struct smbios_ipmi {
* bit 2 : N/A
* bit 1 : Interrupt polarity
* bit 0 : Interrupt trigger */
u_int8_t smipmi_irq; /* IRQ if applicable */
uint8_t smipmi_irq; /* IRQ if applicable */
} __packed;
int smbios_find_table(u_int8_t, struct smbtable *);
char *smbios_get_string(struct smbtable *, u_int8_t, char *, size_t);
int smbios_find_table(uint8_t, struct smbtable *);
char *smbios_get_string(struct smbtable *, uint8_t, char *, size_t);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: via_padlock.h,v 1.1 2007/02/17 00:28:25 daniel Exp $ */
/* $NetBSD: via_padlock.h,v 1.2 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
@ -41,18 +41,18 @@
#define C3_CRYPT_CWLO_KEY256 0x0000080e /* 256bit, 15 rds */
struct via_padlock_session {
u_int32_t ses_ekey[4 * (RIJNDAEL_MAXNR + 1) + 4]; /* 128 bit aligned */
u_int32_t ses_dkey[4 * (RIJNDAEL_MAXNR + 1) + 4]; /* 128 bit aligned */
u_int8_t ses_iv[16]; /* 128 bit aligned */
u_int32_t ses_cw0;
uint32_t ses_ekey[4 * (RIJNDAEL_MAXNR + 1) + 4]; /* 128 bit aligned */
uint32_t ses_dkey[4 * (RIJNDAEL_MAXNR + 1) + 4]; /* 128 bit aligned */
uint8_t ses_iv[16]; /* 128 bit aligned */
uint32_t ses_cw0;
struct swcr_data *swd;
int ses_klen;
int ses_used;
};
struct via_padlock_softc {
u_int32_t op_cw[4]; /* 128 bit aligned */
u_int8_t op_iv[16]; /* 128 bit aligned */
uint32_t op_cw[4]; /* 128 bit aligned */
uint8_t op_iv[16]; /* 128 bit aligned */
void *op_buf;
/* normal softc stuff */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ichlpcib.c,v 1.9 2008/03/21 13:25:27 xtraeme Exp $ */
/* $NetBSD: ichlpcib.c,v 1.10 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.9 2008/03/21 13:25:27 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.10 2008/04/16 16:06:51 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -680,8 +680,7 @@ lpcib_hpet_match(device_t parent, cfdata_t match, void *aux)
tag = arg->hpet_mem_t;
if (bus_space_map(tag, arg->hpet_reg, HPET_WINDOW_SIZE, 0, &handle)) {
aprint_verbose("%s: HPET window not mapped, skipping\n",
parent->dv_xname);
aprint_verbose_dev(parent, "HPET window not mapped, skipping\n");
return 0;
}
bus_space_unmap(tag, handle, HPET_WINDOW_SIZE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pchb.c,v 1.9 2008/03/04 15:33:06 cube Exp $ */
/* $NetBSD: pchb.c,v 1.10 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.9 2008/03/04 15:33:06 cube Exp $");
__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.10 2008/04/16 16:06:51 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -220,9 +220,9 @@ pchbattach(device_t parent, device_t self, void *aux)
bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag,
I82443BX_SDRAMC_REG);
if ((bcreg & 0x03000000) != 0x01000000) {
aprint_verbose("%s: fixing "
aprint_verbose_dev(self, "fixing "
"Idle/Pipeline DRAM "
"Leadoff Timing\n", self->dv_xname);
"Leadoff Timing\n");
bcreg &= ~0x03000000;
bcreg |= 0x01000000;
pci_conf_write(pa->pa_pc, pa->pa_tag,

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.c,v 1.32 2008/03/21 00:24:34 dyoung Exp $ */
/* $NetBSD: pci_machdep.c,v 1.33 2008/04/16 16:06:51 cegger 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.32 2008/03/21 00:24:34 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.33 2008/04/16 16:06:51 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -161,7 +161,7 @@ do { \
#define _qe(bus, dev, fcn, vend, prod) \
{_m1tag(bus, dev, fcn), PCI_ID_CODE(vend, prod)}
struct {
u_int32_t tag;
uint32_t tag;
pcireg_t id;
} pcim1_quirk_tbl[] = {
_qe(0, 0, 0, PCI_VENDOR_COMPAQ, PCI_PRODUCT_COMPAQ_TRIFLEX1),
@ -475,7 +475,7 @@ mode2:
}
int
pci_mode_detect()
pci_mode_detect(void)
{
#ifdef PCI_CONF_MODE
@ -485,7 +485,7 @@ pci_mode_detect()
#error Invalid PCI configuration mode.
#endif
#else
u_int32_t sav, val;
uint32_t sav, val;
int i;
pcireg_t idreg;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciide_machdep.c,v 1.7 2007/12/01 06:05:40 jmcneill Exp $ */
/* $NetBSD: pciide_machdep.c,v 1.8 2008/04/16 16:06:51 cegger Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.7 2007/12/01 06:05:40 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.8 2008/04/16 16:06:51 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -81,12 +81,12 @@ pciide_machdep_compat_intr_establish(struct device *dev,
(intr_find_mpmapping(mp_isa_bus, irq, &mpih) == 0 ||
intr_find_mpmapping(mp_eisa_bus, irq, &mpih) == 0)) {
mpih |= irq;
aprint_normal("%s: %s channel interrupting at %s\n",
dev->dv_xname, PCIIDE_CHANNEL_NAME(chan),
aprint_normal_dev(dev, "%s channel interrupting at %s\n",
PCIIDE_CHANNEL_NAME(chan),
intr_string(mpih));
} else
#endif
aprint_normal("%s: %s channel interrupting at irq %d\n", dev->dv_xname,
aprint_normal_dev(dev, "%s channel interrupting at irq %d\n",
PCIIDE_CHANNEL_NAME(chan), irq);
return (cookie);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: apic.c,v 1.5 2008/01/04 18:38:32 ad Exp $ */
/* $NetBSD: apic.c,v 1.6 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: apic.c,v 1.5 2008/01/04 18:38:32 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: apic.c,v 1.6 2008/04/16 16:06:51 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -64,12 +64,8 @@ const char redirhifmt[] = "\177\20"
"f\30\10target\0";
void
apic_format_redir(where1, where2, idx, redirhi, redirlo)
const char *where1;
const char *where2;
int idx;
u_int32_t redirhi;
u_int32_t redirlo;
apic_format_redir(const char *where1, const char *where2, int idx,
uint32_t redirhi, uint32_t redirlo)
{
char buf[256];

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_space.c,v 1.16 2008/04/12 19:49:54 cegger Exp $ */
/* $NetBSD: bus_space.c,v 1.17 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.16 2008/04/12 19:49:54 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.17 2008/04/16 16:06:51 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -512,7 +512,7 @@ bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot,
void
bus_space_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int8_t v, size_t c)
uint8_t v, size_t c)
{
bus_addr_t addr = h + o;
@ -521,44 +521,44 @@ bus_space_set_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
outb(addr, v);
else
while (c--)
*(volatile u_int8_t *)(addr) = v;
*(volatile uint8_t *)(addr) = v;
}
void
bus_space_set_multi_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int16_t v, size_t c)
uint16_t v, size_t c)
{
bus_addr_t addr = h + o;
BUS_SPACE_ADDRESS_SANITY(addr, u_int16_t, "bus addr");
BUS_SPACE_ADDRESS_SANITY(addr, uint16_t, "bus addr");
if (t == X86_BUS_SPACE_IO)
while (c--)
outw(addr, v);
else
while (c--)
*(volatile u_int16_t *)(addr) = v;
*(volatile uint16_t *)(addr) = v;
}
void
bus_space_set_multi_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int32_t v, size_t c)
uint32_t v, size_t c)
{
bus_addr_t addr = h + o;
BUS_SPACE_ADDRESS_SANITY(addr, u_int32_t, "bus addr");
BUS_SPACE_ADDRESS_SANITY(addr, uint32_t, "bus addr");
if (t == X86_BUS_SPACE_IO)
while (c--)
outl(addr, v);
else
while (c--)
*(volatile u_int32_t *)(addr) = v;
*(volatile uint32_t *)(addr) = v;
}
void
bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int8_t v, size_t c)
uint8_t v, size_t c)
{
bus_addr_t addr = h + o;
@ -567,39 +567,39 @@ bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
outb(addr, v);
else
for (; c != 0; c--, addr++)
*(volatile u_int8_t *)(addr) = v;
*(volatile uint8_t *)(addr) = v;
}
void
bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int16_t v, size_t c)
uint16_t v, size_t c)
{
bus_addr_t addr = h + o;
BUS_SPACE_ADDRESS_SANITY(addr, u_int16_t, "bus addr");
BUS_SPACE_ADDRESS_SANITY(addr, uint16_t, "bus addr");
if (t == X86_BUS_SPACE_IO)
for (; c != 0; c--, addr += 2)
outw(addr, v);
else
for (; c != 0; c--, addr += 2)
*(volatile u_int16_t *)(addr) = v;
*(volatile uint16_t *)(addr) = v;
}
void
bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int32_t v, size_t c)
uint32_t v, size_t c)
{
bus_addr_t addr = h + o;
BUS_SPACE_ADDRESS_SANITY(addr, u_int32_t, "bus addr");
BUS_SPACE_ADDRESS_SANITY(addr, uint32_t, "bus addr");
if (t == X86_BUS_SPACE_IO)
for (; c != 0; c--, addr += 4)
outl(addr, v);
else
for (; c != 0; c--, addr += 4)
*(volatile u_int32_t *)(addr) = v;
*(volatile uint32_t *)(addr) = v;
}
void
@ -625,14 +625,14 @@ bus_space_copy_region_1(bus_space_tag_t t, bus_space_handle_t h1,
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; c != 0; c--, addr1++, addr2++)
*(volatile u_int8_t *)(addr2) =
*(volatile u_int8_t *)(addr1);
*(volatile uint8_t *)(addr2) =
*(volatile uint8_t *)(addr1);
} else {
/* dest after src: copy backwards */
for (addr1 += (c - 1), addr2 += (c - 1);
c != 0; c--, addr1--, addr2--)
*(volatile u_int8_t *)(addr2) =
*(volatile u_int8_t *)(addr1);
*(volatile uint8_t *)(addr2) =
*(volatile uint8_t *)(addr1);
}
}
}
@ -645,8 +645,8 @@ bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1,
bus_addr_t addr1 = h1 + o1;
bus_addr_t addr2 = h2 + o2;
BUS_SPACE_ADDRESS_SANITY(addr1, u_int16_t, "bus addr 1");
BUS_SPACE_ADDRESS_SANITY(addr2, u_int16_t, "bus addr 2");
BUS_SPACE_ADDRESS_SANITY(addr1, uint16_t, "bus addr 1");
BUS_SPACE_ADDRESS_SANITY(addr2, uint16_t, "bus addr 2");
if (t == X86_BUS_SPACE_IO) {
if (addr1 >= addr2) {
@ -663,14 +663,14 @@ bus_space_copy_region_2(bus_space_tag_t t, bus_space_handle_t h1,
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; c != 0; c--, addr1 += 2, addr2 += 2)
*(volatile u_int16_t *)(addr2) =
*(volatile u_int16_t *)(addr1);
*(volatile uint16_t *)(addr2) =
*(volatile uint16_t *)(addr1);
} else {
/* dest after src: copy backwards */
for (addr1 += 2 * (c - 1), addr2 += 2 * (c - 1);
c != 0; c--, addr1 -= 2, addr2 -= 2)
*(volatile u_int16_t *)(addr2) =
*(volatile u_int16_t *)(addr1);
*(volatile uint16_t *)(addr2) =
*(volatile uint16_t *)(addr1);
}
}
}
@ -683,8 +683,8 @@ bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1,
bus_addr_t addr1 = h1 + o1;
bus_addr_t addr2 = h2 + o2;
BUS_SPACE_ADDRESS_SANITY(addr1, u_int32_t, "bus addr 1");
BUS_SPACE_ADDRESS_SANITY(addr2, u_int32_t, "bus addr 2");
BUS_SPACE_ADDRESS_SANITY(addr1, uint32_t, "bus addr 1");
BUS_SPACE_ADDRESS_SANITY(addr2, uint32_t, "bus addr 2");
if (t == X86_BUS_SPACE_IO) {
if (addr1 >= addr2) {
@ -701,14 +701,14 @@ bus_space_copy_region_4(bus_space_tag_t t, bus_space_handle_t h1,
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; c != 0; c--, addr1 += 4, addr2 += 4)
*(volatile u_int32_t *)(addr2) =
*(volatile u_int32_t *)(addr1);
*(volatile uint32_t *)(addr2) =
*(volatile uint32_t *)(addr1);
} else {
/* dest after src: copy backwards */
for (addr1 += 4 * (c - 1), addr2 += 4 * (c - 1);
c != 0; c--, addr1 -= 4, addr2 -= 4)
*(volatile u_int32_t *)(addr2) =
*(volatile u_int32_t *)(addr1);
*(volatile uint32_t *)(addr2) =
*(volatile uint32_t *)(addr1);
}
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cacheinfo.c,v 1.15 2008/03/11 22:43:08 joerg Exp $ */
/* $NetBSD: cacheinfo.c,v 1.16 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cacheinfo.c,v 1.15 2008/03/11 22:43:08 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: cacheinfo.c,v 1.16 2008/04/16 16:06:51 cegger Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -65,7 +65,7 @@ print_cache_config(struct cpu_info *ci, int cache_tag, const char *name,
return sep;
if (sep == NULL)
aprint_verbose("%s: ", ci->ci_dev->dv_xname);
aprint_verbose_dev(ci->ci_dev, "");
else
aprint_verbose("%s", sep);
if (name != NULL)
@ -105,7 +105,7 @@ print_tlb_config(struct cpu_info *ci, int cache_tag, const char *name,
return sep;
if (sep == NULL)
aprint_verbose("%s: ", ci->ci_dev->dv_xname);
aprint_verbose_dev(ci->ci_dev, "");
else
aprint_verbose("%s", sep);
if (name != NULL)
@ -135,7 +135,7 @@ print_tlb_config(struct cpu_info *ci, int cache_tag, const char *name,
}
const struct x86_cache_info *
cache_info_lookup(const struct x86_cache_info *cai, u_int8_t desc)
cache_info_lookup(const struct x86_cache_info *cai, uint8_t desc)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.26 2008/04/13 22:23:58 cegger Exp $ */
/* $NetBSD: cpu.c,v 1.27 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.26 2008/04/13 22:23:58 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.27 2008/04/16 16:06:51 cegger Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@ -258,7 +258,7 @@ cpu_vm_init(struct cpu_info *ci)
*/
if (ncolors <= uvmexp.ncolors)
return;
aprint_verbose("%s: %d page colors\n", ci->ci_dev->dv_xname, ncolors);
aprint_verbose_dev(ci->ci_dev, "%d page colors\n", ncolors);
uvm_page_recolor(ncolors);
}
@ -712,7 +712,7 @@ cpu_debug_dump(void)
for (CPU_INFO_FOREACH(cii, ci)) {
db_printf("%p %s %ld %x %x %10p %10p\n",
ci,
ci->ci_dev == NULL ? "BOOT" : ci->ci_dev->dv_xname,
ci->ci_dev == NULL ? "BOOT" : device_xname(ci->ci_dev),
(long)ci->ci_cpuid,
ci->ci_flags, ci->ci_ipis,
ci->ci_curlwp,
@ -919,7 +919,7 @@ cpu_init_msrs(struct cpu_info *ci, bool full)
if (full) {
wrmsr(MSR_FSBASE, 0);
wrmsr(MSR_GSBASE, (u_int64_t)ci);
wrmsr(MSR_GSBASE, (uint64_t)ci);
wrmsr(MSR_KERNELGSBASE, 0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: errata.c,v 1.13 2007/11/14 17:55:00 ad Exp $ */
/* $NetBSD: errata.c,v 1.14 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.13 2007/11/14 17:55:00 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.14 2008/04/16 16:06:51 cegger Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -258,8 +258,8 @@ x86_errata_setmsr(struct cpu_info *ci, errata_t *e)
if ((val & e->e_data2) != 0)
return FALSE;
wrmsr_locked(e->e_data1, OPTERON_MSR_PASSCODE, val | e->e_data2);
aprint_debug("%s: erratum %d patched\n",
ci->ci_dev->dv_xname, e->e_num);
aprint_debug_dev(ci->ci_dev, "erratum %d patched\n",
e->e_num);
return FALSE;
}
@ -300,24 +300,24 @@ x86_errata(void)
continue;
}
aprint_debug("%s: testing for erratum %d\n",
ci->ci_dev->dv_xname, e->e_num);
aprint_debug_dev(ci->ci_dev, "testing for erratum %d\n",
e->e_num);
if (e->e_act == NULL)
e->e_reported = TRUE;
else if ((*e->e_act)(ci, e) == FALSE)
continue;
aprint_debug("%s: erratum %d present\n",
ci->ci_dev->dv_xname, e->e_num);
aprint_debug_dev(ci->ci_dev, "erratum %d present\n",
e->e_num);
upgrade = 1;
}
if (upgrade && !again) {
again = 1;
aprint_normal("%s: WARNING: AMD errata present, BIOS upgrade "
"may be\n", ci->ci_dev->dv_xname);
aprint_normal("%s: WARNING: necessary to ensure reliable "
"operation\n", ci->ci_dev->dv_xname);
aprint_normal_dev(ci->ci_dev, "WARNING: AMD errata present, BIOS upgrade "
"may be\n");
aprint_normal_dev(ci->ci_dev, "WARNING: necessary to ensure reliable "
"operation\n");
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: est.c,v 1.7 2007/12/09 20:27:50 jmcneill Exp $ */
/* $NetBSD: est.c,v 1.8 2008/04/16 16:06:51 cegger Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
@ -88,7 +88,7 @@
/* #define EST_DEBUG */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.7 2007/12/09 20:27:50 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.8 2008/04/16 16:06:51 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -817,7 +817,7 @@ static const uint16_t C7M_771[] = {
};
/* 1.50GHz Centaur C7-M 400 MHz FSB */
static const u_int16_t C7M_754[] = {
static const uint16_t C7M_754[] = {
ID16(1500, 1004, BUS100),
ID16(1400, 988, BUS100),
ID16(1000, 940, BUS100),
@ -1087,9 +1087,10 @@ est_init_main(int vendor)
uint8_t crhi, crlo, crcur;
int i, mv, rc;
size_t len, freq_len;
char *freq_names, *cpuname;
char *freq_names;
const char *cpuname;
cpuname = curcpu()->ci_dev->dv_xname;
cpuname = device_xname(curcpu()->ci_dev);
if (CPUID2FAMILY(curcpu()->ci_signature) == 15)
bus_clock = p4_get_bus_clock(curcpu());

View File

@ -1,4 +1,4 @@
/* $NetBSD: i8259.c,v 1.12 2007/10/17 19:58:16 garbled Exp $ */
/* $NetBSD: i8259.c,v 1.13 2008/04/16 16:06:51 cegger Exp $ */
/*
* Copyright 2002 (c) Wasabi Systems, Inc.
@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.12 2007/10/17 19:58:16 garbled Exp $");
__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.13 2008/04/16 16:06:51 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -193,7 +193,7 @@ static void
i8259_hwmask(struct pic *pic, int pin)
{
unsigned port;
u_int8_t byte;
uint8_t byte;
i8259_imen |= (1 << pin);
#ifdef PIC_MASKDELAY
@ -213,7 +213,7 @@ static void
i8259_hwunmask(struct pic *pic, int pin)
{
unsigned port;
u_int8_t byte;
uint8_t byte;
x86_disable_intr(); /* XXX */
i8259_imen &= ~(1 << pin);

View File

@ -1,4 +1,4 @@
/* $NetBSD: iclockmod.c,v 1.10 2007/12/02 22:44:57 rumble Exp $ */
/* $NetBSD: iclockmod.c,v 1.11 2008/04/16 16:06:51 cegger Exp $ */
/* $OpenBSD: p4tcc.c,v 1.13 2006/12/20 17:50:40 gwk Exp $ */
/*
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iclockmod.c,v 1.10 2007/12/02 22:44:57 rumble Exp $");
__KERNEL_RCSID(0, "$NetBSD: iclockmod.c,v 1.11 2008/04/16 16:06:51 cegger Exp $");
#include "opt_intel_odcm.h"
@ -200,8 +200,8 @@ clockmod_init_main(void)
/* Get current value */
clockmod_level = clockmod_getstate();
aprint_normal("%s: Intel(R) On Demand Clock Modulation (state %s)\n",
curcpu()->ci_dev->dv_xname, clockmod_level == (ODCM_MAXSTATES - 1) ?
aprint_normal_dev(curcpu()->ci_dev, "Intel(R) On Demand Clock Modulation (state %s)\n",
clockmod_level == (ODCM_MAXSTATES - 1) ?
"disabled" : "enabled");
/* Create sysctl machdep.clockmod subtree */

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.42 2008/04/11 16:44:45 dyoung Exp $ */
/* $NetBSD: intr.c,v 1.43 2008/04/16 16:06:51 cegger Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -140,7 +140,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.42 2008/04/11 16:44:45 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.43 2008/04/16 16:06:51 cegger Exp $");
#include "opt_multiprocessor.h"
#include "opt_acpi.h"
@ -509,7 +509,7 @@ intr_allocate_slot_cpu(struct cpu_info *ci, struct pic *pic, int pin,
snprintf(isp->is_evname, sizeof (isp->is_evname),
"pin %d", pin);
evcnt_attach_dynamic(&isp->is_evcnt, EVCNT_TYPE_INTR, NULL,
pic->pic_dev.dv_xname, isp->is_evname);
device_xname(&pic->pic_dev), isp->is_evname);
ci->ci_isources[slot] = isp;
}
mutex_exit(&x86_intr_lock);
@ -559,7 +559,7 @@ intr_allocate_slot(struct pic *pic, int legacy_irq, int pin, int level,
snprintf(isp->is_evname, sizeof (isp->is_evname),
"pin %d", pin);
evcnt_attach_dynamic(&isp->is_evcnt, EVCNT_TYPE_INTR,
NULL, pic->pic_dev.dv_xname, isp->is_evname);
NULL, device_xname(&pic->pic_dev), isp->is_evname);
mutex_enter(&x86_intr_lock);
ci->ci_isources[slot] = isp;
mutex_exit(&x86_intr_lock);
@ -688,7 +688,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
&idt_vec);
if (error != 0) {
printf("failed to allocate interrupt slot for PIC %s pin %d\n",
pic->pic_dev.dv_xname, pin);
device_xname(&pic->pic_dev), pin);
return NULL;
}
@ -736,7 +736,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level,
default:
mutex_exit(&x86_intr_lock);
panic("intr_establish: bad intr type %d for pic %s pin %d\n",
source->is_type, pic->pic_dev.dv_xname, pin);
source->is_type, device_xname(&pic->pic_dev), pin);
}
pic->pic_hwmask(pic, pin);
@ -836,7 +836,7 @@ intr_disestablish(struct intrhand *ih)
#ifdef INTRDEBUG
printf("cpu%u: remove slot %d (pic %s pin %d vec %d)\n",
ci->ci_apicid, ih->ih_slot, pic->pic_dev.dv_xname, ih->ih_pin,
ci->ci_apicid, ih->ih_slot, device_xname(&pic->pic_dev), ih->ih_pin,
idtvec);
#endif
@ -949,7 +949,7 @@ cpu_intr_init(struct cpu_info *ci)
isp->is_pic = &local_pic;
ci->ci_isources[LIR_TIMER] = isp;
evcnt_attach_dynamic(&isp->is_evcnt, EVCNT_TYPE_INTR, NULL,
ci->ci_dev->dv_xname, "timer");
device_xname(ci->ci_dev), "timer");
#ifdef MULTIPROCESSOR
MALLOC(isp, struct intrsource *, sizeof (struct intrsource), M_DEVBUF,
@ -965,7 +965,7 @@ cpu_intr_init(struct cpu_info *ci)
for (i = 0; i < X86_NIPI; i++)
evcnt_attach_dynamic(&ci->ci_ipi_events[i], EVCNT_TYPE_INTR,
NULL, ci->ci_dev->dv_xname, x86_ipi_names[i]);
NULL, device_xname(ci->ci_dev), x86_ipi_names[i]);
#endif
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: ioapic.c,v 1.31 2008/01/24 22:20:58 jmcneill Exp $ */
/* $NetBSD: ioapic.c,v 1.32 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.31 2008/01/24 22:20:58 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.32 2008/04/16 16:06:52 cegger Exp $");
#include "opt_ddb.h"
@ -148,10 +148,10 @@ ioapic_unlock(struct ioapic_softc *sc, u_long flags)
/*
* Register read/write routines.
*/
static inline u_int32_t
static inline uint32_t
ioapic_read_ul(struct ioapic_softc *sc,int regid)
{
u_int32_t val;
uint32_t val;
*(sc->sc_reg) = regid;
val = *sc->sc_data;
@ -161,17 +161,17 @@ ioapic_read_ul(struct ioapic_softc *sc,int regid)
}
static inline void
ioapic_write_ul(struct ioapic_softc *sc,int regid, u_int32_t val)
ioapic_write_ul(struct ioapic_softc *sc,int regid, uint32_t val)
{
*(sc->sc_reg) = regid;
*(sc->sc_data) = val;
}
#endif /* !_IOAPIC_CUSTOM_RW */
static inline u_int32_t
static inline uint32_t
ioapic_read(struct ioapic_softc *sc, int regid)
{
u_int32_t val;
uint32_t val;
u_long flags;
flags = ioapic_lock(sc);
@ -246,10 +246,10 @@ ioapic_add(struct ioapic_softc *sc)
void
ioapic_print_redir (struct ioapic_softc *sc, const char *why, int pin)
{
u_int32_t redirlo = ioapic_read(sc, IOAPIC_REDLO(pin));
u_int32_t redirhi = ioapic_read(sc, IOAPIC_REDHI(pin));
uint32_t redirlo = ioapic_read(sc, IOAPIC_REDLO(pin));
uint32_t redirhi = ioapic_read(sc, IOAPIC_REDHI(pin));
apic_format_redir(sc->sc_pic.pic_dev.dv_xname, why, pin, redirhi,
apic_format_redir(device_xname(&sc->sc_pic.pic_dev), why, pin, redirhi,
redirlo);
}
@ -272,7 +272,7 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
struct ioapic_softc *sc = (struct ioapic_softc *)self;
struct apic_attach_args *aaa = (struct apic_attach_args *) aux;
int apic_id;
u_int32_t ver_sz;
uint32_t ver_sz;
int i;
sc->sc_flags = aaa->flags;
@ -296,8 +296,8 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
aprint_error(": map failed\n");
return;
}
sc->sc_reg = (volatile u_int32_t *)(bh + IOAPIC_REG);
sc->sc_data = (volatile u_int32_t *)(bh + IOAPIC_DATA);
sc->sc_reg = (volatile uint32_t *)(bh + IOAPIC_REG);
sc->sc_data = (volatile uint32_t *)(bh + IOAPIC_DATA);
}
#endif
sc->sc_pa = aaa->apic_address;
@ -372,8 +372,7 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
* mapping later ...
*/
if (apic_id != sc->sc_pic.pic_apicid) {
aprint_debug("%s: misconfigured as apic %d\n",
sc->sc_pic.pic_dev.dv_xname, apic_id);
aprint_debug_dev(&sc->sc_pic.pic_dev, "misconfigured as apic %d\n", apic_id);
ioapic_write(sc,IOAPIC_ID,
(ioapic_read(sc,IOAPIC_ID)&~IOAPIC_ID_MASK)
@ -382,12 +381,10 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
apic_id = (ioapic_read(sc,IOAPIC_ID)&IOAPIC_ID_MASK)>>IOAPIC_ID_SHIFT;
if (apic_id != sc->sc_pic.pic_apicid) {
aprint_error("%s: can't remap to apid %d\n",
sc->sc_pic.pic_dev.dv_xname,
aprint_error_dev(&sc->sc_pic.pic_dev, "can't remap to apid %d\n",
sc->sc_pic.pic_apicid);
} else {
aprint_debug("%s: remapped to apic %d\n",
sc->sc_pic.pic_dev.dv_xname,
aprint_debug_dev(&sc->sc_pic.pic_dev, "remapped to apic %d\n",
sc->sc_pic.pic_apicid);
}
}
@ -407,8 +404,8 @@ static void
apic_set_redir(struct ioapic_softc *sc, int pin, int idt_vec,
struct cpu_info *ci)
{
u_int32_t redlo;
u_int32_t redhi = 0;
uint32_t redlo;
uint32_t redhi = 0;
int delmode;
struct ioapic_pin *pp;
@ -469,8 +466,7 @@ ioapic_enable(void)
return;
if (ioapics->sc_flags & IOAPIC_PICMODE) {
aprint_debug("%s: writing to IMCR to disable pics\n",
ioapics->sc_pic.pic_dev.dv_xname);
aprint_debug_dev(&ioapics->sc_pic.pic_dev, "writing to IMCR to disable pics\n");
outb(IMCR_ADDR, IMCR_REGISTER);
outb(IMCR_DATA, IMCR_APIC);
}
@ -507,7 +503,7 @@ ioapic_reenable(void)
void
ioapic_hwmask(struct pic *pic, int pin)
{
u_int32_t redlo;
uint32_t redlo;
struct ioapic_softc *sc = (struct ioapic_softc *)pic;
u_long flags;
@ -521,7 +517,7 @@ ioapic_hwmask(struct pic *pic, int pin)
void
ioapic_hwunmask(struct pic *pic, int pin)
{
u_int32_t redlo;
uint32_t redlo;
struct ioapic_softc *sc = (struct ioapic_softc *)pic;
u_long flags;
@ -582,7 +578,7 @@ ioapic_dump_raw(void)
uint32_t reg;
for (sc = ioapics; sc != NULL; sc = sc->sc_next) {
printf("Register dump of %s\n", sc->sc_pic.pic_dev.dv_xname);
printf("Register dump of %s\n", device_xname(&sc->sc_pic.pic_dev));
i = 0;
do {
if (i % 0x08 == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipi.c,v 1.8 2007/11/28 16:28:44 ad Exp $ */
/* $NetBSD: ipi.c,v 1.9 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.8 2007/11/28 16:28:44 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.9 2008/04/16 16:06:52 cegger Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -67,15 +67,15 @@ x86_send_ipi(struct cpu_info *ci, int ipimask)
if (ret != 0) {
printf("ipi of %x from %s to %s failed\n",
ipimask,
curcpu()->ci_dev->dv_xname,
ci->ci_dev->dv_xname);
device_xname(curcpu()->ci_dev),
device_xname(ci->ci_dev));
}
return ret;
}
void
x86_broadcast_ipi (int ipimask)
x86_broadcast_ipi(int ipimask)
{
struct cpu_info *ci, *self = curcpu();
int count = 0;
@ -116,7 +116,7 @@ void
x86_ipi_handler(void)
{
struct cpu_info *ci = curcpu();
u_int32_t pending;
uint32_t pending;
int bit;
pending = atomic_swap_32(&ci->ci_ipis, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipmi.c,v 1.16 2008/01/04 18:38:32 ad Exp $ */
/* $NetBSD: ipmi.c,v 1.17 2008/04/16 16:06:52 cegger Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
*
@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.16 2008/01/04 18:38:32 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.17 2008/04/16 16:06:52 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -81,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.16 2008/01/04 18:38:32 ad Exp $");
#include <uvm/uvm_extern.h>
struct ipmi_sensor {
u_int8_t *i_sdr;
uint8_t *i_sdr;
int i_num;
int i_stype;
int i_etype;
@ -100,7 +100,7 @@ int ipmi_enabled = 0;
#define SMBIOS_TYPE_IPMI 0x26
#define DEVNAME(s) ((s)->sc_dev.dv_xname)
#define DEVNAME(s) (device_xname(&((s)->sc_dev))
/*
* Format of SMBIOS IPMI Flags
@ -162,7 +162,7 @@ int ipmi_enabled = 0;
printf(fmt);
#define dbg_dump(lvl, msg, len, buf) \
if (len && ipmi_dbg >= lvl) \
dumpb(msg, len, (const u_int8_t *)(buf));
dumpb(msg, len, (const uint8_t *)(buf));
long signextend(unsigned long, int);
@ -170,13 +170,13 @@ SLIST_HEAD(ipmi_sensors_head, ipmi_sensor);
struct ipmi_sensors_head ipmi_sensor_list =
SLIST_HEAD_INITIALIZER(&ipmi_sensor_list);
void dumpb(const char *, int, const u_int8_t *);
void dumpb(const char *, int, const uint8_t *);
int read_sensor(struct ipmi_softc *, struct ipmi_sensor *);
int add_sdr_sensor(struct ipmi_softc *, u_int8_t *);
int get_sdr_partial(struct ipmi_softc *, u_int16_t, u_int16_t,
u_int8_t, u_int8_t, void *, u_int16_t *);
int get_sdr(struct ipmi_softc *, u_int16_t, u_int16_t *);
int add_sdr_sensor(struct ipmi_softc *, uint8_t *);
int get_sdr_partial(struct ipmi_softc *, uint16_t, uint16_t,
uint8_t, uint8_t, void *, uint16_t *);
int get_sdr(struct ipmi_softc *, uint16_t, uint16_t *);
int ipmi_sendcmd(struct ipmi_softc *, int, int, int, int, int, const void*);
int ipmi_recvcmd(struct ipmi_softc *, int, int *, void *);
@ -190,21 +190,21 @@ int ipmi_match(struct device *, struct cfdata *, void *);
void ipmi_attach(struct device *, struct device *, void *);
long ipow(long, int);
long ipmi_convert(u_int8_t, struct sdrtype1 *, long);
void ipmi_sensor_name(char *, int, u_int8_t, u_int8_t *);
long ipmi_convert(uint8_t, struct sdrtype1 *, long);
void ipmi_sensor_name(char *, int, uint8_t, uint8_t *);
/* BMC Helper Functions */
u_int8_t bmc_read(struct ipmi_softc *, int);
void bmc_write(struct ipmi_softc *, int, u_int8_t);
int bmc_io_wait(struct ipmi_softc *, int, u_int8_t, u_int8_t, const char *);
int bmc_io_wait_cold(struct ipmi_softc *, int, u_int8_t, u_int8_t,
uint8_t bmc_read(struct ipmi_softc *, int);
void bmc_write(struct ipmi_softc *, int, uint8_t);
int bmc_io_wait(struct ipmi_softc *, int, uint8_t, uint8_t, const char *);
int bmc_io_wait_cold(struct ipmi_softc *, int, uint8_t, uint8_t,
const char *);
void _bmc_io_wait(void *);
void *bt_buildmsg(struct ipmi_softc *, int, int, int, const void *, int *);
void *cmn_buildmsg(struct ipmi_softc *, int, int, int, const void *, int *);
int getbits(u_int8_t *, int, int);
int getbits(uint8_t *, int, int);
int ipmi_sensor_type(int, int, int);
void ipmi_smbios_probe(struct smbios_ipmi *, struct ipmi_attach_args *);
@ -214,11 +214,11 @@ void ipmi_unmap_regs(struct ipmi_softc *sc, struct ipmi_attach_args *ia);
void *scan_sig(long, long, int, int, const void *);
int ipmi_test_threshold(u_int8_t, u_int8_t, u_int8_t, u_int8_t);
int ipmi_test_threshold(uint8_t, uint8_t, uint8_t, uint8_t);
int ipmi_sensor_status(struct ipmi_softc *, struct ipmi_sensor *,
envsys_data_t *, u_int8_t *);
envsys_data_t *, uint8_t *);
int add_child_sensors(struct ipmi_softc *, u_int8_t *, int, int, int,
int add_child_sensors(struct ipmi_softc *, uint8_t *, int, int, int,
int, int, int, const char *);
struct ipmi_if kcs_if = {
@ -271,7 +271,7 @@ ipmi_get_if(int iftype)
/*
* BMC Helper Functions
*/
u_int8_t
uint8_t
bmc_read(struct ipmi_softc *sc, int offset)
{
return (bus_space_read_1(sc->sc_iot, sc->sc_ioh,
@ -279,7 +279,7 @@ bmc_read(struct ipmi_softc *sc, int offset)
}
void
bmc_write(struct ipmi_softc *sc, int offset, u_int8_t val)
bmc_write(struct ipmi_softc *sc, int offset, uint8_t val)
{
bus_space_write_1(sc->sc_iot, sc->sc_ioh,
offset * sc->sc_if_iospacing, val);
@ -308,10 +308,10 @@ _bmc_io_wait(void *arg)
}
int
bmc_io_wait(struct ipmi_softc *sc, int offset, u_int8_t mask, u_int8_t value,
bmc_io_wait(struct ipmi_softc *sc, int offset, uint8_t mask, uint8_t value,
const char *lbl)
{
volatile u_int8_t v;
volatile uint8_t v;
struct ipmi_bmc_args args;
if (cold)
@ -341,10 +341,10 @@ bmc_io_wait(struct ipmi_softc *sc, int offset, u_int8_t mask, u_int8_t value,
}
int
bmc_io_wait_cold(struct ipmi_softc *sc, int offset, u_int8_t mask,
u_int8_t value, const char *lbl)
bmc_io_wait_cold(struct ipmi_softc *sc, int offset, uint8_t mask,
uint8_t value, const char *lbl)
{
volatile u_int8_t v;
volatile uint8_t v;
int count = 5000000; /* == 5s XXX can be shorter */
while (count--) {
@ -406,7 +406,7 @@ bt_write(struct ipmi_softc *sc, int reg, uint8_t data)
}
int
bt_sendmsg(struct ipmi_softc *sc, int len, const u_int8_t *data)
bt_sendmsg(struct ipmi_softc *sc, int len, const uint8_t *data)
{
int i;
@ -424,9 +424,9 @@ bt_sendmsg(struct ipmi_softc *sc, int len, const u_int8_t *data)
int
bt_recvmsg(struct ipmi_softc *sc, int maxlen, int *rxlen,
u_int8_t *data)
uint8_t *data)
{
u_int8_t len, v, i;
uint8_t len, v, i;
if (bmc_io_wait(sc, _BT_CTRL_REG, BT_BMC2HOST_ATN, BT_BMC2HOST_ATN,
"bt_recvwait") < 0)
@ -456,7 +456,7 @@ bt_reset(struct ipmi_softc *sc)
int
bt_probe(struct ipmi_softc *sc)
{
u_int8_t rv;
uint8_t rv;
rv = bmc_read(sc, _BT_CTRL_REG);
rv &= BT_HOST_BUSY;
@ -513,12 +513,12 @@ bt_probe(struct ipmi_softc *sc)
#define SMIC_TX_DATA_RDY (1L << 6)
#define SMIC_RX_DATA_RDY (1L << 7)
int smic_wait(struct ipmi_softc *, u_int8_t, u_int8_t, const char *);
int smic_write_cmd_data(struct ipmi_softc *, u_int8_t, const u_int8_t *);
int smic_read_data(struct ipmi_softc *, u_int8_t *);
int smic_wait(struct ipmi_softc *, uint8_t, uint8_t, const char *);
int smic_write_cmd_data(struct ipmi_softc *, uint8_t, const uint8_t *);
int smic_read_data(struct ipmi_softc *, uint8_t *);
int
smic_wait(struct ipmi_softc *sc, u_int8_t mask, u_int8_t val,
smic_wait(struct ipmi_softc *sc, uint8_t mask, uint8_t val,
const char *lbl)
{
int v;
@ -535,7 +535,7 @@ smic_wait(struct ipmi_softc *sc, u_int8_t mask, u_int8_t val,
}
int
smic_write_cmd_data(struct ipmi_softc *sc, u_int8_t cmd, const u_int8_t *data)
smic_write_cmd_data(struct ipmi_softc *sc, uint8_t cmd, const uint8_t *data)
{
int sts, v;
@ -557,7 +557,7 @@ smic_write_cmd_data(struct ipmi_softc *sc, u_int8_t cmd, const u_int8_t *data)
}
int
smic_read_data(struct ipmi_softc *sc, u_int8_t *data)
smic_read_data(struct ipmi_softc *sc, uint8_t *data)
{
int sts;
@ -573,7 +573,7 @@ smic_read_data(struct ipmi_softc *sc, u_int8_t *data)
#define ErrStat(a,b) if (a) printf(b);
int
smic_sendmsg(struct ipmi_softc *sc, int len, const u_int8_t *data)
smic_sendmsg(struct ipmi_softc *sc, int len, const uint8_t *data)
{
int sts, idx;
@ -594,7 +594,7 @@ smic_sendmsg(struct ipmi_softc *sc, int len, const u_int8_t *data)
}
int
smic_recvmsg(struct ipmi_softc *sc, int maxlen, int *len, u_int8_t *data)
smic_recvmsg(struct ipmi_softc *sc, int maxlen, int *len, uint8_t *data)
{
int sts, idx;
@ -665,13 +665,13 @@ smic_probe(struct ipmi_softc *sc)
#define KCS_WRITE_STATE 0x80
#define KCS_ERROR_STATE 0xC0
int kcs_wait(struct ipmi_softc *, u_int8_t, u_int8_t, const char *);
int kcs_write_cmd(struct ipmi_softc *, u_int8_t);
int kcs_write_data(struct ipmi_softc *, u_int8_t);
int kcs_read_data(struct ipmi_softc *, u_int8_t *);
int kcs_wait(struct ipmi_softc *, uint8_t, uint8_t, const char *);
int kcs_write_cmd(struct ipmi_softc *, uint8_t);
int kcs_write_data(struct ipmi_softc *, uint8_t);
int kcs_read_data(struct ipmi_softc *, uint8_t *);
int
kcs_wait(struct ipmi_softc *sc, u_int8_t mask, u_int8_t value, const char *lbl)
kcs_wait(struct ipmi_softc *sc, uint8_t mask, uint8_t value, const char *lbl)
{
int v;
@ -696,7 +696,7 @@ kcs_wait(struct ipmi_softc *sc, u_int8_t mask, u_int8_t value, const char *lbl)
}
int
kcs_write_cmd(struct ipmi_softc *sc, u_int8_t cmd)
kcs_write_cmd(struct ipmi_softc *sc, uint8_t cmd)
{
/* ASSERT: IBF and OBF are clear */
dbg_printf(50, "kcswritecmd: %.2x\n", cmd);
@ -706,7 +706,7 @@ kcs_write_cmd(struct ipmi_softc *sc, u_int8_t cmd)
}
int
kcs_write_data(struct ipmi_softc *sc, u_int8_t data)
kcs_write_data(struct ipmi_softc *sc, uint8_t data)
{
/* ASSERT: IBF and OBF are clear */
dbg_printf(50, "kcswritedata: %.2x\n", data);
@ -716,7 +716,7 @@ kcs_write_data(struct ipmi_softc *sc, u_int8_t data)
}
int
kcs_read_data(struct ipmi_softc *sc, u_int8_t * data)
kcs_read_data(struct ipmi_softc *sc, uint8_t * data)
{
int sts;
@ -735,7 +735,7 @@ kcs_read_data(struct ipmi_softc *sc, u_int8_t * data)
/* Exported KCS functions */
int
kcs_sendmsg(struct ipmi_softc *sc, int len, const u_int8_t * data)
kcs_sendmsg(struct ipmi_softc *sc, int len, const uint8_t * data)
{
int idx, sts;
@ -761,7 +761,7 @@ kcs_sendmsg(struct ipmi_softc *sc, int len, const u_int8_t * data)
}
int
kcs_recvmsg(struct ipmi_softc *sc, int maxlen, int *rxlen, u_int8_t * data)
kcs_recvmsg(struct ipmi_softc *sc, int maxlen, int *rxlen, uint8_t * data)
{
int idx, sts;
@ -791,7 +791,7 @@ kcs_reset(struct ipmi_softc *sc)
int
kcs_probe(struct ipmi_softc *sc)
{
u_int8_t v;
uint8_t v;
v = bmc_read(sc, _KCS_STATUS_REGISTER);
#if 0
@ -837,33 +837,33 @@ kcs_probe(struct ipmi_softc *sc)
#define SMS_LUN 2
struct ipmi_request {
u_int8_t rsSa;
u_int8_t rsLun;
u_int8_t netFn;
u_int8_t cmd;
u_int8_t data_len;
u_int8_t *data;
uint8_t rsSa;
uint8_t rsLun;
uint8_t netFn;
uint8_t cmd;
uint8_t data_len;
uint8_t *data;
};
struct ipmi_response {
u_int8_t cCode;
u_int8_t data_len;
u_int8_t *data;
uint8_t cCode;
uint8_t data_len;
uint8_t *data;
};
struct ipmi_bmc_request {
u_int8_t bmc_nfLn;
u_int8_t bmc_cmd;
u_int8_t bmc_data_len;
u_int8_t bmc_data[1];
uint8_t bmc_nfLn;
uint8_t bmc_cmd;
uint8_t bmc_data_len;
uint8_t bmc_data[1];
};
struct ipmi_bmc_response {
u_int8_t bmc_nfLn;
u_int8_t bmc_cmd;
u_int8_t bmc_cCode;
u_int8_t bmc_data_len;
u_int8_t bmc_data[1];
uint8_t bmc_nfLn;
uint8_t bmc_cmd;
uint8_t bmc_cCode;
uint8_t bmc_data_len;
uint8_t bmc_data[1];
};
@ -888,7 +888,7 @@ scan_sig(long start, long end, int skip, int len, const void *data)
}
void
dumpb(const char *lbl, int len, const u_int8_t *data)
dumpb(const char *lbl, int len, const uint8_t *data)
{
int idx;
@ -969,7 +969,7 @@ void *
bt_buildmsg(struct ipmi_softc *sc, int nfLun, int cmd, int len,
const void *data, int *txlen)
{
u_int8_t *buf;
uint8_t *buf;
/* Block transfer needs 4 extra bytes: length/netfn/seq/cmd + data */
*txlen = len + 4;
@ -998,7 +998,7 @@ void *
cmn_buildmsg(struct ipmi_softc *sc, int nfLun, int cmd, int len,
const void *data, int *txlen)
{
u_int8_t *buf;
uint8_t *buf;
/* Common needs two extra bytes: nfLun/cmd + data */
*txlen = len + 2;
@ -1019,7 +1019,7 @@ int
ipmi_sendcmd(struct ipmi_softc *sc, int rssa, int rslun, int netfn, int cmd,
int txlen, const void *data)
{
u_int8_t *buf;
uint8_t *buf;
int rc = -1;
dbg_printf(50, "ipmi_sendcmd: rssa=%.2x nfln=%.2x cmd=%.2x len=%.2x\n",
@ -1065,7 +1065,7 @@ done:
int
ipmi_recvcmd(struct ipmi_softc *sc, int maxlen, int *rxlen, void *data)
{
u_int8_t *buf, rc = 0;
uint8_t *buf, rc = 0;
int rawlen;
/* Need three extra bytes: netfn/cmd/ccode + data */
@ -1108,14 +1108,14 @@ ipmi_delay(struct ipmi_softc *sc, int period)
/* Read a partial SDR entry */
int
get_sdr_partial(struct ipmi_softc *sc, u_int16_t recordId, u_int16_t reserveId,
u_int8_t offset, u_int8_t length, void *buffer, u_int16_t *nxtRecordId)
get_sdr_partial(struct ipmi_softc *sc, uint16_t recordId, uint16_t reserveId,
uint8_t offset, uint8_t length, void *buffer, uint16_t *nxtRecordId)
{
u_int8_t cmd[256 + 8];
uint8_t cmd[256 + 8];
int len;
((u_int16_t *) cmd)[0] = reserveId;
((u_int16_t *) cmd)[1] = recordId;
((uint16_t *) cmd)[0] = reserveId;
((uint16_t *) cmd)[1] = recordId;
cmd[4] = offset;
cmd[5] = length;
if (ipmi_sendcmd(sc, BMC_SA, 0, STORAGE_NETFN, STORAGE_GET_SDR, 6,
@ -1138,11 +1138,11 @@ int maxsdrlen = 0x10;
/* Read an entire SDR; pass to add sensor */
int
get_sdr(struct ipmi_softc *sc, u_int16_t recid, u_int16_t *nxtrec)
get_sdr(struct ipmi_softc *sc, uint16_t recid, uint16_t *nxtrec)
{
u_int16_t resid = 0;
uint16_t resid = 0;
int len, sdrlen, offset;
u_int8_t *psdr;
uint8_t *psdr;
struct sdrhdr shdr;
/* Reserve SDR */
@ -1191,7 +1191,7 @@ get_sdr(struct ipmi_softc *sc, u_int16_t recid, u_int16_t *nxtrec)
}
int
getbits(u_int8_t *bytes, int bitpos, int bitlen)
getbits(uint8_t *bytes, int bitpos, int bitlen)
{
int v;
int mask;
@ -1210,7 +1210,7 @@ getbits(u_int8_t *bytes, int bitpos, int bitlen)
/* Decode IPMI sensor name */
void
ipmi_sensor_name(char *name, int len, u_int8_t typelen, u_int8_t *bits)
ipmi_sensor_name(char *name, int len, uint8_t typelen, uint8_t *bits)
{
int i, slen;
char bcdplus[] = "0123456789 -.:,_";
@ -1280,7 +1280,7 @@ signextend(unsigned long val, int bits)
/* Convert IPMI reading from sensor factors */
long
ipmi_convert(u_int8_t v, struct sdrtype1 *s1, long adj)
ipmi_convert(uint8_t v, struct sdrtype1 *s1, long adj)
{
short M, B;
char K1, K2;
@ -1307,7 +1307,7 @@ ipmi_convert(u_int8_t v, struct sdrtype1 *s1, long adj)
}
int
ipmi_test_threshold(u_int8_t v, u_int8_t valid, u_int8_t hi, u_int8_t lo)
ipmi_test_threshold(uint8_t v, uint8_t valid, uint8_t hi, uint8_t lo)
{
dbg_printf(10, "thresh: %.2x %.2x %.2x %d\n", v, lo, hi,valid);
return ((valid & 1 && lo != 0x00 && v <= lo) ||
@ -1316,9 +1316,9 @@ ipmi_test_threshold(u_int8_t v, u_int8_t valid, u_int8_t hi, u_int8_t lo)
int
ipmi_sensor_status(struct ipmi_softc *sc, struct ipmi_sensor *psensor,
envsys_data_t *edata, u_int8_t *reading)
envsys_data_t *edata, uint8_t *reading)
{
u_int8_t data[32];
uint8_t data[32];
struct sdrtype1 *s1 = (struct sdrtype1 *)psensor->i_sdr;
int rxlen, etype;
/* Get reading of sensor */
@ -1402,7 +1402,7 @@ int
read_sensor(struct ipmi_softc *sc, struct ipmi_sensor *psensor)
{
struct sdrtype1 *s1 = (struct sdrtype1 *) psensor->i_sdr;
u_int8_t data[8];
uint8_t data[8];
int rxlen, rv = -1;
envsys_data_t *edata = &sc->sc_sensor[psensor->i_envnum];
@ -1459,7 +1459,7 @@ ipmi_sensor_type(int type, int ext_type, int entity)
/* Add Sensor to BSD Sysctl interface */
int
add_sdr_sensor(struct ipmi_softc *sc, u_int8_t *psdr)
add_sdr_sensor(struct ipmi_softc *sc, uint8_t *psdr)
{
int rc;
struct sdrtype1 *s1 = (struct sdrtype1 *)psdr;
@ -1501,7 +1501,7 @@ ipmi_is_dupname(char *name)
}
int
add_child_sensors(struct ipmi_softc *sc, u_int8_t *psdr, int count,
add_child_sensors(struct ipmi_softc *sc, uint8_t *psdr, int count,
int sensor_num, int sensor_type, int ext_type, int sensor_base,
int entity, const char *name)
{
@ -1695,7 +1695,7 @@ ipmi_match(struct device *parent, struct cfdata *cf,
{
struct ipmi_softc sc;
struct ipmi_attach_args *ia = aux;
u_int8_t cmd[32];
uint8_t cmd[32];
int len;
int rv = 0;
@ -1729,7 +1729,7 @@ ipmi_attach(struct device *parent, struct device *self, void *aux)
{
struct ipmi_softc *sc = (void *) self;
struct ipmi_attach_args *ia = aux;
u_int16_t rec;
uint16_t rec;
struct ipmi_sensor *ipmi_s;
int i;
int current_index_typ[ENVSYS_NSENSORS];

View File

@ -1,4 +1,4 @@
/* $NetBSD: lapic.c,v 1.33 2008/01/25 18:56:55 xtraeme Exp $ */
/* $NetBSD: lapic.c,v 1.34 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.33 2008/01/25 18:56:55 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.34 2008/04/16 16:06:52 cegger Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@ -152,9 +152,9 @@ lapic_set_lvt(void)
#ifdef MULTIPROCESSOR
if (mp_verbose) {
apic_format_redir (ci->ci_dev->dv_xname, "prelint", 0, 0,
apic_format_redir (device_xname(ci->ci_dev), "prelint", 0, 0,
i82489_readreg(LAPIC_LVINT0));
apic_format_redir (ci->ci_dev->dv_xname, "prelint", 1, 0,
apic_format_redir (device_xname(ci->ci_dev), "prelint", 1, 0,
i82489_readreg(LAPIC_LVINT1));
}
#endif
@ -195,15 +195,15 @@ lapic_set_lvt(void)
#ifdef MULTIPROCESSOR
if (mp_verbose) {
apic_format_redir (ci->ci_dev->dv_xname, "timer", 0, 0,
apic_format_redir (device_xname(ci->ci_dev), "timer", 0, 0,
i82489_readreg(LAPIC_LVTT));
apic_format_redir (ci->ci_dev->dv_xname, "pcint", 0, 0,
apic_format_redir (device_xname(ci->ci_dev), "pcint", 0, 0,
i82489_readreg(LAPIC_PCINT));
apic_format_redir (ci->ci_dev->dv_xname, "lint", 0, 0,
apic_format_redir (device_xname(ci->ci_dev), "lint", 0, 0,
i82489_readreg(LAPIC_LVINT0));
apic_format_redir (ci->ci_dev->dv_xname, "lint", 1, 0,
apic_format_redir (device_xname(ci->ci_dev), "lint", 1, 0,
i82489_readreg(LAPIC_LVINT1));
apic_format_redir (ci->ci_dev->dv_xname, "err", 0, 0,
apic_format_redir (device_xname(ci->ci_dev), "err", 0, 0,
i82489_readreg(LAPIC_LVERR));
}
#endif
@ -433,7 +433,7 @@ lapic_calibrate_timer(struct cpu_info *ci)
int i;
char tbuf[9];
aprint_verbose("%s: calibrating local timer\n", ci->ci_dev->dv_xname);
aprint_verbose_dev(ci->ci_dev, "calibrating local timer\n");
/*
* Configure timer to one-shot, interrupt masked,
@ -465,8 +465,7 @@ lapic_calibrate_timer(struct cpu_info *ci)
humanize_number(tbuf, sizeof(tbuf), lapic_per_second, "Hz", 1000);
aprint_verbose("%s: apic clock running at %s\n",
ci->ci_dev->dv_xname, tbuf);
aprint_verbose_dev(ci->ci_dev, "apic clock running at %s\n", tbuf);
if (lapic_per_second != 0) {
/*
@ -487,10 +486,10 @@ lapic_calibrate_timer(struct cpu_info *ci)
* in lapic_delay.
*/
tmp = (1000000 * (u_int64_t)1<<32) / lapic_per_second;
tmp = (1000000 * (uint64_t)1<<32) / lapic_per_second;
lapic_frac_usec_per_cycle = tmp;
tmp = (lapic_per_second * (u_int64_t)1<<32) / 1000000;
tmp = (lapic_per_second * (uint64_t)1<<32) / 1000000;
lapic_frac_cycle_per_usec = tmp;
@ -637,7 +636,7 @@ static void
lapic_hwmask(struct pic *pic, int pin)
{
int reg;
u_int32_t val;
uint32_t val;
reg = LAPIC_LVTT + (pin << 4);
val = i82489_readreg(reg);
@ -649,7 +648,7 @@ static void
lapic_hwunmask(struct pic *pic, int pin)
{
int reg;
u_int32_t val;
uint32_t val;
reg = LAPIC_LVTT + (pin << 4);
val = i82489_readreg(reg);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpacpi.c,v 1.56 2007/12/12 23:33:22 jmcneill Exp $ */
/* $NetBSD: mpacpi.c,v 1.57 2008/04/16 16:06:52 cegger Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.56 2007/12/12 23:33:22 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.57 2008/04/16 16:06:52 cegger Exp $");
#include "acpi.h"
#include "opt_acpi.h"
@ -977,7 +977,7 @@ mpacpi_print_intr(struct mp_intr_map *mpi)
acpi_pci_link_name(mpi->linkdev), busname);
else
printf("%s: pin %d attached to %s",
sc ? sc->pic_dev.dv_xname : "local apic",
sc ? device_xname(&sc->pic_dev) : "local apic",
pin, busname);
if (mpi->bus != NULL) {
@ -1094,7 +1094,7 @@ mpacpi_pci_attach_hook(struct device *parent, struct device *self,
mpb->mb_pci_chipset_tag = pba->pba_pc;
if (mp_verbose)
printf("%s: added to list as bus %d\n", parent->dv_xname,
printf("%s: added to list as bus %d\n", device_xname(parent),
pba->pba_bus);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpbios.c,v 1.40 2007/12/01 16:45:35 ad Exp $ */
/* $NetBSD: mpbios.c,v 1.41 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -103,7 +103,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mpbios.c,v 1.40 2007/12/01 16:45:35 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: mpbios.c,v 1.41 2008/04/16 16:06:52 cegger Exp $");
#include "acpi.h"
#include "lapic.h"
@ -334,19 +334,18 @@ mpbios_probe(struct device *self)
found:
if (mp_verbose)
printf("%s: MP floating pointer found in %s at 0x%lx\n",
self->dv_xname, loc_where[scan_loc], mp_fp_map.pa);
aprint_verbose_dev(self, "MP floating pointer found in %s at 0x%lx\n",
loc_where[scan_loc], mp_fp_map.pa);
if (mp_fps->pap == 0) {
if (mp_fps->mpfb1 == 0) {
printf("%s: MP fps invalid: "
"no default config and no configuration table\n",
self->dv_xname);
aprint_error_dev(self, "MP fps invalid: "
"no default config and no configuration table\n");
goto err;
}
printf("%s: MP default configuration %d\n",
self->dv_xname, mp_fps->mpfb1);
aprint_normal_dev(self, "MP default configuration %d\n",
mp_fps->mpfb1);
return 10;
}
@ -359,19 +358,17 @@ mpbios_probe(struct device *self)
mp_cth = mpbios_map (cthpa, cthlen, &mp_cfg_table_map);
if (mp_verbose)
printf("%s: MP config table at 0x%lx, %d bytes long\n",
self->dv_xname, cthpa, cthlen);
aprint_verbose_dev(self, "MP config table at 0x%lx, %d bytes long\n",
cthpa, cthlen);
if (mp_cth->signature != MP_CT_SIG) {
printf("%s: MP signature mismatch (%x vs %x)\n",
self->dv_xname,
aprint_error_dev(self, "MP signature mismatch (%x vs %x)\n",
MP_CT_SIG, mp_cth->signature);
goto err;
}
if (mpbios_cksum(mp_cth, cthlen)) {
printf ("%s: MP Configuration Table checksum mismatch\n",
self->dv_xname);
aprint_error_dev(self, "MP Configuration Table checksum mismatch\n");
goto err;
}
return 10;
@ -426,8 +423,8 @@ mpbios_search(struct device *self, paddr_t start, int count,
const uint8_t *base = mpbios_map (start, count, &t);
if (mp_verbose)
printf("%s: scanning 0x%lx to 0x%lx for MP signature\n",
self->dv_xname, start, start+count-sizeof(*m));
aprint_verbose_dev(self, "scanning 0x%lx to 0x%lx for MP signature\n",
start, start+count-sizeof(*m));
for (i = 0; i <= end; i += 4) {
m = (const struct mpbios_fps *)&base[i];
@ -507,7 +504,7 @@ mpbios_scan(struct device *self, int *ncpup, int *napic)
const struct mpbios_int *iep;
struct mpbios_int ie;
printf ("%s: Intel MP Specification ", self->dv_xname);
aprint_normal_dev(self, "Intel MP Specification ");
switch (mp_fps->spec_rev) {
case 1:
@ -543,8 +540,9 @@ mpbios_scan(struct device *self, int *ncpup, int *napic)
/* check for use of 'default' configuration */
if (mp_fps->mpfb1 != 0) {
printf("\n%s: MP default configuration %d\n",
self->dv_xname, mp_fps->mpfb1);
aprint_normal("\n");
aprint_normal_dev(self, "MP default configuration %d\n",
mp_fps->mpfb1);
#if NACPI > 0
if (mpacpi_ncpu == 0)
#endif
@ -556,8 +554,7 @@ mpbios_scan(struct device *self, int *ncpup, int *napic)
mpbios_ioapic((uint8_t *)&default_ioapic, self);
/* XXX */
printf("%s: WARNING: interrupts not configured\n",
self->dv_xname);
aprint_verbose_dev(self, "WARNING: interrupts not configured\n");
/*
* XXX rpaulo: I have a machine that can boot, so I
@ -591,9 +588,9 @@ mpbios_scan(struct device *self, int *ncpup, int *napic)
while ((count--) && (position < end)) {
type = *position;
if (type >= MPS_MCT_NTYPES) {
printf("%s: unknown entry type %x"
aprint_error_dev(self, "unknown entry type %x"
" in MP config table\n",
self->dv_xname, type);
type);
break;
}
mp_conf[type].count++;
@ -676,8 +673,8 @@ mpbios_scan(struct device *self, int *ncpup, int *napic)
cur_intr++;
break;
default:
printf("%s: unknown entry type %x in MP config table\n",
self->dv_xname, type);
aprint_error_dev(self, "unknown entry type %x in MP config table\n",
type);
/* NOTREACHED */
return;
}
@ -685,8 +682,7 @@ mpbios_scan(struct device *self, int *ncpup, int *napic)
position += mp_conf[type].length;
}
if (mp_verbose && mp_cth->ext_len)
printf("%s: MP WARNING: %d bytes of extended entries not examined\n",
self->dv_xname,
aprint_verbose_dev(self, "MP WARNING: %d bytes of extended entries not examined\n",
mp_cth->ext_len);
}
/* Clean up. */
@ -1005,7 +1001,7 @@ mpbios_bus(const uint8_t *ent, struct device *self)
else
mp_isa_bus = bus_id;
} else {
aprint_error("%s: unsupported bus type %6.6s\n", self->dv_xname,
aprint_error_dev(self, "unsupported bus type %6.6s\n",
entry->bus_type);
}
}
@ -1134,7 +1130,7 @@ mpbios_int(const uint8_t *ent, int enttype, struct mp_intr_map *mpi)
if ((altmpi->type != type) ||
(altmpi->flags != flags)) {
printf("%s: conflicting map entries for pin %d\n",
sc->sc_pic.pic_dev.dv_xname, pin);
device_xname(&sc->sc_pic.pic_dev), pin);
}
} else {
sc->sc_pins[pin].ip_map = mpi;
@ -1156,7 +1152,7 @@ mpbios_int(const uint8_t *ent, int enttype, struct mp_intr_map *mpi)
char buf[256];
printf("%s: int%d attached to %s",
sc ? sc->sc_pic.pic_dev.dv_xname : "local apic",
sc ? device_xname(&sc->sc_pic.pic_dev) : "local apic",
pin, mpb->mb_name);
if (mpb->mb_idx != -1)
@ -1195,7 +1191,7 @@ mpbios_pci_attach_hook(struct device *parent, struct device *self,
mpb->mb_name = "pci";
if (mp_verbose)
printf("%s: added to list as bus %d\n", parent->dv_xname,
printf("%s: added to list as bus %d\n", device_xname(parent),
pba->pba_bus);
mpb->mb_configured = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mtrr_i686.c,v 1.14 2008/01/04 18:38:32 ad Exp $ */
/* $NetBSD: mtrr_i686.c,v 1.15 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.14 2008/01/04 18:38:32 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: mtrr_i686.c,v 1.15 2008/04/16 16:06:52 cegger Exp $");
#include "opt_multiprocessor.h"
@ -439,7 +439,7 @@ i686_mtrr_init_cpu(struct cpu_info *ci)
{
i686_mtrr_reload(0);
#if 0
mtrr_dump(ci->ci_dev->dv_xname);
mtrr_dump(device_xname(ci->ci_dev));
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.49 2008/02/16 22:01:16 bouyer Exp $ */
/* $NetBSD: pmap.c,v 1.50 2008/04/16 16:06:52 cegger Exp $ */
/*
* Copyright (c) 2007 Manuel Bouyer.
@ -154,7 +154,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.49 2008/02/16 22:01:16 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.50 2008/04/16 16:06:52 cegger Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@ -1616,7 +1616,7 @@ pmap_cpu_init_late(struct cpu_info *ci)
evcnt_attach_dynamic(&pmap_tlb_evcnt, EVCNT_TYPE_INTR,
NULL, "global", "TLB IPI");
evcnt_attach_dynamic(&ci->ci_tlb_evcnt, EVCNT_TYPE_INTR,
NULL, ci->ci_dev->dv_xname, "TLB IPI");
NULL, device_xname(ci->ci_dev), "TLB IPI");
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: powernow_k8.c,v 1.20 2007/04/05 21:23:43 xtraeme Exp $ */
/* $NetBSD: powernow_k8.c,v 1.21 2008/04/16 16:06:52 cegger Exp $ */
/* $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */
/*-
@ -66,7 +66,7 @@
/* AMD POWERNOW K8 driver */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.20 2007/04/05 21:23:43 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: powernow_k8.c,v 1.21 2008/04/16 16:06:52 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -364,12 +364,11 @@ k8_powernow_init_main(void)
uint32_t maxfid, maxvid, i;
const struct sysctlnode *freqnode, *node, *pnownode;
struct powernow_cpu_state *cstate;
char *cpuname;
const char *techname;
const char *cpuname, *techname;
size_t len;
freq_names_len = 0;
cpuname = curcpu()->ci_dev->dv_xname;
cpuname = device_xname(curcpu()->ci_dev);
k8pnow_current_state = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tsc.c,v 1.12 2008/03/10 22:03:40 ad Exp $ */
/* $NetBSD: tsc.c,v 1.13 2008/04/16 16:06:52 cegger Exp $ */
/*-
@ -83,7 +83,7 @@
#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/sys/i386/i386/tsc.c,v 1.204 2003/10/21 18:28:34 silby Exp $"); */
__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.12 2008/03/10 22:03:40 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.13 2008/04/16 16:06:52 cegger Exp $");
#include "opt_multiprocessor.h"
#ifdef i386
@ -138,7 +138,7 @@ static struct timecounter tsc_timecounter = {
void
init_TSC(void)
{
u_int64_t tscval[2];
uint64_t tscval[2];
if (cpu_feature & CPUID_TSC)
tsc_present = 1;

View File

@ -1,5 +1,5 @@
/* $OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $ */
/* $NetBSD: via_padlock.c,v 1.8 2008/02/02 02:39:00 tls Exp $ */
/* $NetBSD: via_padlock.c,v 1.9 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.8 2008/02/02 02:39:00 tls Exp $");
__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.9 2008/04/16 16:06:52 cegger Exp $");
#include "opt_viapadlock.h"
@ -46,13 +46,13 @@ __KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.8 2008/02/02 02:39:00 tls Exp $");
#ifdef VIA_PADLOCK
int via_padlock_crypto_newsession(void *, u_int32_t *, struct cryptoini *);
int via_padlock_crypto_newsession(void *, uint32_t *, struct cryptoini *);
int via_padlock_crypto_process(void *, struct cryptop *, int);
int via_padlock_crypto_swauth(struct cryptop *, struct cryptodesc *,
struct swcr_data *, void *);
int via_padlock_crypto_encdec(struct cryptop *, struct cryptodesc *,
struct via_padlock_session *, struct via_padlock_softc *, void *);
int via_padlock_crypto_freesession(void *, u_int64_t);
int via_padlock_crypto_freesession(void *, uint64_t);
static __inline void via_padlock_cbc(void *, void *, void *, void *, int,
void *);
@ -99,7 +99,7 @@ via_padlock_attach(void)
}
int
via_padlock_crypto_newsession(void *arg, u_int32_t *sidp, struct cryptoini *cri)
via_padlock_crypto_newsession(void *arg, uint32_t *sidp, struct cryptoini *cri)
{
struct cryptoini *c;
struct via_padlock_softc *sc = arg;
@ -274,13 +274,13 @@ via_padlock_crypto_newsession(void *arg, u_int32_t *sidp, struct cryptoini *cri)
}
int
via_padlock_crypto_freesession(void *arg, u_int64_t tid)
via_padlock_crypto_freesession(void *arg, uint64_t tid)
{
struct via_padlock_softc *sc = arg;
struct swcr_data *swd;
struct auth_hash *axf;
int sesn;
u_int32_t sid = ((u_int32_t)tid) & 0xffffffff;
uint32_t sid = ((uint32_t)tid) & 0xffffffff;
KASSERT(sc != NULL /*, ("via_padlock_crypto_freesession: null softc")*/);
if (sc == NULL)
@ -345,7 +345,7 @@ int
via_padlock_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
struct via_padlock_session *ses, struct via_padlock_softc *sc, void *buf)
{
u_int32_t *key;
uint32_t *key;
int err = 0;
if ((crd->crd_len % 16) != 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: x86_autoconf.c,v 1.33 2008/02/12 18:22:39 joerg Exp $ */
/* $NetBSD: x86_autoconf.c,v 1.34 2008/04/16 16:06:52 cegger Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.33 2008/02/12 18:22:39 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.34 2008/04/16 16:06:52 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -144,14 +144,14 @@ matchbiosdisks(void)
continue;
#ifdef GEOM_DEBUG
printf("matchbiosdisks: trying to match (%s) %s\n",
dv->dv_xname, device_cfdata(dv)->cf_name);
device_xname(dv), device_cfdata(dv)->cf_name);
#endif
if (is_valid_disk(dv)) {
n++;
/* XXXJRT why not just dv_xname?? */
snprintf(x86_alldisks->dl_nativedisks[n].ni_devname,
sizeof(x86_alldisks->dl_nativedisks[n].ni_devname),
"%s", dv->dv_xname);
"%s", device_xname(dv));
if ((tv = opendisk(dv)) == NULL)
continue;
@ -162,7 +162,7 @@ matchbiosdisks(void)
if (error) {
#ifdef GEOM_DEBUG
printf("matchbiosdisks: %s: MBR read failure\n",
dv->dv_xname);
device_xname(dv));
#endif
continue;
}
@ -173,7 +173,7 @@ matchbiosdisks(void)
be = &big->disk[i];
#ifdef GEOM_DEBUG
printf("match %s with %d "
"dev ck %x bios ck %x\n", dv->dv_xname, i,
"dev ck %x bios ck %x\n", device_xname(dv), i,
ck, be->cksum);
#endif
if (be->flags & BI_GEOM_INVALID)
@ -184,7 +184,7 @@ matchbiosdisks(void)
sizeof(struct mbr_partition)) == 0) {
#ifdef GEOM_DEBUG
printf("matched BIOS disk %x with %s\n",
be->dev, dv->dv_xname);
be->dev, device_xname(dv));
#endif
x86_alldisks->dl_nativedisks[n].
ni_biosmatches[m++] = i;
@ -278,7 +278,7 @@ match_bootdisk(struct device *dv, struct btinfo_bootdisk *bid)
* or faked one up.
*/
printf("findroot: can't get label for dev %s (%d)\n",
dv->dv_xname, error);
device_xname(dv), error);
goto closeout;
}
@ -369,7 +369,8 @@ findroot(void)
if (booted_device) {
printf("WARNING: double match for boot "
"device (%s, %s)\n",
booted_device->dv_xname, dv->dv_xname);
device_xname(booted_device),
device_xname(dv));
continue;
}
dkwedge_set_bootwedge(dv, biw->startblk, biw->nblks);
@ -422,7 +423,8 @@ findroot(void)
if (booted_device) {
printf("WARNING: double match for boot "
"device (%s, %s)\n",
booted_device->dv_xname, dv->dv_xname);
device_xname(booted_device),
device_xname(dv));
continue;
}
handle_wedges(dv, bid->partition);
@ -443,11 +445,11 @@ cpu_rootconf(void)
if (booted_wedge) {
KASSERT(booted_device != NULL);
printf("boot device: %s (%s)\n",
booted_wedge->dv_xname, booted_device->dv_xname);
device_xname(booted_wedge), device_xname(booted_device));
setroot(booted_wedge, 0);
} else {
printf("boot device: %s\n",
booted_device ? booted_device->dv_xname : "<unknown>");
booted_device ? device_xname(booted_device) : "<unknown>");
setroot(booted_device, booted_partition);
}
}
@ -509,7 +511,7 @@ device_register(struct device *dev, void *aux)
if (booted_device) {
/* XXX should be a panic() */
printf("WARNING: double match for boot device (%s, %s)\n",
booted_device->dv_xname, dev->dv_xname);
device_xname(booted_device), device_xname(dev));
return;
}
booted_device = dev;