Lines Matching +full:value +full:- +full:start

4  * Copyright IBM, Corp. 2012-2013
12 * See the COPYING file in the top-level directory.
17 #include "libqtest-single.h"
19 #include "libqos/pci-pc.h"
30 /* decides whether we're testing -bios or -pflash */
38 cmdline = g_strdup_printf("-machine pc -smp %d", s->num_cpus); in test_start_get_bus()
49 uint32_t value; in test_i440fx_defaults() local
76 value = qpci_config_readw(dev, 0x50); /* PMCCFG */ in test_i440fx_defaults()
77 if (s->num_cpus == 1) { /* WPE */ in test_i440fx_defaults()
78 g_assert(!(value & (1 << 15))); in test_i440fx_defaults()
80 g_assert((value & (1 << 15))); in test_i440fx_defaults()
83 g_assert(!(value & (1 << 6))); /* EPTE */ in test_i440fx_defaults()
159 static gboolean verify_area(uint32_t start, uint32_t end, uint8_t value) in verify_area() argument
161 uint32_t size = end - start + 1; in verify_area()
167 memread(start, data, size); in verify_area()
172 if (data[i] != value) { in verify_area()
183 static void write_area(uint32_t start, uint32_t end, uint8_t value) in write_area() argument
185 uint32_t size = end - start + 1; in write_area()
189 memset(data, value, size); in write_area()
190 memwrite(start, data, size); in write_area()
202 uint32_t start; in test_i440fx_pam() member
226 if (pam_area[i].start == pam_area[i].end) { in test_i440fx_pam()
231 pam_area[i].start, pam_area[i].end); in test_i440fx_pam()
235 g_assert(verify_area(pam_area[i].start, pam_area[i].end, 0)); in test_i440fx_pam()
239 /* Write out a non-zero mask to the full area */ in test_i440fx_pam()
240 write_area(pam_area[i].start, pam_area[i].end, 0x42); in test_i440fx_pam()
248 g_assert(!verify_area(pam_area[i].start, pam_area[i].end, 0x42)); in test_i440fx_pam()
252 g_assert(verify_area(pam_area[i].start, pam_area[i].end, 0x42)); in test_i440fx_pam()
255 write_area(pam_area[i].start, pam_area[i].end, 0x82); in test_i440fx_pam()
261 g_assert(!verify_area(pam_area[i].start, pam_area[i].end, 0x82)); in test_i440fx_pam()
267 g_assert(verify_area(pam_area[i].start, pam_area[i].end, 0x82)); in test_i440fx_pam()
273 g_assert(!verify_area(pam_area[i].start, pam_area[i].end, 0x82)); in test_i440fx_pam()
322 cmdline = g_strdup_printf("-S %s%s", fixture->is_bios in test_i440fx_firmware()
323 ? "-bios " in test_i440fx_firmware()
324 : "-drive if=pflash,format=raw,file=", in test_i440fx_firmware()
341 memread(0x100000000ULL - BLOB_SIZE, buf, BLOB_SIZE); in test_i440fx_firmware()
349 memread(0x100000 - isa_bios_size, buf, isa_bios_size); in test_i440fx_firmware()
352 (uint8_t)((BLOB_SIZE - isa_bios_size) + i)); in test_i440fx_firmware()
370 fixture->is_bios = true; in request_bios()
376 fixture->is_bios = false; in request_pflash()