On 14/10/26 20:25, Pierrick Bouvier wrote:
This allows a specific target to declare its implementation of
semihosting.

Reviewed-by: Brian Cain <[email protected]>
Signed-off-by: Pierrick Bouvier <[email protected]>
---
  include/hw/core/cpu.h             |  6 ++++++
  include/semihosting/common-semi.h | 17 +++++++++++++++++
  2 files changed, 23 insertions(+)

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 76801444a16..456154df6f6 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -98,6 +98,9 @@ struct AccelCPUClass;
  /* see sysemu-cpu-ops.h */
  struct SysemuCPUOps;
+/* see semihosting/common-semi.h */
+struct SemihostingCPUOps;
+
  /**
   * CPUClass:
   * @class_by_name: Callback to map -cpu command line model name to an
@@ -186,6 +189,9 @@ struct CPUClass {
  #ifdef CONFIG_TCG
      /* when TCG is not available, this pointer is NULL */
      const TCGCPUOps *tcg_ops;
+
+    /* when target does not implement semihosting, this pointer is NULL */
+    const struct SemihostingCPUOps *semi_ops;

Could these be *const?

  #endif
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to