X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/ebb55b7e5f0b8f31328950ec383b77b208ffbb64..9293880eeb6a075ce4fb3dc5d29d57f1e9fe620b:/lunaix-os/hal/LConfig diff --git a/lunaix-os/hal/LConfig b/lunaix-os/hal/LConfig index 35385c9..b7ddf9e 100644 --- a/lunaix-os/hal/LConfig +++ b/lunaix-os/hal/LConfig @@ -2,8 +2,37 @@ include("char") include("bus") include("ahci") -@Collection +@Collection("Devices & Peripherials") def hal(): """ Lunaix hardware asbtraction layer """ - pass \ No newline at end of file + @Term("Devicetree for hardware discovery") + def use_devicetree(): + """ + 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. + """ + + type(bool) + default(False) + + if v(arch) == "aarch64": + set_value(True) + + @ReadOnly + @Term("Maximum size of device tree blob (in KiB)") + def dtb_maxsize(): + """ + Maximum size for a firmware provided device tree blob + """ + + type(int) + default(256) + + return v(use_devicetree) \ No newline at end of file