rework parsing of interupt-map in interrupt node.
[lunaix-os.git] / lunaix-os / hal / LConfig
index 63598dbd4dcca3795990be6d88f04091303b6a7b..b7ddf9e2a8feaeed69a9b5a4bb39c16981a20482 100644 (file)
@@ -6,4 +6,33 @@ include("ahci")
 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