HV: remove acpi_priv.h

Keep acpi.h as the only acpi api interface;

Tracked-On: #3107

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun 2019-05-11 00:51:46 +08:00 committed by ACRN System Integration
parent 565f3cb72c
commit cbab1f831c
4 changed files with 32 additions and 41 deletions

View File

@ -11,7 +11,9 @@
#include <spinlock.h>
#include "pci.h"
#include "vtd.h"
#include "acpi_priv.h"
#include "acpi.h"
#define ACPI_SIG_DMAR "DMAR"
enum acpi_dmar_type {
ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
@ -68,6 +70,11 @@ typedef int32_t (*dmar_iter_t)(struct acpi_dmar_header*, void*);
static int32_t dmar_unit_cnt;
static void *get_dmar_table(void)
{
return get_acpi_tbl(ACPI_SIG_DMAR);
}
static void
dmar_iterate_tbl(dmar_iter_t iter, void *arg)
{

View File

@ -29,7 +29,6 @@
#include <types.h>
#include <rtl.h>
#include <vboot.h>
#include "acpi_priv.h"
#include "acpi.h"
#include <pgtable.h>
#include <ioapic.h>
@ -41,7 +40,6 @@
#define ACPI_OEM_ID_SIZE 6
#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
#define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */
#define ACPI_SIG_DMAR "DMAR"
#define RSDP_CHECKSUM_LENGTH 20
#define ACPI_NAME_SIZE 4U
#define ACPI_MADT_TYPE_LOCAL_APIC 0U
@ -181,7 +179,7 @@ static bool probe_table(uint64_t address, const char *signature)
return ret;
}
static void *get_acpi_tbl(const char *signature)
void *get_acpi_tbl(const char *signature)
{
struct acpi_table_rsdp *rsdp;
struct acpi_table_rsdt *rsdt;
@ -323,11 +321,6 @@ uint16_t parse_madt_ioapic(struct ioapic_info *ioapic_id_array)
return ioapic_parse_madt(madt, ioapic_id_array);
}
void *get_dmar_table(void)
{
return get_acpi_tbl(ACPI_SIG_DMAR);
}
#ifndef CONFIG_CONSTANT_ACPI
/* Per ACPI spec:
* There are two fundamental types of ACPI tables:

View File

@ -9,6 +9,29 @@
#include <vm_configurations.h>
struct acpi_table_header {
/* ASCII table signature */
char signature[4];
/* Length of table in bytes, including this header */
uint32_t length;
/* ACPI Specification minor version number */
uint8_t revision;
/* To make sum of entire table == 0 */
uint8_t checksum;
/* ASCII OEM identification */
char oem_id[6];
/* ASCII OEM table identification */
char oem_table_id[8];
/* OEM revision number */
uint32_t oem_revision;
/* ASCII ASL compiler vendor ID */
char asl_compiler_id[4];
/* ASL compiler version */
uint32_t asl_compiler_revision;
};
void *get_acpi_tbl(const char *signature);
struct ioapic_info;
uint16_t parse_madt(uint32_t lapic_id_array[CONFIG_MAX_PCPU_NUM]);
uint16_t parse_madt_ioapic(struct ioapic_info *ioapic_id_array);

View File

@ -1,32 +0,0 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef ACPI_PRIV_H
#define ACPI_PRIV_H
struct acpi_table_header {
/* ASCII table signature */
char signature[4];
/* Length of table in bytes, including this header */
uint32_t length;
/* ACPI Specification minor version number */
uint8_t revision;
/* To make sum of entire table == 0 */
uint8_t checksum;
/* ASCII OEM identification */
char oem_id[6];
/* ASCII OEM table identification */
char oem_table_id[8];
/* OEM revision number */
uint32_t oem_revision;
/* ASCII ASL compiler vendor ID */
char asl_compiler_id[4];
/* ASL compiler version */
uint32_t asl_compiler_revision;
};
void *get_dmar_table(void);
#endif /* !ACPI_PRIV_H */