John Snow 64a5a272e3 libqos/ahci: add ahci command functions
This patch adds the AHCICommand structure, and a set of functions to
operate on the structure.

ahci_command_create - Initialize and create a new AHCICommand in memory
ahci_command_free - Destroy this object.
ahci_command_set_buffer - Set where the guest memory DMA buffer is.
ahci_command_commit - Write this command to the AHCI HBA.
ahci_command_issue - Issue the committed command synchronously.
ahci_command_issue_async - Issue the committed command asynchronously.
ahci_command_wait - Wait for an asynchronous command to finish.
ahci_command_slot - Get the number of the command slot we committed to.

Helpers:
size_to_prdtl       - Calculate the required minimum PRDTL size from
                      a buffer size.
ahci_command_find   - Given an ATA command mnemonic, look it up in the
                      properties table to obtain info about the command.
command_header_init - Initialize the command header with sane values.
command_table_init  - Initialize the command table with sane values.

[Peter Maydell <peter.maydell@linaro.org> reported the following clang
warning:

  tests/libqos/ahci.c:598:3: warning: redefinition
  of typedef 'AHCICommand' is a C11 feature
      [-Wtypedef-redefinition]
  } AHCICommand;

I have replaced typedef struct ... AHCICommand; with struct ... ;
--Stefan]

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1423158090-25580-13-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-02-16 15:07:17 +00:00
2015-02-16 14:36:03 +00:00
2015-02-02 16:55:10 +01:00
…
2015-02-06 16:11:38 +00:00
2015-02-16 15:07:16 +00:00
2015-02-03 13:42:40 +01:00
2015-02-12 21:21:38 -08:00
…
2014-06-16 13:24:35 +02:00
…
…
…
…
…
2015-02-10 09:27:20 +03:00
2015-02-02 16:55:11 +01:00
2015-01-07 16:16:26 +01:00
…
2014-10-24 12:19:11 +01:00
2014-09-26 13:37:06 -04:00
2015-02-05 17:16:14 +01:00
2015-02-16 14:36:03 +00:00
2015-01-15 10:44:13 +03:00
2014-12-12 15:48:26 +00:00
2015-02-06 17:24:22 +01:00
2014-05-24 00:07:29 +04:00
…
…
…
2015-01-14 10:38:57 +01:00
2015-02-12 21:21:38 -08:00
…
…
2014-06-05 16:10:33 +02:00
2014-12-09 21:48:34 +00:00
2015-02-10 09:27:20 +03:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
S
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme GPL-2.0
724 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.3%
C++ 6.9%
Python 3.5%
Dylan 2.7%
Shell 1.5%
Other 2.9%