-/* $OpenBSD: dsdt.c,v 1.169 2010/07/20 12:14:10 deraadt Exp $ */
+/* $OpenBSD: dsdt.c,v 1.170 2010/07/21 15:07:40 deraadt Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
#define AML_INTSTRLEN 16
#define AML_NAMESEG_LEN 4
-struct acpi_q *acpi_maptable(struct acpi_softc *sc, paddr_t, const char *, const char *,
+struct acpi_q *acpi_maptable(struct acpi_softc *sc, paddr_t,
+ const char *, const char *,
const char *, int);
struct aml_scope *aml_load(struct acpi_softc *, struct aml_scope *,
struct aml_value *, struct aml_value *);
int aml_tstbit(const u_int8_t *, int);
void aml_setbit(u_int8_t *, int, int);
-void aml_xaddref(struct aml_value *, const char *);
-void aml_xdelref(struct aml_value **, const char *);
+void aml_xaddref(struct aml_value *, const char *);
+void aml_xdelref(struct aml_value **, const char *);
void aml_bufcpy(void *, int, const void *, int, int);
pdata->cbproc(pdata->node, notify_value, pdata->cbarg);
}
-void acpi_poll_notify(void)
+void
+acpi_poll_notify(void)
{
struct aml_notify_data *pdata = NULL;
case LR_EXTIRQ:
printf("extirq\tflags:%.2x len:%.2x irq:%.4x\n",
crs->lr_extirq.flags, crs->lr_extirq.irq_count,
- aml_letohost32(crs->lr_extirq.irq[0]));
+ letoh32(crs->lr_extirq.irq[0]));
break;
case SR_IRQ:
- printf("irq\t%.4x %.2x\n", aml_letohost16(crs->sr_irq.irq_mask),
+ printf("irq\t%.4x %.2x\n", letoh16(crs->sr_irq.irq_mask),
crs->sr_irq.irq_flags);
break;
case SR_DMA:
-/* $OpenBSD: dsdt.h,v 1.50 2010/07/20 05:49:53 deraadt Exp $ */
+/* $OpenBSD: dsdt.h,v 1.51 2010/07/21 15:07:40 deraadt Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
#define AML_MAX_ARG 7
#define AML_MAX_LOCAL 8
-/* XXX: endian macros */
-#define aml_letohost16(x) letoh16(x)
-#define aml_letohost32(x) letoh32(x)
-#define aml_letohost64(x) letoh64(x)
-
#define AML_WALK_PRE 0x00
#define AML_WALK_POST 0x01
void aml_hashopcodes(void);
-void aml_foreachpkg(struct aml_value *, int,
- void (*fn)(struct aml_value *, void *), void *);
+void aml_foreachpkg(struct aml_value *, int,
+ void (*fn)(struct aml_value *, void *), void *);
-const char *aml_val_to_string(const struct aml_value *);
+const char *aml_val_to_string(const struct aml_value *);
-int valid_acpihdr(void *, int, const char *);
-void aml_disasm(struct aml_scope *scope, int lvl,
- void (*dbprintf)(void *, const char *, ...),
- void *arg);
-int aml_xgetpci(struct aml_node *, int64_t *);
-int aml_evalhid(struct aml_node *, struct aml_value *);
+int valid_acpihdr(void *, int, const char *);
+void aml_disasm(struct aml_scope *scope, int lvl,
+ void (*dbprintf)(void *, const char *, ...),
+ void *arg);
+int aml_xgetpci(struct aml_node *, int64_t *);
+int aml_evalhid(struct aml_node *, struct aml_value *);
-int acpi_walkmem(int, const char *);
+int acpi_walkmem(int, const char *);
#define aml_get8(p) *(uint8_t *)(p)
#define aml_get16(p) *(uint16_t *)(p)
#define aml_get32(p) *(uint32_t *)(p)
#define aml_get64(p) *(uint64_t *)(p)
-union amlpci_t
-{
+union amlpci_t {
uint64_t addr;
struct {
uint16_t reg;
uint16_t bus;
};
};
-int aml_rdpciaddr(struct aml_node *pcidev, union amlpci_t *);
+int aml_rdpciaddr(struct aml_node *pcidev,
+ union amlpci_t *);
-void acpi_getdevlist(struct acpi_devlist_head *, struct aml_node *,
- struct aml_value *, int);
-void acpi_freedevlist(struct acpi_devlist_head *);
+void acpi_getdevlist(struct acpi_devlist_head *,
+ struct aml_node *, struct aml_value *, int);
+void acpi_freedevlist(struct acpi_devlist_head *);
#endif /* __DEV_ACPI_DSDT_H__ */