~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to tests/prom-env-test.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    uint32_t signature;
31
31
    int i;
32
32
 
33
 
    /* Poll until code has run and modified memory. Wait at most 30 seconds */
34
 
    for (i = 0; i < 10000; ++i) {
 
33
    /* Poll until code has run and modified memory. Wait at most 120 seconds */
 
34
    for (i = 0; i < 12000; ++i) {
35
35
        signature = readl(ADDRESS);
36
36
        if (signature == MAGIC) {
37
37
            break;
45
45
static void test_machine(const void *machine)
46
46
{
47
47
    char *args;
48
 
 
49
 
    args = g_strdup_printf("-M %s,accel=tcg -prom-env 'boot-command=%x %x l!'",
50
 
                           (const char *)machine, MAGIC, ADDRESS);
 
48
    const char *extra_args;
 
49
 
 
50
    /* The pseries firmware boots much faster without the default devices */
 
51
    extra_args = strcmp(machine, "pseries") == 0 ? "-nodefaults" : "";
 
52
 
 
53
    args = g_strdup_printf("-M %s,accel=tcg %s -prom-env 'use-nvramrc?=true' "
 
54
                           "-prom-env 'nvramrc=%x %x l!' ",
 
55
                           (const char *)machine, extra_args, MAGIC, ADDRESS);
51
56
 
52
57
    qtest_start(args);
53
58
    check_guest_memory();
71
76
int main(int argc, char *argv[])
72
77
{
73
78
    const char *sparc_machines[] = { "SPARCbook", "Voyager", "SS-20", NULL };
74
 
    const char *sparc64_machines[] = { "sun4u", "sun4v", NULL };
 
79
    const char *sparc64_machines[] = { "sun4u", NULL };
75
80
    const char *ppc_machines[] = { "mac99", "g3beige", NULL };
76
81
    const char *ppc64_machines[] = { "mac99", "g3beige", "pseries", NULL };
77
82
    const char *arch = qtest_get_arch();