X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/ebb55b7e5f0b8f31328950ec383b77b208ffbb64..HEAD:/lunaix-os/hal/bus/LConfig?ds=sidebyside diff --git a/lunaix-os/hal/bus/LConfig b/lunaix-os/hal/bus/LConfig index 74e3dbf..82d97f8 100644 --- a/lunaix-os/hal/bus/LConfig +++ b/lunaix-os/hal/bus/LConfig @@ -1,35 +1,25 @@ -@Collection +@"Buses & Interconnects" +@(parent := hal) def bus_if(): """ System/platform bus interface """ - add_to_collection(hal) - - @Term - def pci_enable(): + @"PCI" + def pci_enable() -> bool: """ Peripheral Component Interconnect (PCI) Bus """ - type(bool) - default(True) + return True - @Term - def pcie_ext(): + @"PCI Express" + def pcie_ext() -> bool: """ Enable support of PCI-Express extension """ - type(bool) - default(False) + require (pci_enable) - return v(pci_enable) + return False - @Term - def pci_pmio(): + @"Use PMIO for PCI" + def pci_pmio() -> bool: """ Use port-mapped I/O interface for controlling PCI """ - type(bool) - - has_pcie = v(pcie_ext) - is_x86 = v(arch) in [ "i386", "x86_64" ] - - default(not has_pcie) - - if not is_x86 or has_pcie: - set_value(False) + require (not pcie_ext and pci_enable) + require (arch_x86) - return is_x86 and v(pci_enable) \ No newline at end of file + return True