amd_iommu_acpi.h revision 94f1124e84b3daba182b39a5df7b044074cb1c71
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _AMD_IOMMU_ACPI_H
#define _AMD_IOMMU_ACPI_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/amd_iommu.h>
#include "amd_iommu_impl.h"
#ifdef _KERNEL
#define IVRS_SIG "IVRS"
/*
* IVINFO settings
*/
/*
* IVHD Device entry len field
*/
/*
* IVHD flag fields definition
*/
#define AMD_IOMMU_ACPI_IVHD_FLAGS_HTTUNEN (0 << 16 | 0)
/*
* IVHD IOMMU info fields
*/
/*
* IVHD deventry data settings
*/
#define AMD_IOMMU_ACPI_INITPASS (0 << 16 | 0)
/*
* IVHD deventry extended data settings
*/
/*
* IVMD flags fields settings
*/
#define AMD_IOMMU_ACPI_IVMD_UNITY (0 << 16 | 0)
#define AMD_IOMMU_ACPI_INFO_HASH_SZ (256)
/*
* Deventry special device "variety"
*/
#define AMD_IOMMU_ACPI_SPECIAL_APIC 0x1
#define AMD_IOMMU_ACPI_SPECIAL_HPET 0x2
typedef enum {
DEVENTRY_INVALID = 0,
DEVENTRY_ALL = 1,
typedef enum {
IVMD_DEVICE_INVALID = 0,
typedef struct ivhd_deventry {
struct ivhd_deventry *idev_next;
typedef struct ivhd {
} ivhd_t;
typedef struct ivhd_container {
struct ivhd_container *ivhdc_next;
typedef struct ivmd {
} ivmd_t;
typedef struct ivmd_container {
struct ivmd_container *ivmdc_next;
typedef struct ivrs {
struct acpi_table_header ivrs_hdr;
} ivrs_t;
typedef struct amd_iommu_acpi {
/* Global IVINFo fields */
typedef struct amd_iommu_acpi_global {
typedef struct amd_iommu_acpi_ivhd {
/* IVHD deventry type */
/* IVHD flag fields */
/* IVHD fields */
/* IVHD IOMMU info fields */
/* IVHD deventry data settings */
/* alias */
/* IVHD deventry extended data settings */
/* IVHD deventry special device */
struct amd_iommu_acpi_ivhd *ach_next;
typedef struct amd_iommu_acpi_ivmd {
/* IVMD type */
/* IVMD flags */
/* IVMD mem block */
struct amd_iommu_acpi_ivmd *acm_next;
typedef union {
} align_16_t;
typedef union {
} align_32_t;
typedef union {
char *cp;
} align_ivhd_t;
typedef union {
char *cp;
} align_ivmd_t;
#pragma pack()
int amd_iommu_acpi_init(void);
void amd_iommu_acpi_fini(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _AMD_IOMMU_ACPI_H */