[intel-platform-dev] probe and setup questions...
Raj, Ashok
ashok.raj at intel.com
Tue Nov 13 15:18:09 PST 2007
Hi Mark
There are a couple of questions, but to keep the responses manageable I
thought I will shoot each question separately so we can address them
separately.
Details below: Basically would like get support for the following.
1. map reg for dmar
2. provide intr hookup to receive fault events.
In the following discussion, sometime you will see reference to drhd,
iommu, dmar essentially all are the same!
In general we would use struct drhd * for the struct exported by ACPI,
and struct iommu * for the mapped iommu reg space definition.
If we could get some pointers on where to instrument to get this support
would be great help.
Discovery & Initialization
--------------------------
1. Probe routine
int probe_intel_iommu (void)
The above API will scan ACPI table and create a list of IOMMU's and
its
associated list of pci devices, A list of RMRR regions and its device
scope
for each RMRR.
Result: List of DMAR's, RMRR's and device list is built.
ACPI gives us a list of remapping units via DMAR tables.
DRHD - DMA remapping hardware device
RMRR - Reserved Memory Region Reporting Structure
where do we put this function?
rootnex.c/dma_rootnex_init()?
Could we do this someplace in pci_boot.c/pci_setup_tree() after the
enumeration is complete?
if we do the scanning a bit later after the pci tree is setup, we
could
do more of the initialization of iommu's as well and setup reserved
regions
etc. It will be required the entire tree is setup to build all the
device
tree relationship with dmar's.
/*
*
* Returns 0: Found Intel IOMMU
* -ENODEV: No Intel IOMMU found
*/
probe_intel_iommu(void)
{
scan and build list of dmar's, and list of devs for them
scan and build list of rmrr's and list of devs for them
for each rmrr
for each dev in rmrr
/*
* find the iommu for this dev, and set
* identity map for them
*/
prepare_rmmr_fordev(rmrr, pcidev);
endfor /* dev */
endfor /* rmrr */
for each dmar
allocate dev_info_t for dmar
ddi_map_regs_setup()
ddi_intr_alloc()
endfor /* dmar */
}
Questions:
1. Do we make ddi_root_node() the parent for the dmar devices?
2. when we call map_regs, will the rootnex be able to field that
request?
or do we need to add some support in rootnex.c?
3. Interrupts for dmar devices are like MSI interrupts. But the
config
is in memory space, unlike in pci config space.
So we would need to handle enable_intr, add_handler,
get_supported_intrs
calls to handle this new type of interrupt.
4. If we need to support suspend/resume support it would require
some
sort of driver module framework, so it would be able to intercept
SUSPEND/RESUME calls. Even though we might not support them
initially
getting the right framework would help in future
Cheers,
ashok raj
- Open Source Technology Center
More information about the intel-platform-dev
mailing list