virtio-mmio: add secure virtio mmio device register api

In secure state, call virtio_register_mmio_device_secure() to
register the secure virtio mmio device;
In non-secure state, call virtio_register_mmio_device() to
register the non-secure virtio mmio device;
Board should ensure not mixed use the secure and non-seucre mmio
device.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang
2023-12-06 16:02:13 +08:00
committed by Xiang Xiao
parent 551b9b1626
commit 84d2aae63b
2 changed files with 56 additions and 7 deletions
+12
View File
@@ -61,6 +61,18 @@ extern "C"
int virtio_register_mmio_device(FAR void *regs, int irq);
/****************************************************************************
* Name: virtio_register_mmio_device_secure
*
* Description:
* Register secure virtio mmio device to the virtio bus
*
****************************************************************************/
#ifdef CONFIG_ARCH_TRUSTZONE_SECURE
int virtio_register_mmio_device_secure(FAR void *regs, int irq);
#endif
#undef EXTERN
#ifdef __cplusplus
}