2018-03-07 20:57:14 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
|
|
*
|
2018-05-26 01:49:13 +08:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2018-03-07 20:57:14 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <hypervisor.h>
|
|
|
|
|
|
|
|
/* IOAPIC id */
|
2018-06-19 18:33:58 +08:00
|
|
|
#define SBL_IOAPIC_ID 8U
|
2018-03-07 20:57:14 +08:00
|
|
|
/* IOAPIC base address */
|
2018-06-19 18:33:58 +08:00
|
|
|
#define SBL_IOAPIC_ADDR 0xfec00000U
|
2018-03-07 20:57:14 +08:00
|
|
|
/* IOAPIC range size */
|
2018-06-19 18:33:58 +08:00
|
|
|
#define SBL_IOAPIC_SIZE 0x100000U
|
2018-03-07 20:57:14 +08:00
|
|
|
/* Local APIC base address */
|
2018-06-19 18:33:58 +08:00
|
|
|
#define SBL_LAPIC_ADDR 0xfee00000U
|
2018-03-07 20:57:14 +08:00
|
|
|
/* Local APIC range size */
|
2018-06-19 18:33:58 +08:00
|
|
|
#define SBL_LAPIC_SIZE 0x100000U
|
2018-03-07 20:57:14 +08:00
|
|
|
/* Number of PCI IRQ assignments */
|
|
|
|
#define SBL_PCI_IRQ_ASSIGNMENT_NUM 28
|
|
|
|
|
|
|
|
#ifndef CONFIG_DMAR_PARSE_ENABLED
|
|
|
|
static struct dmar_dev_scope default_drhd_unit_dev_scope0[] = {
|
2018-06-19 18:33:58 +08:00
|
|
|
{ .bus = 0U, .devfun = DEVFUN(0x2U, 0U), },
|
2018-03-07 20:57:14 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct dmar_drhd drhd_info_array[] = {
|
|
|
|
{
|
2018-07-03 18:40:23 +08:00
|
|
|
.dev_cnt = 1U,
|
|
|
|
.segment = 0U,
|
|
|
|
.flags = 0U,
|
|
|
|
.reg_base_addr = 0xFED64000UL,
|
2018-03-07 20:57:14 +08:00
|
|
|
/* Ignore the iommu for intel graphic device since GVT-g needs
|
|
|
|
* vtd disabled for gpu
|
|
|
|
*/
|
2018-07-05 09:04:08 +08:00
|
|
|
.ignore = true,
|
2018-03-07 20:57:14 +08:00
|
|
|
.devices = default_drhd_unit_dev_scope0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* No need to specify devices since
|
|
|
|
* DRHD_FLAG_INCLUDE_PCI_ALL_MASK set
|
|
|
|
*/
|
2018-07-03 18:40:23 +08:00
|
|
|
.dev_cnt = 0U,
|
|
|
|
.segment = 0U,
|
2018-03-07 20:57:14 +08:00
|
|
|
.flags = DRHD_FLAG_INCLUDE_PCI_ALL_MASK,
|
2018-07-03 18:40:23 +08:00
|
|
|
.reg_base_addr = 0xFED65000UL,
|
2018-03-07 20:57:14 +08:00
|
|
|
.ignore = false,
|
|
|
|
.devices = NULL,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct dmar_info sbl_dmar_info = {
|
|
|
|
.drhd_count = 2,
|
|
|
|
.drhd_units = drhd_info_array,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dmar_info *get_dmar_info(void)
|
|
|
|
{
|
|
|
|
return &sbl_dmar_info;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void init_bsp(void)
|
|
|
|
{
|
|
|
|
}
|