summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-06-23 06:55:41 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-10-28 11:57:23 +0000
commit845652b8bbaeca8373bcf574e12e7d4e406b72e9 (patch)
treee4d3c9cd1cb12ae13aef9a07d5bb86d4b0468b83 /src
parent400f9ca2613297b3034d96286eeeb009a1eb2ac0 (diff)
downloadcoreboot-845652b8bbaeca8373bcf574e12e7d4e406b72e9.tar.gz
coreboot-845652b8bbaeca8373bcf574e12e7d4e406b72e9.tar.bz2
coreboot-845652b8bbaeca8373bcf574e12e7d4e406b72e9.zip
src/cpu: Use 'include <stdlib.h>' when appropriate
Also: add some missing includes spotted by Jenkins. Including <types.h>, is supposed to provide stdint and stddef. Change-Id: I7bd999b59d1c0bdfa5999bf5805576f94c9a2390 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33680 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cpu/amd/family_10h-family_15h/fidvid.c1
-rw-r--r--src/cpu/amd/family_10h-family_15h/processor_name.c2
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c1
-rw-r--r--src/cpu/x86/mirror_payload.c3
4 files changed, 5 insertions, 2 deletions
diff --git a/src/cpu/amd/family_10h-family_15h/fidvid.c b/src/cpu/amd/family_10h-family_15h/fidvid.c
index 917cde307fcb..57207a431a39 100644
--- a/src/cpu/amd/family_10h-family_15h/fidvid.c
+++ b/src/cpu/amd/family_10h-family_15h/fidvid.c
@@ -91,6 +91,7 @@ b.- prep_fid_change(...)
#include <device/pci_ops.h>
#include <stdint.h>
#include <northbridge/amd/amdht/AsPsDefs.h>
+#include <stdlib.h>
static inline void print_debug_fv(const char *str, u32 val)
{
diff --git a/src/cpu/amd/family_10h-family_15h/processor_name.c b/src/cpu/amd/family_10h-family_15h/processor_name.c
index fbd2bb5a3365..c5e31fd59db6 100644
--- a/src/cpu/amd/family_10h-family_15h/processor_name.c
+++ b/src/cpu/amd/family_10h-family_15h/processor_name.c
@@ -27,6 +27,8 @@
#include <device/pci.h>
#include <device/pnp.h>
#include <device/pci_ops.h>
+#include <stdlib.h>
+#include <types.h>
/* The maximum length of CPU names is 48 bytes, including the final NULL byte.
* If you change these names your BIOS will _NOT_ pass the AMD validation and
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 668988a70ee3..e7dfc5798dd6 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -28,6 +28,7 @@
#include <smp/spinlock.h>
#include <cpu/cpu.h>
#include <cpu/intel/speedstep.h>
+#include <stdlib.h>
#include <thread.h>
/* This is a lot more paranoid now, since Linux can NOT handle
diff --git a/src/cpu/x86/mirror_payload.c b/src/cpu/x86/mirror_payload.c
index 9dec8dbc6849..9987347f330d 100644
--- a/src/cpu/x86/mirror_payload.c
+++ b/src/cpu/x86/mirror_payload.c
@@ -11,13 +11,12 @@
* GNU General Public License for more details.
*/
-#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <bootmem.h>
#include <program_loading.h>
+#include <types.h>
void mirror_payload(struct prog *payload)
{