Add FWU service access protocol definition
Adds a packed-c protocol definition for the firmware update
service. The protocol defintion aims for alignment with the
ARM FWU-A specification.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I1d7e68058e7ad9447bff862026513aeef25d9ac4
diff --git a/protocols/service/fwu/packed-c/opcodes.h b/protocols/service/fwu/packed-c/opcodes.h
new file mode 100644
index 0000000..b900677
--- /dev/null
+++ b/protocols/service/fwu/packed-c/opcodes.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef FWU_PROTO_OPCODES_H
+#define FWU_PROTO_OPCODES_H
+
+/**
+ * Service-level opcodes
+ */
+#define TS_FWU_OPCODE_BASE (0x10)
+#define TS_FWU_OPCODE_BEGIN_STAGING (TS_FWU_OPCODE_BASE + 0)
+#define TS_FWU_OPCODE_END_STAGING (TS_FWU_OPCODE_BASE + 1)
+#define TS_FWU_OPCODE_CANCEL_STAGING (TS_FWU_OPCODE_BASE + 2)
+#define TS_FWU_OPCODE_OPEN (TS_FWU_OPCODE_BASE + 3)
+#define TS_FWU_OPCODE_WRITE_STREAM (TS_FWU_OPCODE_BASE + 4)
+#define TS_FWU_OPCODE_READ_STREAM (TS_FWU_OPCODE_BASE + 5)
+#define TS_FWU_OPCODE_COMMIT (TS_FWU_OPCODE_BASE + 6)
+#define TS_FWU_OPCODE_ACCEPT_IMAGE (TS_FWU_OPCODE_BASE + 7)
+#define TS_FWU_OPCODE_SELECT_PREVIOUS (TS_FWU_OPCODE_BASE + 8)
+
+#endif /* FWU_PROTO_OPCODES_H */