Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/io/acpi.c
- This file was added.
/*- | |||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD | |||||
* | |||||
* Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG | |||||
* Author: Corvin Köhne <c.koehne@beckhoff.com> | |||||
*/ | |||||
#include <sys/cdefs.h> | |||||
__FBSDID("$FreeBSD$"); | |||||
markj: Don't need to add this to new files anymore. | |||||
#include <sys/types.h> | |||||
#include <sys/param.h> | |||||
#include <sys/systm.h> | |||||
#include <contrib/dev/acpica/include/acpi.h> | |||||
#include <contrib/dev/acpica/include/acpixf.h> | |||||
#include "acpi.h" | |||||
int | |||||
vmm_tpm2_get_control_address(vm_paddr_t *const base, vm_paddr_t *const size) | |||||
{ | |||||
ACPI_TABLE_HEADER *tpm_header; | |||||
if (!ACPI_SUCCESS(AcpiGetTable("TPM2", 1, &tpm_header))) { | |||||
return (ENOENT); | |||||
} | |||||
if (base) { | |||||
const ACPI_TABLE_TPM2 *const tpm_table = (ACPI_TABLE_TPM2 *) | |||||
tpm_header; | |||||
*base = tpm_table->ControlAddress; | |||||
} | |||||
if (size) { | |||||
*size = 0; | |||||
markjUnsubmitted Not Done Inline ActionsWhy is the size always zero? markj: Why is the size always zero? | |||||
} | |||||
return (0); | |||||
} |
Don't need to add this to new files anymore.