git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dependency check logic cause config always disabled
[lunaix-os.git]
/
lunaix-os
/
hal
/
bus
/
LConfig
diff --git
a/lunaix-os/hal/bus/LConfig
b/lunaix-os/hal/bus/LConfig
index 74e3dbf7c3d9de2dd9a17fae9c495ba88241e3aa..82d97f812f1d227ada2392616f22569fe9e514a8 100644
(file)
--- 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 """
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 """
""" 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 """
""" 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 """
""" 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