Framework for exporting system header to user space (#59)
[lunaix-os.git] / lunaix-os / hal / LConfig
index 35385c9450920be346376d813c2e68c19100d490..9a70d02d05337371993496b90112bb44ec22f9e8 100644 (file)
@@ -2,8 +2,34 @@ 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(not v(arch).startswith("x86"))
+
+    @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