boards: add initial sencha board support This defines a board with the I2S, ML_TOP, and MAILBOX peripherals. .5M heap with software revocation. Change-Id: I59a4d32ca00374fe86c022dd52e4a4792f57161a
diff --git a/sdk/boards/sencha.json b/sdk/boards/sencha.json new file mode 100644 index 0000000..3809fde --- /dev/null +++ b/sdk/boards/sencha.json
@@ -0,0 +1,93 @@ +{ + "devices": { + "clint": { + "start" : 0x2000000, + "length" : 0x10000 + }, + "plic": { + "start" : 0x60000000, + "length" : 0x400000 + }, + "uart": { + "start": 0x10000000, + "end": 0x10000100 + }, + "i2s": { + "start": 0x54100000, + "length": 0x40 + }, + "ml_top_core": { + "start": 0x5C000000, + "length": 0x40 + }, + "ml_top_dmem": { + "start": 0x5A000000, + "length": 0x400000 + }, + "mailbox_smc": { + "start": 0x540F1000, + "length": 0x40 + }, + "shadow" : { + "start": 0x83000000, + "end": 0x83010000 + } + }, + "instruction_memory": { + "start": 0x80000000, + "end": 0x80400000 + }, + "heap": { + "start": 0x80380000, + "end": 0x80400000 + }, + "interrupts": [ + { + "name": "UARTInterrupt", + "number": 2, + "priority": 3, + "edge_triggered": true + }, + { + "name": "I2sRxWatermarkInterrupt", + "number": 3, + "priority": 3 + }, + { + "name": "I2sTxWatermarkInterrupt", + "number": 4, + "priority": 3 + }, + { + "name": "I2sTxEmptyInterrupt", + "number": 5, + "priority": 3 + }, + { + "name": "MlTopFinishInterrupt", + "number": 6, + "priority": 3 + }, + { + "name": "MlTopFaultInterrupt", + "number": 7, + "priority": 3 + }, + { + "name": "MailboxRtInterrupt", + "number": 8, + "priority": 3 + } + ], + "defines" : [ "SENCHA" ], + "driver_includes" : [ + "${sdk}/include/platform/sencha", + "${sdk}/include/platform/generic-riscv" + ], + "timer_hz" : 2000, + "tickrate_hz" : 10, + "revoker" : "software", + "stack_high_water_mark" : true, + "simulator" : "cheriot_sim", + "simulation": true +}
diff --git a/sdk/include/platform/sencha/platform-i2s.hh b/sdk/include/platform/sencha/platform-i2s.hh new file mode 100644 index 0000000..1bc3540 --- /dev/null +++ b/sdk/include/platform/sencha/platform-i2s.hh
@@ -0,0 +1,17 @@ +#pragma once +#include <compartment-macros.h> +#include <interrupt.h> +#include <riscvreg.h> + +DECLARE_AND_DEFINE_INTERRUPT_CAPABILITY(i2sRxWatermarkInterruptCapability, + InterruptName::I2sRxWatermarkInterrupt, + true, + true) +DECLARE_AND_DEFINE_INTERRUPT_CAPABILITY(i2sTxWatermarkInterruptCapability, + InterruptName::I2sTxWatermarkInterrupt, + true, + true) +DECLARE_AND_DEFINE_INTERRUPT_CAPABILITY(i2sTxEmptyInterruptCapability, + InterruptName::I2sTxEmptyInterrupt, + true, + true)
diff --git a/sdk/include/platform/sencha/platform-mailbox.hh b/sdk/include/platform/sencha/platform-mailbox.hh new file mode 100644 index 0000000..fb172e5 --- /dev/null +++ b/sdk/include/platform/sencha/platform-mailbox.hh
@@ -0,0 +1,9 @@ +#pragma once +#include <compartment-macros.h> +#include <interrupt.h> +#include <riscvreg.h> + +DECLARE_AND_DEFINE_INTERRUPT_CAPABILITY(mailboxRtInterruptCapability, + InterruptName::MailboxRtInterrupt, + true, + true)
diff --git a/sdk/include/platform/sencha/platform-ml_top.hh b/sdk/include/platform/sencha/platform-ml_top.hh new file mode 100644 index 0000000..cb7af3b --- /dev/null +++ b/sdk/include/platform/sencha/platform-ml_top.hh
@@ -0,0 +1,13 @@ +#pragma once +#include <compartment-macros.h> +#include <interrupt.h> +#include <riscvreg.h> + +DECLARE_AND_DEFINE_INTERRUPT_CAPABILITY(mlTopFinishInterruptCapability, + InterruptName::MlTopFinishInterrupt, + true, + true) +DECLARE_AND_DEFINE_INTERRUPT_CAPABILITY(mlTopFaultInterruptCapability, + InterruptName::MlTopFaultInterrupt, + true, + true)