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