Merge branch 'master' into isa/arm64
[lunaix-os.git] / lunaix-os / hal / LConfig
1 include("char")
2 include("bus")
3 include("ahci")
4
5 @Collection("Devices & Peripherials")
6 def hal():
7     """ Lunaix hardware asbtraction layer """
8
9     @Term("Devicetree for hardware discovery")
10     def use_devicetree():
11         """
12             Decide whether to use Devicetree for platform
13             resource topology sensing.
14
15             On some architecture, Lunaix will fallback to use
16             devicetree when ran out of options. For others, such
17             as those designed with embedded support in mind, 
18             devicetree might be mandatory and perhaps the only
19             way.
20         """
21
22         type(bool)
23         default(False)
24
25         if v(arch) == "aarch64":
26             set_value(True)
27
28     @ReadOnly
29     @Term("Maximum size of device tree blob (in KiB)")
30     def dtb_maxsize():
31         """
32             Maximum size for a firmware provided device tree blob
33         """
34
35         type(int)
36         default(256)
37
38         return v(use_devicetree)