qemu/qapi/injection.json
<<
>>
Prefs
   1# -*- mode: python -*-
   2#
   3# Copyright (C) 2016 Fred KONRAD <fred.konrad@greensocs.com>
   4#
   5# This work is licensed under the terms of the GNU GPL, version 2 or later.
   6# See the COPYING file in the top-level directory.
   7
   8##
   9# @ReadValue
  10#
  11# The return value from a read command
  12#
  13# Since: 2.6
  14##
  15{ 'struct': 'ReadValue',
  16  'data': {'value': 'int'} }
  17
  18##
  19# @read_mem:
  20#
  21# Read a memory location from a CPU point of view. The @qom name of the CPU is
  22# used if provided. The @cpu id is used if no @qom name are provided.
  23# If both the @qom name or @cpu id are not provided the access is done from cpu
  24# 0.
  25#
  26# @addr: The address to read.
  27# @size: The size of the access.
  28# @cpu: The optional index of the CPU doing the access.
  29# @qom: The optional qom name of the CPU doing the access.
  30#
  31# Returns: ReadValue, a strucutre with the value read
  32#
  33# Since 2.6
  34##
  35{ 'command': 'read_mem',
  36  'data': {'addr': 'int', 'size': 'int', '*cpu': 'int', '*qom': 'str'},
  37  'returns': 'ReadValue'}
  38
  39##
  40# @write_mem:
  41#
  42# Write a memory location from a CPU point of view. The @qom name of the CPU is
  43# used if provided. The @cpu id is used if no @qom name are provided.
  44# If both the @qom name or @cpu id are not provided the access is done from cpu
  45# 0.
  46#
  47# @address: The address to write.
  48# @val: The value which will be written.
  49# @size: The size of the access.
  50# @cpu: The optional index of the CPU doing the access.
  51# @qom: The optional qom name of the CPU doing the access.
  52#
  53# Returns: nothing in case of success
  54#
  55# Since 2.6
  56##
  57{ 'command': 'write_mem',
  58  'data': {'addr': 'int', 'val': 'int', 'size': 'int', '*cpu': 'int',
  59           '*qom': 'str'} }
  60
  61##
  62# @trigger_event
  63#
  64# Trigger an event
  65#
  66# @time_ns:  The event will be triggered at t + time_ns on the guest clock.
  67# @event_id: The ID of the event.
  68#
  69# Returns: nothing in case of success
  70#
  71# Since 2.6
  72##
  73{ 'command': 'trigger_event',
  74  'data': {'time_ns': 'int', 'event_id': 'int'} }
  75
  76##
  77# @FAULT_EVENT
  78#
  79# Emitted when a fault event is triggered
  80#
  81# @event_id: The id of the event which has been triggered
  82#
  83# Since: 2.6
  84##
  85{ 'event': 'FAULT_EVENT',
  86  'data': { 'event_id': 'int', 'time_ns': 'int'} }
  87
  88##
  89# @inject_gpio
  90#
  91# @device_name: Path to the device.
  92# @gpio:        Name of the GPIO will be unnamed-gpio if omitted.
  93# @num:         Number of the GPIO line.
  94# @val:         Value (boolean) to be set for the GPIO.
  95#
  96# Returns: nothing in case of success
  97#
  98# Since 2.6
  99##
 100{ 'command': 'inject_gpio',
 101  'data': {'device_name': 'str', '*gpio': 'str', 'num': 'int', 'val': 'int'} }
 102
 103