@@ -98,10 +98,11 @@ class ConfigPlatform(Enum):
98
98
FVP = "fvp"
99
99
GFE = "gfe"
100
100
AWS = "aws-f1"
101
+ MORELLO_FPGA = "morello-fpga"
101
102
102
103
@classmethod
103
104
def fpga_platforms (cls ) -> "set[ConfigPlatform]" :
104
- return {cls .GFE , cls .AWS }
105
+ return {cls .GFE , cls .AWS , cls . MORELLO_FPGA }
105
106
106
107
107
108
class CheriBSDConfig :
@@ -290,6 +291,7 @@ class AArch64KernelConfigFactory(KernelConfigFactory):
290
291
platform_name_map : "dict[ConfigPlatform, Optional[str]]" = {
291
292
ConfigPlatform .QEMU : "GENERIC" ,
292
293
ConfigPlatform .FVP : "GENERIC" ,
294
+ ConfigPlatform .MORELLO_FPGA : "MORELLO-FPGA" ,
293
295
}
294
296
295
297
def get_kabi_name (self , kernel_abi ) -> Optional [str ]:
@@ -306,9 +308,28 @@ def get_available_kabis(self) -> "list[KernelABI]":
306
308
abis = super ().get_available_kabis ()
307
309
return [* abis , KernelABI .PURECAP_BENCHMARK ]
308
310
311
+ def get_flag_names (
312
+ self ,
313
+ platforms : "set[ConfigPlatform]" ,
314
+ kernel_abi : KernelABI ,
315
+ default = False ,
316
+ nocaprevoke = False ,
317
+ mfsroot = False ,
318
+ debug = False ,
319
+ benchmark = False ,
320
+ fuzzing = False ,
321
+ fett = False ,
322
+ ):
323
+ if ConfigPlatform .MORELLO_FPGA in platforms :
324
+ # Suppress mfsroot flag as it is implied for Morello FPGA configurations
325
+ mfsroot = False
326
+ return super ().get_flag_names (
327
+ platforms , kernel_abi , mfsroot = mfsroot , fuzzing = fuzzing , benchmark = benchmark , default = default , nocaprevoke = nocaprevoke
328
+ )
329
+
309
330
def make_all (self ) -> "list[CheriBSDConfig]" :
310
331
configs = []
311
- # Generate QEMU/FVP kernels
332
+ # Generate QEMU/FVP/FPGA kernels
312
333
for kernel_abi in self .get_available_kabis ():
313
334
configs .append (self .make_config ({ConfigPlatform .QEMU , ConfigPlatform .FVP }, kernel_abi , default = True ))
314
335
configs .append (
@@ -317,6 +338,9 @@ def make_all(self) -> "list[CheriBSDConfig]":
317
338
configs .append (
318
339
self .make_config ({ConfigPlatform .QEMU , ConfigPlatform .FVP }, kernel_abi , default = True , mfsroot = True )
319
340
)
341
+ configs .append (
342
+ self .make_config ({ConfigPlatform .MORELLO_FPGA }, kernel_abi , default = True , mfsroot = True )
343
+ )
320
344
# Caprevoke kernels
321
345
for kernel_abi in self .get_available_kabis ():
322
346
configs .append (
@@ -1857,7 +1881,11 @@ def setup_config_options(cls, kernel_only_target=False, install_directory_help=N
1857
1881
use_upstream_llvm = False ,
1858
1882
kernel_only_target = kernel_only_target ,
1859
1883
)
1860
- fpga_targets = CompilationTargets .ALL_CHERIBSD_RISCV_TARGETS
1884
+ fpga_targets = (
1885
+ * CompilationTargets .ALL_CHERIBSD_RISCV_TARGETS ,
1886
+ CompilationTargets .CHERIBSD_AARCH64 ,
1887
+ * CompilationTargets .ALL_CHERIBSD_MORELLO_TARGETS
1888
+ )
1861
1889
cls .build_fpga_kernels = cls .add_bool_option (
1862
1890
"build-fpga-kernels" ,
1863
1891
show_help = True ,
0 commit comments