rework external irq system, introduce hierarchical irq
[lunaix-os.git] / lunaix-os / hal / bus / LConfig
1
2 @Collection("Buses & Interconnects")
3 def bus_if():
4     """ System/platform bus interface """
5
6     add_to_collection(hal)
7
8     @Term("PCI")
9     def pci_enable():
10         """ Peripheral Component Interconnect (PCI) Bus """
11         type(bool)
12         default(True)
13
14     @Term("PCI Express")
15     def pcie_ext():
16         """ Enable support of PCI-Express extension """
17         type(bool)
18         default(False)
19
20         return v(pci_enable)
21
22     @Term("Use PMIO for PCI")
23     def pci_pmio():
24         """ Use port-mapped I/O interface for controlling PCI """
25         type(bool)
26
27         has_pcie = v(pcie_ext)
28         is_x86 = v(arch) in [ "i386", "x86_64" ]
29
30         default(not has_pcie)
31         
32         if not is_x86 or has_pcie:
33             set_value(False)
34
35         return is_x86 and v(pci_enable)