Make cpuid functions usable when compiled with PIC
authorDuncan Laurie <dlaurie@chromium.org>
Tue, 10 Jan 2012 06:00:30 +0000 (22:00 -0800)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 30 Mar 2012 15:47:02 +0000 (17:47 +0200)
commit689e31d18b0fdefdef2d3b2947355e07b496ce77
tree26700bd43ee6b79ad5d5c9436959bbdfd82ce3d9
parent5d3438de41368acc89d80af7b8d235d0d1b19b60
Make cpuid functions usable when compiled with PIC

This avoids using EBX and instead uses EDI where possible,
and ESI when necessary to get the EBX value out.

This allows me to enable -fpic for SMM TSEG code.

Also add a new CPUID extended function to query with ECX set.

Change-Id: I10dbded3f3ad98a39ba7b53da59af6ca3145e2e5
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: http://review.coreboot.org/764
Tested-by: build bot (Jenkins)
Reviewed-by: Mathias Krause <minipli@googlemail.com>
src/arch/x86/include/arch/cpu.h