arch: x86: update with new acpica lib interface
The old acpi implimentation is replaced with acpica interface and updated x86 arch porting with the new interface. Signed-off-by: Najumon B.A <najumon.ba@intel.com>
This commit is contained in:
parent
e5ec893c00
commit
a68204d8b8
11 changed files with 141 additions and 234 deletions
|
@ -120,7 +120,7 @@ static void IoApicRedUpdateLo(unsigned int irq, uint32_t value,
|
|||
!defined(CONFIG_INTEL_VTD_ICTL_XAPIC_PASSTHROUGH)
|
||||
|
||||
#include <zephyr/drivers/interrupt_controller/intel_vtd.h>
|
||||
#include <zephyr/arch/x86/acpi.h>
|
||||
#include <zephyr/acpi/acpi.h>
|
||||
|
||||
static const struct device *const vtd =
|
||||
DEVICE_DT_GET_OR_NULL(DT_INST(0, intel_vt_d));
|
||||
|
@ -129,11 +129,19 @@ static uint16_t ioapic_id;
|
|||
|
||||
static bool get_vtd(void)
|
||||
{
|
||||
union acpi_dmar_id *dmar_id;
|
||||
int inst_cnt;
|
||||
|
||||
if (vtd != NULL) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ioapic_id = z_acpi_get_dev_id_from_dmar(ACPI_DRHD_DEV_SCOPE_IOAPIC);
|
||||
/* Assume only one PCH in system (say client platform). */
|
||||
if (!acpi_drhd_get(ACPI_DMAR_SCOPE_TYPE_IOAPIC, NULL, &dmar_id, &inst_cnt, 1u)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ioapic_id = dmar_id->raw;
|
||||
|
||||
return vtd == NULL ? false : true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue