On 02/02/2015 05:25 AM, Paolo Bonzini wrote:
On 30/01/2015 19:41, John Snow wrote:
+/* Construct our Command Header (set_command_header handles endianness.) */
+memset(&cmd, 0x00, sizeof(cmd));
+cmd.flags = 5; /* reg_h2d_fis is 5 double-words long */
+cmd.flags = 0x400; /
On 02/02/2015 05:27 AM, Paolo Bonzini wrote:
On 30/01/2015 19:41, John Snow wrote:
+/* Set the #cx'th command of port #px. */
+void ahci_set_command_header(AHCIQState *ahci, uint8_t px,
+ uint8_t cx, AHCICommandHeader *cmd)
+{
+uint64_t ba = ahci->port[px].clb
On 30/01/2015 19:41, John Snow wrote:
> +/* Set the #cx'th command of port #px. */
> +void ahci_set_command_header(AHCIQState *ahci, uint8_t px,
> + uint8_t cx, AHCICommandHeader *cmd)
> +{
> +uint64_t ba = ahci->port[px].clb;
> +ba += cx * sizeof(AHCICommandHe
On 30/01/2015 19:41, John Snow wrote:
> +/* Construct our Command Header (set_command_header handles endianness.)
> */
> +memset(&cmd, 0x00, sizeof(cmd));
> +cmd.flags = 5; /* reg_h2d_fis is 5 double-words long */
> +cmd.flags = 0x400; /* clear PxTFD.STS.BSY when done */
And
Adds command header helper functions:
-ahci_command_header_set
-ahci_command_header_get,
-ahci_command_destroy, and
-ahci_cmd_pick
These helpers help to quickly manage the command header information in
the AHCI device.
ahci_command_header_set and get will store or retrieve an AHCI command
header,