diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-02-17 12:56:58 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-02-17 12:56:58 +0000 |
commit | 08afc6d9e0fe428190bcfb1bceb61418bee1538e (patch) | |
tree | f9a0377f8b6e215188f9ca8c351c207c5055ae87 /src/devices/pnp_device.c | |
parent | b575d67b9ab9b7255a615507f07cd4bbab7a60f0 (diff) |
Unify CAR so the same compiled code does the right thing on both
K8 and Fam10+ CPUs.
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@coresystems.de>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3951 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pnp_device.c')
0 files changed, 0 insertions, 0 deletions