1/* 2 * Copyright (c) 2015 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef LIBCPUID_AMD_H_ 11#define LIBCPUID_AMD_H_ 1 12 13#include <string.h> 14 15/** 16 * \brief verifies the CPU 17 * 18 * \returns TRUE if its a Intel CPU 19 * FALSE otherwise 20 */ 21static inline bool cpuid_amd_check_vendor(void) 22{ 23 struct cpuid_regs reg = CPUID_REGS_INITIAL(0, 0); 24 cpuid_exec(®); 25 26 return (strncmp((char *)®.ebx, CPUID_VENDOR_STRING_AMD, 12) == 0); 27} 28 29/** 30 * \brief fills the vendor specific handler functions 31 * 32 * \param fn_tab function pointer table to be filled 33 */ 34void cpuid_amd_set_handlers(struct cpuid_functions *fn_tab); 35 36#endif /* CPUID_INTERNAL_H_ */ 37