https://bugzilla.novell.com/show_bug.cgi?id=228344 ------- Comment #33 from bk@novell.com 2007-02-22 10:16 MST ------- Created an attachment (id=120608) --> (https://bugzilla.novell.com/attachment.cgi?id=120608&action=view) updated fix with detection of Hammer, includes rewrite of set_fixed_ranges, tested on Ferrari 1000 in 64-bit mode - for review I could not access the K8 SYSCFG MSR on Intel64 (tried it in legacy mode only) and http://en.wikipedia.org/wiki/EM64T#Differences_between_AMD64_and_Intel_64 also says that it does not exist. So this updated patch accesses the K8 SYSCFG MSR only on Hammer CPUs, also in legacy mode (I assume that there is nothing different there, but I will test it), but not on Intel 64, Athlon or other CPUs. It contains a rewrite of set_fixed_ranges() which was a spaghetti-implementation of what could have been written better (smaller in code and source and easy to read) using an inlined function, but without the code for handling WrMem and RdMem, my rewrite has the exact same object size, so there was no big deal in rewriting it, other than readability. However, by adding support for WrMem/WrMem, the code is smaller when not inlined (speed is not a concern in this code path) so a rewrite to use a function was even better for code size. The patch could be optimised even more for object size, but that is not the main topic now. Anyway, with this version, result is that the object code with the rewrite is more 100 bytes smaller than that of the previous patch, even with the K8 check which isn't even included in the previous patch, but also the source code is more readable. This patch works on the Ferrari 1000 in long mode (I verified the MTRRs right after boot and after many resumes to be in sync and not messed up), and will also test what happens in legacy mode. What remains is a test in 32-bit mode and the patch could be further polished to be ready for submission. Comments welcome. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.