Fix build for QEMU board and PPC 970. #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently discovered that the SLOF ROM supplied with QEMU crashes when I emulate a G5 (PPC 970), or when running on a real G5 in KVM, if the pSeries version is 2.6 or higher. The first boot failure is with the OF xHCI driver added in pseries-2.6, but the VM crashes even earlier, before the screen is initialized, when I use newer pSeries versions.
By rebuilding SLOF for qemu with the CPU type changed from "ppcp7" to "ppc970", I can now boot Linux on a G5 (real or emulated) with pSeries versions 2.6 to 4.2 (the highest I tested). I assume that the crashes at boot with the P7 ROM are due to the different cache flushing code selected for ppc970 vs. POWER7, which only affect some OF drivers.
The first commit fixes the build failures when changing the arch to ppc970 (missing definitions, and a temp variable was needed for a loop). The second commit changes the default QEMU board config to ppc970 and also patches the make rules to work better on both native and cross-compiled Linux. Feel free to take either or both commits. Thanks!