Revision 0a8b2938

b/hw/spapr.c
140 140
        char *nodename;
141 141
        uint32_t segs[] = {cpu_to_be32(28), cpu_to_be32(40),
142 142
                           0xffffffff, 0xffffffff};
143
        uint32_t tbfreq = kvm_enabled() ? kvmppc_get_tbfreq() : TIMEBASE_FREQ;
144
        uint32_t cpufreq = kvm_enabled() ? kvmppc_get_clockfreq() : 1000000000;
143 145

  
144 146
        if (asprintf(&nodename, "%s@%x", modelname, index) < 0) {
145 147
            fprintf(stderr, "Allocation failure\n");
......
158 160
                                env->dcache_line_size)));
159 161
        _FDT((fdt_property_cell(fdt, "icache-block-size",
160 162
                                env->icache_line_size)));
161
        _FDT((fdt_property_cell(fdt, "timebase-frequency", TIMEBASE_FREQ)));
162
        /* Hardcode CPU frequency for now.  It's kind of arbitrary on
163
         * full emu, for kvm we should copy it from the host */
164
        _FDT((fdt_property_cell(fdt, "clock-frequency", 1000000000)));
163
        _FDT((fdt_property_cell(fdt, "timebase-frequency", tbfreq)));
164
        _FDT((fdt_property_cell(fdt, "clock-frequency", cpufreq)));
165 165
        _FDT((fdt_property_cell(fdt, "ibm,slb-size", env->slb_nr)));
166 166
        _FDT((fdt_property(fdt, "ibm,pft-size",
167 167
                           pft_size_prop, sizeof(pft_size_prop))));

Also available in: Unified diff