X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/50b4ecfb1b28e9b1dfc57b6a876fcdf938092152..1171754ec28161647e916c3339f8da3d1804e1be:/lunaix-os/hal/LConfig diff --git a/lunaix-os/hal/LConfig b/lunaix-os/hal/LConfig index 63598db..5b6a86f 100644 --- a/lunaix-os/hal/LConfig +++ b/lunaix-os/hal/LConfig @@ -1,9 +1,38 @@ -include("char") -include("bus") -include("ahci") +from . import char, bus, ahci -@Collection("Devices & Peripherials") +@"Devices & Peripherials" def hal(): """ Lunaix hardware asbtraction layer """ - pass \ No newline at end of file + @"Devicetree for hardware discovery" + def use_devicetree() -> bool: + """ + Decide whether to use Devicetree for platform + resource topology sensing. + + On some architecture, Lunaix will fallback to use + devicetree when ran out of options. For others, such + as those designed with embedded support in mind, + devicetree might be mandatory and perhaps the only + way. + """ + require (not arch_x86) + + return False + + @"Maximum size of device tree blob (in KiB)" + @readonly + def dtb_maxsize() -> int: + """ + Maximum size for a firmware provided device tree blob + """ + require (use_devicetree) + + return 256 + + @"Graphic Devices" + def use_graphic_dev() -> int: + """ + Support of graphical devices and display protocol + """ + return False \ No newline at end of file