[coreboot] [PATCH][v2] Unify CAR for K8 and Fam10h CPUs
stepan at coresystems.de
Tue Feb 17 13:50:31 CET 2009
Patrick Georgi wrote:
> Am Freitag 13 Februar 2009 14:44:20 schrieb Carl-Daniel Hailfinger:
>> I created a patch against a tree with your original patch applied. It
>> should be able to handle all generations since the invention of CPUID
>> just fine. Fam11h and later are handled as well.
> Looks nice, and I tested it in SimNow after some trivial changes to make it
> build. I think it's ready for integration now.
> What this patch does:
> 1. Enable SSE (to get some more registers to play with)
> 2. Determine CPUID, and stash it in an XMM register, and reference
> value for comparison in another XMM register (mangled somewhat to
> simplify inequality comparisons)
> 3. Add a macro jmp_if_k8, which jumps if the CPU is K8 (using an SSE compare)
> 4. Replace #if CAR_FAM10 sections with runtime checks using jmp_if_k8.
> This is pretty mechanical work. The macro uses local labels (1: and 2:) to
> prevent namespace issues
> 5. At one time, CPU_ADDR_BITS is used to fill a register. This is replaced
> with hardcoded values for both cases, and switched appropriately.
> 6. Disable SSE
> Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 249 bytes
Desc: OpenPGP digital signature
More information about the coreboot