qtest_start(args);
- boot_sector_test();
+ boot_sector_test(global_qtest);
data->tables = g_array_new(false, true, sizeof(AcpiSdtTable));
test_acpi_rsdp_address(data);
*
* Authors:
* Michael S. Tsirkin <mst@redhat.com>
- * Victor Kaplansky <victork@redhat.com>
+ * Victor Kaplansky <victork@redhat.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
}
/* Loop until signature in memory is OK. */
-void boot_sector_test(void)
+void boot_sector_test(QTestState *qts)
{
uint8_t signature_low;
uint8_t signature_high;
* instruction.
*/
for (i = 0; i < TEST_CYCLES; ++i) {
- signature_low = readb(SIGNATURE_ADDR);
- signature_high = readb(SIGNATURE_ADDR + 1);
+ signature_low = qtest_readb(qts, SIGNATURE_ADDR);
+ signature_high = qtest_readb(qts, SIGNATURE_ADDR + 1);
signature = (signature_high << 8) | signature_low;
if (signature == SIGNATURE) {
break;
*
* Authors:
* Michael S. Tsirkin <mst@redhat.com>
- * Victor Kaplansky <victork@redhat.com>
+ * Victor Kaplansky <victork@redhat.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
#ifndef TEST_BOOT_SECTOR_H
#define TEST_BOOT_SECTOR_H
+#include "libqtest.h"
+
/* Create boot disk file. fname must be a suitable string for mkstemp() */
int boot_sector_init(char *fname);
/* Loop until signature in memory is OK. */
-void boot_sector_test(void);
+void boot_sector_test(QTestState *qts);
/* unlink boot disk file. */
void boot_sector_cleanup(const char *fname);
test->model);
qtest_start(args);
- boot_sector_test();
+ boot_sector_test(global_qtest);
qtest_quit(global_qtest);
g_free(args);
}
int i;
/* Wait for guest firmware to finish and start the payload. */
- boot_sector_test();
+ boot_sector_test(global_qtest);
/* Tables should be initialized now. */
rsdp_offset = acpi_find_rsdp_address();