Fix file system racing and ext2 directory insertion (#58)
[lunaix-os.git] / lunaix-os / arch / LConfig
1 include("x86/LConfig")
2
3 @Collection("Platform")
4 def architecture_support():
5     """
6         Config ISA related features
7     """
8
9     @Term("Architecture")
10     def arch():
11         """ 
12             Config ISA support 
13         """
14         # type(["i386", "x86_64", "aarch64", "rv64"])
15         type(["i386", "x86_64"])
16         default("x86_64")
17
18         env_val = env("ARCH")
19         if env_val:
20             set_value(env_val)
21
22     @Term("Base operand size")
23     @ReadOnly
24     def arch_bits():
25         """ 
26             Defines the base size of a general register of the 
27             current selected ISA.
28
29             This the 'bits' part when we are talking about a CPU
30         """
31
32         type(["64", "32"])
33         match v(arch):
34             case "i386": 
35                 default("32")
36             case "aarch64": 
37                 default("64")
38             case "rv64": 
39                 default("64")
40             case "x86_64": 
41                 default("64")
42             case _:
43                 default("32")
44