diff options
author | Yinghai Lu <yinghailu@gmail.com> | 2006-10-04 20:46:15 +0000 |
---|---|---|
committer | Yinghai Lu <yinghailu@gmail.com> | 2006-10-04 20:46:15 +0000 |
commit | d4b278c02c1da92219ebeb34204b9768934aeca3 (patch) | |
tree | 488d097cac9744cfc9b8ff7c89ce69bcb21370cb /src/include/cpu/amd/model_fxx_rev.h | |
parent | 2e3757d11c565a8fe68dc2a2c34975e98304533c (diff) | |
download | coreboot-d4b278c02c1da92219ebeb34204b9768934aeca3.tar.xz |
AMD Rev F support
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2435 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/include/cpu/amd/model_fxx_rev.h')
-rw-r--r-- | src/include/cpu/amd/model_fxx_rev.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/cpu/amd/model_fxx_rev.h b/src/include/cpu/amd/model_fxx_rev.h index 4c2a7ce940..ca6d69d7a0 100644 --- a/src/include/cpu/amd/model_fxx_rev.h +++ b/src/include/cpu/amd/model_fxx_rev.h @@ -1,5 +1,6 @@ #include <arch/cpu.h> +#if K8_REV_F_SUPPORT == 0 static inline int is_cpu_rev_a0(void) { return (cpuid_eax(1) & 0xfffef) == 0x0f00; @@ -74,5 +75,46 @@ static int is_e0_later_in_bsp(int nodeid) int is_e0_later_in_bsp(int nodeid); //defined model_fxx_init.c #endif +#endif + +#if K8_REV_F_SUPPORT == 1 +//AMD_F0_SUPPORT +static inline int is_cpu_pre_f0(void) +{ + return (cpuid_eax(1) & 0xfff0f) < 0x40f00; +} + +static inline int is_cpu_f0(void) +{ + return (cpuid_eax(1) & 0xfff00) == 0x40f00; +} + +static inline int is_cpu_pre_f2(void) +{ + return (cpuid_eax(1) & 0xfff0f) < 0x40f02; +} +#ifdef __ROMCC__ +//AMD_F0_SUPPORT +static int is_cpu_f0_in_bsp(int nodeid) +{ + uint32_t dword; + device_t dev; + dev = PCI_DEV(0, 0x18+nodeid, 3); + dword = pci_read_config32(dev, 0xfc); + return (dword & 0xfff00) == 0x40f00; +} +static int is_cpu_pre_f2_in_bsp(int nodeid) +{ + uint32_t dword; + device_t dev; + dev = PCI_DEV(0, 0x18+nodeid, 3); + dword = pci_read_config32(dev, 0xfc); + return (dword & 0xfff0f) < 0x40f02; +} +#else +int is_cpu_f0_in_bsp(int nodeid); // defined in model_fxx_init.c +#endif + +#endif |