hv: Enumerate IOAPIC info from DMAR table

IOAPIC info from DMAR table is needed to match the IOAPIC info from
MADT. This patch adds support to get id and bus, devfn for IOAPIC
from DMAR. IOAPIC info for SBL platform is hardcoded in the header
file.

Tracked-On: #2426
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
This commit is contained in:
Grandhi, Sainath
2019-01-26 00:04:48 -08:00
committed by Eddie Dong
parent 4ff9f5dfb2
commit cb46937bf5
4 changed files with 26 additions and 24 deletions

View File

@@ -37,19 +37,20 @@
#define DRHD0_DEVSCOPE3_BUS 0U
#define DRHD0_DEVSCOPE3_PATH 0U
#define DRHD1_DEV_CNT 0U
#define DRHD1_DEV_CNT 1U
#define DRHD1_SEGMENT 0U
#define DRHD1_FLAGS DRHD_FLAG_INCLUDE_PCI_ALL_MASK
#define DRHD1_REG_BASE 0xFED65000UL
#define DRHD1_IGNORE false
#define DRHD1_DEVSCOPE0_BUS 0U
#define DRHD1_DEVSCOPE0_PATH 0U
#define DRHD1_DEVSCOPE0_BUS 0xFAU
#define DRHD1_DEVSCOPE0_PATH 0xF8U
#define DRHD1_DEVSCOPE1_BUS 0U
#define DRHD1_DEVSCOPE1_PATH 0U
#define DRHD1_DEVSCOPE2_BUS 0U
#define DRHD1_DEVSCOPE2_PATH 0U
#define DRHD1_DEVSCOPE3_BUS 0U
#define DRHD1_DEVSCOPE3_PATH 0U
#define DRHD1_IOAPIC_ID 8U
#define DRHD2_DEV_CNT 0U
#define DRHD2_SEGMENT 0U

View File

@@ -32,6 +32,8 @@ static struct dmar_dev_scope drhd0_dev_scope[MAX_DRHD_DEVSCOPES] = {
static struct dmar_dev_scope drhd1_dev_scope[MAX_DRHD_DEVSCOPES] = {
{
.type = ACPI_DMAR_SCOPE_TYPE_IOAPIC,
.id = DRHD1_IOAPIC_ID,
.bus = DRHD1_DEVSCOPE0_BUS,
.devfun = DRHD1_DEVSCOPE0_PATH
},