diff options
author | John Snow <jsnow@redhat.com> | 2015-01-19 15:16:03 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-02-16 15:07:14 +0000 |
commit | 9a75b0a037e3a8030992244353f17b62f6daf2ab (patch) | |
tree | f2c222694f830c31a516c581afcd6b3d763faf0a /tests/libqos/ahci.h | |
parent | f3dd2da4cc8c17921cb50920600adafb02959abf (diff) |
libqos/ahci: create libqos/ahci.c
With global state removed, code responsible for booting up,
verifying, and initializing the AHCI HBA is extracted and
inserted into libqos/ahci.c, which would allow for other
qtests in the future to quickly grab a meaningfully initialized
reference to an AHCI HBA.
Even without other users, functionalizing and isolating the code
assists future AHCI tests that exercise Q35 migration.
For now, libqos/ahci.o will be PC-only, but can be expanded into
something arch-agnostic in the future, if needed.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1421698563-6977-16-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqos/ahci.h')
-rw-r--r-- | tests/libqos/ahci.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h index 72c39bcefa..77f205590e 100644 --- a/tests/libqos/ahci.h +++ b/tests/libqos/ahci.h @@ -28,7 +28,7 @@ #include <stdint.h> #include <stdlib.h> #include <stdbool.h> - +#include "libqos/libqos.h" #include "libqos/pci.h" #include "libqos/malloc-pc.h" @@ -423,4 +423,13 @@ static inline void ahci_px_clr(AHCIQState *ahci, uint8_t port, ahci_px_rreg(ahci, port, reg_num) & ~mask); } +/*** Prototypes ***/ +uint64_t ahci_alloc(AHCIQState *ahci, size_t bytes); +void ahci_free(AHCIQState *ahci, uint64_t addr); +QPCIDevice *get_ahci_device(uint32_t *fingerprint); +void free_ahci_device(QPCIDevice *dev); +void ahci_pci_enable(AHCIQState *ahci); +void start_ahci_device(AHCIQState *ahci); +void ahci_hba_enable(AHCIQState *ahci); + #endif |