#include "nul/motherboard.h"Classes | |
| struct | AcpiMCFG |
| PCI config space access via mmconfig. More... | |
| struct | AcpiMCFG::Entry |
| struct | Entry |
| class | PciMMConfigAccess |
Functions | |
| struct AcpiMCFG | __attribute__ ((packed)) |
| PCI config space access via mmconfig. | |
| PARAM (mmconfig,{MessageAcpi msg("MCFG");check0(!mb.bus_acpi.send(msg, true)||!msg.table,"mm: XXX No MCFG table found.");AcpiMCFG *mcfg=reinterpret_cast< AcpiMCFG * >(msg.table);for(unsigned i=0;i< (mcfg->len-sizeof(AcpiMCFG))/sizeof(AcpiMCFG::Entry);i++){AcpiMCFG::Entry *entry=mcfg->entries+i;Logging::printf("mm: mmconfig: base 0x%llx seg %02x bus %02x-%02x\n", entry->base, entry->pci_seg, entry->pci_bus_start, entry->pci_bus_end);unsigned buses=entry->pci_bus_end-entry->pci_bus_start+1;unsigned long size=buses *32 *8 *4096;MessageHostOp msg(MessageHostOp::OP_ALLOC_IOMEM, entry->base, size);if(!mb.bus_hostop.send(msg)||!msg.ptr){Logging::printf("mm: %s failed to allocate iomem %llx+%lx\n", __PRETTY_FUNCTION__, entry->base, size);return;}Device *dev=new PciMMConfigAccess((entry->pci_seg<< 16)+entry->pci_bus_start *32 *8, buses *32 *8, reinterpret_cast< unsigned * >(msg.ptr));mb.bus_hwpcicfg.add(dev, PciMMConfigAccess::receive_static< MessagePciConfig >);}},"mmconfig - provide HW PCI config space access via mmconfig.") | |
Variables | |
| unsigned long long | base |
| unsigned short | pci_seg |
| unsigned char | pci_bus_start |
| unsigned char | pci_bus_end |
| unsigned | _res |
| unsigned | magic |
| unsigned | len |
| unsigned char | rev |
| unsigned char | checksum |
| char | oem_id [6] |
| char | model_id [8] |
| unsigned | oem_rev |
| unsigned | creator_vendor |
| unsigned | creator_utility |
| PciMMConfigAccess | __attribute__ |
| struct AcpiMCFG __attribute__ | ( | (packed) | ) |
PCI config space access via mmconfig.
Copyright (C) 2010, Julian Stecklina <jsteckli@os.inf.tu-dresden.de> Copyright (C) 2010, Bernhard Kauer <bk@vmmon.org> Economic rights: Technische Universitaet Dresden (Germany)
This file is part of Vancouver.
Vancouver is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Vancouver is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.
| PARAM | ( | mmconfig | ) |
| PciMMConfigAccess __attribute__ |
| unsigned _res |
| unsigned long long base |
| unsigned char checksum |
| unsigned creator_utility |
| unsigned creator_vendor |
| unsigned len |
| unsigned magic |
| char model_id[8] |
| char oem_id[6] |
| unsigned oem_rev |
| unsigned char pci_bus_end |
| unsigned char pci_bus_start |
| unsigned short pci_seg |
| unsigned char rev |
1.7.1