diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-07-01 11:21:55 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2019-07-07 20:23:42 +0000 |
commit | 6faccd1f00a3606b720fc3a233c2de5cd97bb176 (patch) | |
tree | d99ee83a5c9216425006833b559c7750d67a23fe /util/inteltool/cpu.c | |
parent | e2e8ccefd7aa74add617f67b62977c946c20d759 (diff) | |
download | coreboot-6faccd1f00a3606b720fc3a233c2de5cd97bb176.tar.xz |
util/inteltool: Make internal functions static
None of these functions are used outside of the files they are defined
in, so they can all be static.
Change-Id: Ie00fef5a5ba2779e0ff45640cff5cc9f1d096dc1
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33945
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'util/inteltool/cpu.c')
-rw-r--r-- | util/inteltool/cpu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/inteltool/cpu.c b/util/inteltool/cpu.c index ef2df3cd00..ff69b8cf69 100644 --- a/util/inteltool/cpu.c +++ b/util/inteltool/cpu.c @@ -78,7 +78,7 @@ inline cpuid_result_t cpuid_ext(int op, unsigned int ecx) #ifndef __DARWIN__ int msr_readerror = 0; -msr_t rdmsr(int addr) +static msr_t rdmsr(int addr) { uint32_t buf[2]; msr_t msr = { 0xffffffff, 0xffffffff }; @@ -132,7 +132,7 @@ static int open_and_seek(int cpu, unsigned long msr, int mode, int *fd) return 0; } -msr_t rdmsr_from_cpu(int cpu, unsigned long addr) +static msr_t rdmsr_from_cpu(int cpu, unsigned long addr) { int fd; msr_t msr = { 0xffffffff, 0xffffffff }; @@ -155,12 +155,12 @@ msr_t rdmsr_from_cpu(int cpu, unsigned long addr) return msr; } -int get_number_of_cpus(void) +static int get_number_of_cpus(void) { return sysconf(_SC_NPROCESSORS_ONLN); } -int is_sgx_supported(int cpunum) +static int is_sgx_supported(int cpunum) { cpuid_result_t cpuid_regs; msr_t msr; @@ -172,14 +172,14 @@ int is_sgx_supported(int cpunum) return ((cpuid_regs.ebx & SGX_SUPPORTED) && (msr.lo & PRMRR_SUPPORTED)); } -int is_sgx_enabled(int cpunum) +static int is_sgx_enabled(int cpunum) { msr_t data; data = rdmsr_from_cpu(cpunum, IA32_FEATURE_CONTROL); return (data.lo & SGX_GLOBAL_ENABLED); } -int is_sgx_locked(int cpunum) +static int is_sgx_locked(int cpunum) { msr_t data; data = rdmsr_from_cpu(cpunum, IA32_FEATURE_CONTROL); |