sparrow-kata-full/apps/system/components/MailboxDriver/MailboxDriver.camkes
Sam Leffler b099005951 kata-os-logger: support no logging interface connection out of a component
When a CAmkES component lacks an outbound connection to send log msgs
there will be no logger_log symbol. Use a weak ref here to handle that
without resorting to a feature or similar.

Mark logger connections as "maybe" so they are optional.

Change-Id: I6ecd939014d26a612d115741fd2ac673afa40857
GitOrigin-RevId: 0b1bf2611cbb628500cae37889c6547a996d50e9
2022-10-06 19:00:19 +00:00

30 lines
560 B
Plaintext

/*
* CAmkES component for accessing Sparrow's SMC -> SEC mailbox.
*
* Copyright 2021, Google LLC
* Apache License 2.0
*/
import <MailboxInterface.camkes>;
import <LoggerInterface.camkes>;
component MailboxDriver {
provides MailboxAPI api;
// Mailbox registers
dataport Buf mailbox_mmio;
// Global mailbox lock
has mutex api_mutex;
// Mailbox arrival semaphore
has semaphore rx_semaphore;
// Mailbox interrupts
consumes Interrupt wtirq;
consumes Interrupt rtirq;
consumes Interrupt eirq;
maybe uses LoggerInterface logger;
}