On 16.04.14 18:35, BALATON Zoltan wrote:
On Wed, 16 Apr 2014, Alexander Graf wrote:
@@ -269,6 +269,18 @@ push_str("i-cache-block-size"); fword("property");
- if(cpu->tlb_size) {
PUSH(cpu->tlb_sets);
fword("encode-int");
push_str("tlb-sets");
fword("property");
PUSH(cpu->tlb_size);
fword("encode-int");
push_str("tlb-size");
fword("property");
Please just find the correct values and add the properties to the cpu nodes always.
Where can I find the correct values? Maybe QEMU should send it via FW_CFG because OpenBIOS only seems to have data for a few CPUs and most of them have a comment saying that the values are not correct anyway. But I could not find where is this data available in QEMU.
That'd work for me. I also wouldn't be opposed to move OpenBIOS to a scheme similar to SLOF and u-boot where we pass the device tree to firmware and use that instead of fw_cfg to enumerate devices in our system.
The problem with this is that OpenBIOS is used for a lot more architectures than just mac emulation and such a change would also affect others (like sparc). Also the device tree is partly created in Forth and then patched in C so using a whole device tree from QEMU would need modifications to the Forth part as well. So this is no small task and one that's too much for me. If someone can take on this task it may be done but the most I can do is adding these to FW_CFG and even for that someone should tell me how to find these values in QEMU.
- }
PUSH(fw_cfg_read_i32(FW_CFG_PPC_TBFREQ)); fword("encode-int"); push_str("timebase-frequency");
@@ -279,6 +291,11 @@ push_str("clock-frequency"); fword("property");
- PUSH(100 * 1000 * 1000);
- fword("encode-int");
- push_str("bus-frequency");
- fword("property");
I'm fairly sure this is wrong.
What is the good value then? (Some other data e.g. the clock frequency is also a made up value to make the clients happy.)
Don't we send the bus frequency via fw_cfg? I remember we had a pretty long thread about bus frequency and how it kept breaking Mac OS X.
Wasn't that the clock-frequency? That is sent via FW_CFG but the bus-frequency isn't and was just missing from the CPU properties.
Ah, it was the clock frequency vs tb frequency. Jeez - we have way too many of these.
Yes, please add it as a value in fw_cfg.
Alex