Change in ...coreboot[master]: crossgcc: Upgrade GCC to 9.1.0
by HAOUAS Elyes (Code Review)
HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32564
Change subject: crossgcc: Upgrade GCC to 9.1.0
......................................................................
crossgcc: Upgrade GCC to 9.1.0
Change-Id: Id6f65548764654ae5539ac3c835853ea2fa1c5e0
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M util/crossgcc/buildgcc
D util/crossgcc/patches/gcc-8.3.0_nds32_ite.patch
R util/crossgcc/patches/gcc-9.1.0_ada-musl_workaround.patch
R util/crossgcc/patches/gcc-9.1.0_gnat.patch
R util/crossgcc/patches/gcc-9.1.0_libgcc.patch
D util/crossgcc/sum/gcc-8.3.0.tar.xz.cksum
A util/crossgcc/sum/gcc-9.1.0.tar.xz.cksum
7 files changed, 2 insertions(+), 21,021 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/32564/1
--
To view, visit https://review.coreboot.org/c/coreboot/+/32564
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id6f65548764654ae5539ac3c835853ea2fa1c5e0
Gerrit-Change-Number: 32564
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
7 hours, 2 minutes
Change in ...coreboot[master]: nb/sandybridge/raminit_common.c: Remove variable set but not used
by HAOUAS Elyes (Code Review)
HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33005
Change subject: nb/sandybridge/raminit_common.c: Remove variable set but not used
......................................................................
nb/sandybridge/raminit_common.c: Remove variable set but not used
Change-Id: I109353775fe4ecce6a05ef88781939243f398d17
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/northbridge/intel/sandybridge/raminit_common.c
1 file changed, 9 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/33005/1
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index 5347c5c..b8ad3c0 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -1824,7 +1824,7 @@
static void adjust_high_timB(ramctr_timing * ctrl)
{
- int channel, slotrank, lane, old;
+ int channel, slotrank, lane;
MCHBAR32(0x3400) = 0x200;
FOR_ALL_POPULATED_CHANNELS {
fill_pattern1(ctrl, channel);
@@ -1898,15 +1898,18 @@
0x100 * channel + 4);
res |= ((u64) MCHBAR32(lane_registers[lane] +
0x100 * channel + 8)) << 32;
- old = ctrl->timings[channel][slotrank].lanes[lane].timB;
- ctrl->timings[channel][slotrank].lanes[lane].timB +=
- get_timB_high_adjust(res) * 64;
printram("High adjust %d:%016llx\n", lane, res);
- printram("Bval+: %d, %d, %d, %x -> %x\n", channel,
- slotrank, lane, old,
+ printram("Bval+: %d, %d, %d, %x", channel,
+ slotrank, lane,
ctrl->timings[channel][slotrank].lanes[lane].
timB);
+ ctrl->timings[channel][slotrank].lanes[lane].timB +=
+ get_timB_high_adjust(res) * 64;
+ printram(" -> %x\n",
+ ctrl->timings[channel][slotrank].lanes[lane].
+ timB);
+
}
}
MCHBAR32(0x3400) = 0;
--
To view, visit https://review.coreboot.org/c/coreboot/+/33005
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I109353775fe4ecce6a05ef88781939243f398d17
Gerrit-Change-Number: 33005
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
1 day, 9 hours
Change in ...coreboot[master]: Adding Asus A88XM-E FM2+ motherboard with documentation
by Balázs Vinarz (Code Review)
Balázs Vinarz has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30987
Change subject: Adding Asus A88XM-E FM2+ motherboard with documentation
......................................................................
Adding Asus A88XM-E FM2+ motherboard with documentation
Signed-off-by: Balazs Vinarz <vinibali1(a)gmail.com>
Change-Id: I60fa0636ba41f5f1a6a3faa2764bf2f0a968cf90
---
A Documentation/mainboard/asus/a88xm-e.md
A src/mainboard/asus/a88xm-e/BiosCallOuts.c
A src/mainboard/asus/a88xm-e/Kconfig
A src/mainboard/asus/a88xm-e/Kconfig.name
A src/mainboard/asus/a88xm-e/Makefile.inc
A src/mainboard/asus/a88xm-e/OemCustomize.c
A src/mainboard/asus/a88xm-e/OptionsIds.h
A src/mainboard/asus/a88xm-e/acpi/cpstate.asl
A src/mainboard/asus/a88xm-e/acpi/gpe.asl
A src/mainboard/asus/a88xm-e/acpi/mainboard.asl
A src/mainboard/asus/a88xm-e/acpi/routing.asl
A src/mainboard/asus/a88xm-e/acpi/sata.asl
A src/mainboard/asus/a88xm-e/acpi/si.asl
A src/mainboard/asus/a88xm-e/acpi/sleep.asl
A src/mainboard/asus/a88xm-e/acpi/superio.asl
A src/mainboard/asus/a88xm-e/acpi/thermal.asl
A src/mainboard/asus/a88xm-e/acpi/usb_oc.asl
A src/mainboard/asus/a88xm-e/acpi_tables.c
A src/mainboard/asus/a88xm-e/board_info.txt
A src/mainboard/asus/a88xm-e/buildOpts.c
A src/mainboard/asus/a88xm-e/cmos.layout
A src/mainboard/asus/a88xm-e/devicetree_a88xm-e.cb
A src/mainboard/asus/a88xm-e/dsdt.asl
A src/mainboard/asus/a88xm-e/irq_tables.c
A src/mainboard/asus/a88xm-e/mainboard.c
A src/mainboard/asus/a88xm-e/mptable.c
A src/mainboard/asus/a88xm-e/romstage.c
27 files changed, 2,371 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/30987/1
diff --git a/Documentation/mainboard/asus/a88xm-e.md b/Documentation/mainboard/asus/a88xm-e.md
new file mode 100644
index 0000000..5f50c5a
--- /dev/null
+++ b/Documentation/mainboard/asus/a88xm-e.md
@@ -0,0 +1,131 @@
+# ASUS A88XM-E
+
+This page describes how to run coreboot on the [ASUS A88XM-E].
+
+## Technology
+
+Both "Trinity" and "Richland" FM2 desktop processing units are working,
+the CPU architecture in these CPUs/APUs are [Piledriver],
+and their GPU is [TeraScale 3] (VLIW4-based).
+
+Kaveri is non-working at the moment (FM2+),
+the CPU architecture in these CPUs/APUs are [Steamroller],
+and their GPU is [Sea Islands] (GCN2-based).
+
+```eval_rst
++------------------+--------------------------------------------------+
+| A88XM-E | |
++------------------+--------------------------------------------------+
+| DDR voltage IC | Nuvoton 3101S |
++------------------+--------------------------------------------------+
+| Network | Realtek RTL8111G - Not working |
++------------------+--------------------------------------------------+
+| Northbridge | Integrated into CPU with IMC and GPU (APUs only) |
++------------------+--------------------------------------------------+
+| Southbridge | Bolton-D4 |
++------------------+--------------------------------------------------+
+| Sound IC | Realtek ALC887 |
++------------------+--------------------------------------------------+
+| Super I/O | ITE 8603E |
++------------------+--------------------------------------------------+
+| VRM controller | DIGI VRM ASP1206 |
++------------------+--------------------------------------------------+
+```
+
+## Flashing coreboot
+
+```eval_rst
++---------------------+------------+
+| Type | Value |
++=====================+============+
+| Socketed flash | yes |
++---------------------+------------+
+| Model | [GD25Q64] |
++---------------------+------------+
+| Size | 8 MiB |
++---------------------+------------+
+| Package | DIP-8 |
++---------------------+------------+
+| Write protection | yes |
++---------------------+------------+
+| Dual BIOS feature | no |
++---------------------+------------+
+| Internal flashing | yes |
++---------------------+------------+
+```
+
+### Internal programming
+
+The main SPI flash can be accessed using [flashrom], if the
+AmdSpiRomProtect modules have been deleted in the factory image previously.
+
+## Integrated graphics
+
+### Retrieve the VGA optionrom from the vendor EFI binary by running:
+
+ # dd if=/dev/mem of=vgabios.bin bs=1k count=64 skip=768
+
+This version is usable for all the GPUs.
+1002,9901 Trinity (Radeon HD 7660D)
+1002,9904 Trinity (Radeon HD 7560D)
+1002,990c Richland (Radeon HD 8670D)
+1002,990e Richland (Radeon HD 8570D)
+1002,9991 Trinity (Radeon HD 7540D)
+1002,9993 Trinity (Radeon HD 7480D)
+1002,9996 Richland (Radeon HD 8470D)
+1002,9998 Richland (Radeon HD 8370D)
+1002,999d Richland (Radeon HD 8550D)
+1002,130f Kaveri (Radeon R7)
+
+## Known issues
+
+- AHCI hot-plug
+- Integrated ethernet
+- S3 resume
+- XHCI
+
+### XHCI ports can broke after using any of the blobs, restarting the
+board with factory image makes it work again as fallback.
+Tested even with/without the Bolton and Hudson blobs.
+
+## Untested
+
+- audio over HDMI
+- IOMMU
+- PS/2 mouse
+
+## TODOs
+
+- one ATOMBIOS module for all the integrated GPUs
+- manage to work with Kaveri/Godavary (missing PSP firmware?)
+
+## Working
+
+- ACPI
+- CPU frequency scaling
+- flashrom under coreboot
+- Hardware monitoring
+- Integrated graphics
+- Keyboard
+- KVM virtualization
+- Onboard audio
+- PCI
+- PCIe
+- PS/2 keyboard (during payload, bootloader)
+- SATA
+- Serial port
+- SuperIO based fan control
+- USB (disabling XHCI controller makes to work as fallback USB2.0 ports)
+
+## Extra resources
+
+- [Board manual]
+
+[ASUS A88XM-E]: https://www.asus.com/Motherboards/A88XME/
+[Board manual]: https://dlcdnets.asus.com/pub/ASUS/mb/SocketFM2/A88XM-E/E9125_A88XM-E.pdf
+[flashrom]: https://flashrom.org/Flashrom
+[GD25Q64]: http://www.elm-tech.com/ja/products/spi-flash-memory/gd25q64/gd25q64.pdf
+[Piledriver]: https://en.wikipedia.org/wiki/Piledriver_%28microarchitecture%29#APU_lines
+[Sea Islands]: https://en.wikipedia.org/wiki/Graphics_Core_Next#GCN_2nd_generation
+[Steamroller]: https://en.wikipedia.org/wiki/Steamroller_(microarchitecture)
+[TeraScale 3]: https://en.wikipedia.org/wiki/TeraScale_%28microarchitecture%29#TeraScale_3
diff --git a/src/mainboard/asus/a88xm-e/BiosCallOuts.c b/src/mainboard/asus/a88xm-e/BiosCallOuts.c
new file mode 100644
index 0000000..56c1753
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/BiosCallOuts.c
@@ -0,0 +1,98 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <AGESA.h>
+#include <northbridge/amd/agesa/BiosCallOuts.h>
+#include <northbridge/amd/agesa/state_machine.h>
+
+#include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h>
+#include <stdlib.h>
+
+const BIOS_CALLOUT_STRUCT BiosCallouts[] =
+{
+ {AGESA_DO_RESET, agesa_Reset },
+ {AGESA_READ_SPD, agesa_ReadSpd },
+ {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
+ {AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
+ {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData },
+ {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess },
+ {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
+ {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage }
+};
+const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);
+
+/**
+ * ASUS A88XM-E board ALC887-VD Verb Table
+ *
+ * Copied from `/sys/class/sound/hwC1D0/init_pin_configs` when running
+ * the vendor BIOS.
+ */
+#if !IS_ENABLED(CONFIG_BOARD_ASUS_A88XM_E)
+const CODEC_ENTRY a88xm_e_alc887_VerbTbl[] = {
+ {0x11, 0x90460130},
+ {0x12, 0x40330000},
+ {0x14, 0x01014010},
+ {0x15, 0x411111f0},
+ {0x16, 0x411111f0},
+ {0x17, 0x411111f0},
+ {0x18, 0x01a19040},
+ {0x19, 0x02a19050},
+ {0x1a, 0x0181304f},
+ {0x1b, 0x02214020},
+ {0x1c, 0x411111f0},
+ {0x1d, 0x4044c601},
+ {0x1e, 0x411111f0},
+ {0x1f, 0x411111f0}
+ };
+#else
+const CODEC_ENTRY a88xm_e_alc887_VerbTbl[] = {
+ {0x11, 0x90460130},
+ {0x12, 0x40330000},
+ {0x14, 0x01014010},
+ {0x15, 0x411111f0},
+ {0x16, 0x411111f0},
+ {0x17, 0x411111f0},
+ {0x18, 0x01a19040},
+ {0x19, 0x02a19050},
+ {0x1a, 0x0181304f},
+ {0x1b, 0x02214020},
+ {0x1c, 0x411111f0},
+ {0x1d, 0x4044c601},
+ {0x1e, 0x411111f0},
+ {0x1f, 0x411111f0}
+};
+#endif
+
+static const CODEC_TBL_LIST CodecTableList[] =
+{
+ {0x10ec0887, (CODEC_ENTRY*)&a88xm_e_alc887_VerbTbl[0]},
+ {(UINT32)0x0FFFFFFFF, (CODEC_ENTRY*)0x0FFFFFFFFUL}
+};
+
+void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
+{
+ FchParams_reset->LegacyFree = IS_ENABLED(CONFIG_HUDSON_LEGACY_FREE);
+}
+
+void board_FCH_InitEnv(struct sysinfo *cb_NA, FCH_DATA_BLOCK *FchParams_env)
+{
+ /* Azalia Controller OEM Codec Table Pointer */
+ FchParams_env->Azalia.AzaliaOemCodecTablePtr = (CODEC_TBL_LIST *)(&CodecTableList[0]);
+
+ /* Fan Control */
+ FchParams_env->Imc.ImcEnable = FALSE;
+ FchParams_env->Hwm.HwMonitorEnable = FALSE;
+ FchParams_env->Hwm.HwmFchtsiAutoPoll = FALSE;/* 1 enable, 0 disable TSI Auto Polling */
+}
diff --git a/src/mainboard/asus/a88xm-e/Kconfig b/src/mainboard/asus/a88xm-e/Kconfig
new file mode 100644
index 0000000..70be2f1
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/Kconfig
@@ -0,0 +1,117 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2012 Advanced Micro Devices, Inc.
+# Copyright (C) 2012 Rudolf Marek <r.marek(a)assembler.cz>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+if BOARD_ASUS_A88XM_E
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select CPU_AMD_AGESA_FAMILY15_TN
+ select NORTHBRIDGE_AMD_AGESA_FAMILY15_TN
+ select SOUTHBRIDGE_AMD_AGESA_HUDSON
+ select HAVE_OPTION_TABLE
+ select HAVE_PIRQ_TABLE
+ select HAVE_MP_TABLE
+ select HAVE_ACPI_RESUME
+ select HAVE_ACPI_TABLES
+ select SUPERIO_ITE_IT8728F
+ select BOARD_ROMSIZE_KB_8192
+ select GFXUMA
+
+choice
+ prompt "DDR3 memory voltage"
+ default BOARD_ASUS_A88XM_E_DDR3_VOLT_150
+
+config BOARD_ASUS_A88XM_E_DDR3_VOLT_135
+ bool "1.35V"
+ help
+ Set DRR3 memory voltage to 1.35V
+config BOARD_ASUS_A88XM_E_DDR3_VOLT_150
+ bool "1.50V"
+ help
+ Set DRR3 memory voltage to 1.50V
+config BOARD_ASUS_A88XM_E_DDR3_VOLT_165
+ bool "1.65V"
+ help
+ Set DRR3 memory voltage to 1.65V
+endchoice
+
+config BOARD_ASUS_A88XM_E_DDR3_VOLT_VAL
+ hex
+ default 0x9e if BOARD_ASUS_A88XM_E_DDR3_VOLT_135
+ default 0x0 if BOARD_ASUS_A88XM_E_DDR3_VOLT_150
+ default 0x1e if BOARD_ASUS_A88XM_E_DDR3_VOLT_165
+
+config MAINBOARD_DIR
+ string
+ default asus/a88xm-e
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "A88XM-E" if BOARD_ASUS_A88XM_E
+
+config HW_MEM_HOLE_SIZEK
+ hex
+ default 0x200000
+
+config MAX_CPUS
+ int
+ default 4
+
+config HUDSON_XHCI_FWM
+ bool
+ default n
+
+config HUDSON_IMC_FWM
+ bool
+ default n
+
+config IRQ_SLOT_COUNT
+ int
+ default 11
+
+config ONBOARD_VGA_IS_PRIMARY
+ bool
+ default y
+
+config VGA_BIOS_ID
+ string
+ default "1002,990e"
+
+config CONFIG_DRIVERS_PS2_KEYBOARD
+ bool
+ default y
+
+config CONFIG_HUDSON_XHCI_ENABLE
+ bool
+ default n
+
+config HUDSON_LEGACY_FREE
+ bool
+ default n
+
+config POST_IO
+ bool
+ default n
+
+config CONFIG_POST_DEVICE_PCI_PCIE
+ bool
+ default y
+
+config DEVICETREE
+ string
+ default "devicetree_a88xm-e.cb"
+
+endif # BOARD_ASUS_A88XM_E
diff --git a/src/mainboard/asus/a88xm-e/Kconfig.name b/src/mainboard/asus/a88xm-e/Kconfig.name
new file mode 100644
index 0000000..492d610
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_ASUS_A88XM_E
+ bool "A88XM-E"
diff --git a/src/mainboard/asus/a88xm-e/Makefile.inc b/src/mainboard/asus/a88xm-e/Makefile.inc
new file mode 100644
index 0000000..f8895fa
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/Makefile.inc
@@ -0,0 +1,22 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2012 Advanced Micro Devices, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+romstage-y += buildOpts.c
+romstage-y += BiosCallOuts.c
+romstage-y += OemCustomize.c
+
+ramstage-y += buildOpts.c
+ramstage-y += BiosCallOuts.c
+ramstage-y += OemCustomize.c
diff --git a/src/mainboard/asus/a88xm-e/OemCustomize.c b/src/mainboard/asus/a88xm-e/OemCustomize.c
new file mode 100644
index 0000000..4c4c5bf
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/OemCustomize.c
@@ -0,0 +1,177 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <Porting.h>
+#include <AGESA.h>
+
+#include <northbridge/amd/agesa/state_machine.h>
+#include <PlatformMemoryConfiguration.h>
+
+/*
+ * Lane ID Mapping (from Fam15h BKDG: Table 45: Lane Id Mapping)
+ *
+ * Lane Id
+ * 0 P_UMI_[T,R]X[P,N]0 - southbridge link, connect via dev 8
+ * 1 P_UMI_[T,R]X[P,N]1 - southbridge link, connect via dev 8
+ * 2 P_UMI_[T,R]X[P,N]2 - southbridge link, connect via dev 8
+ * 3 P_UMI_[T,R]X[P,N]3 - southbridge link, connect via dev 8
+ * 4 P_GPP_[T,R]X[P,N]0 - may connect to PCI dev 4 - 7
+ * 5 P_GPP_[T,R]X[P,N]1 - may connect to PCI dev 4 - 7
+ * 6 P_GPP_[T,R]X[P,N]2 - may connect to PCI dev 4 - 7
+ * 7 P_GPP_[T,R]X[P,N]3 - may connect to PCI dev 4 - 7
+ * 8 P_GFX_[T,R]X[P,N]0 - may be used to form GFX slot or DDI
+ * 9 P_GFX_[T,R]X[P,N]1 - may be used to form GFX slot or DDI
+ * 10 P_GFX_[T,R]X[P,N]2 - may be used to form GFX slot or DDI
+ * 11 P_GFX_[T,R]X[P,N]3 - may be used to form GFX slot or DDI
+ * 12 P_GFX_[T,R]X[P,N]4 - may be used to form GFX slot or DDI
+ * 13 P_GFX_[T,R]X[P,N]5 - may be used to form GFX slot or DDI
+ * 14 P_GFX_[T,R]X[P,N]6 - may be used to form GFX slot or DDI
+ * 15 P_GFX_[T,R]X[P,N]7 - may be used to form GFX slot or DDI
+ * 16 P_GFX_[T,R]X[P,N]8 - may be used to form GFX slot or DDI
+ * 17 P_GFX_[T,R]X[P,N]9 - may be used to form GFX slot or DDI
+ * 18 P_GFX_[T,R]X[P,N]10 - may be used to form GFX slot or DDI
+ * 19 P_GFX_[T,R]X[P,N]11 - may be used to form GFX slot or DDI
+ * 20 P_GFX_[T,R]X[P,N]12 - may be used to form GFX slot or DDI
+ * 21 P_GFX_[T,R]X[P,N]13 - may be used to form GFX slot or DDI
+ * 22 P_GFX_[T,R]X[P,N]14 - may be used to form GFX slot or DDI
+ * 23 P_GFX_[T,R]X[P,N]15 - may be used to form GFX slot or DDI
+ * 24 DP0_TX[P,N]0 - rest is just for DDI (graphics outputs)
+ * 25 DP0_TX[P,N]1
+ * 26 DP0_TX[P,N]2
+ * 27 DP0_TX[P,N]3
+ * 28 DP1_TX[P,N]0
+ * 29 DP1_TX[P,N]1
+ * 30 DP1_TX[P,N]2
+ * 31 DP1_TX[P,N]3
+ * 32 DP2_TX[P,N]0
+ * 33 DP2_TX[P,N]1
+ * 34 DP2_TX[P,N]2
+ * 35 DP2_TX[P,N]3
+ * 36 DP2_TX[P,N]4
+ * 37 DP2_TX[P,N]5
+ * 38 DP2_TX[P,N]6
+ */
+
+static const PCIe_PORT_DESCRIPTOR PortList[] = {
+ /* PCIe port, Lanes 8:23, PCI Device Number 2, blue x16 slot */
+ {
+ 0,
+ PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 8, 23),
+ PCIE_PORT_DATA_INITIALIZER(PortEnabled, ChannelTypeExt6db, 2,
+ HotplugDisabled,
+ PcieGenMaxSupported,
+ PcieGenMaxSupported,
+ AspmDisabled, 1)
+ },
+ /* PCIe port, Lanes 4:7, PCI Device Number 4, black x16 slot (in fact x4) */
+ {
+ 0,
+ PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 4, 7),
+ PCIE_PORT_DATA_INITIALIZER(PortEnabled, ChannelTypeExt6db, 4,
+ HotplugDisabled,
+ PcieGenMaxSupported,
+ PcieGenMaxSupported,
+ AspmDisabled, 1)
+ },
+ /* PCIe port, Lanes 0:3, UMI link to SB, PCI Device Number 8 */
+ {
+ DESCRIPTOR_TERMINATE_LIST,
+ PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine, 0, 3),
+ PCIE_PORT_DATA_INITIALIZER(PortEnabled, ChannelTypeExt6db, 8,
+ HotplugDisabled,
+ PcieGenMaxSupported,
+ PcieGenMaxSupported,
+ AspmDisabled, 0)
+ },
+};
+
+/*
+ * It is not known, if the setup is complete.
+ *
+ * Tested and works: VGA/DVI
+ * Untested: HDMI
+ */
+static const PCIe_DDI_DESCRIPTOR DdiList[] = {
+ // DP0 to HDMI0/DP
+ {
+ 0,
+ PCIE_ENGINE_DATA_INITIALIZER(PcieDdiEngine, 24, 27),
+ PCIE_DDI_DATA_INITIALIZER(ConnectorTypeHDMI, Aux1, Hdp1)
+ },
+ // DP1 to FCH
+ {
+ 0,
+ PCIE_ENGINE_DATA_INITIALIZER(PcieDdiEngine, 28, 31),
+ PCIE_DDI_DATA_INITIALIZER(ConnectorTypeNutmegDpToVga, Aux2, Hdp2)
+ },
+ // DP2 to HDMI1/DP
+ {
+ 0,
+ PCIE_ENGINE_DATA_INITIALIZER(PcieDdiEngine, 32, 35),
+ PCIE_DDI_DATA_INITIALIZER(ConnectorTypeHDMI, Aux3, Hdp3)
+ },
+};
+
+static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
+ .Flags = DESCRIPTOR_TERMINATE_LIST,
+ .SocketId = 0,
+ .PciePortList = PortList,
+ .DdiLinkList = DdiList,
+};
+
+void board_BeforeInitReset(struct sysinfo *cb, AMD_RESET_PARAMS *Reset)
+{
+ FCH_RESET_INTERFACE *FchReset = &Reset->FchInterface;
+ FchReset->Xhci0Enable = IS_ENABLED(CONFIG_HUDSON_XHCI_ENABLE);
+ FchReset->Xhci1Enable = IS_ENABLED(CONFIG_HUDSON_XHCI_ENABLE);
+}
+
+void board_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *InitEarly)
+{
+ InitEarly->GnbConfig.PcieComplexList = &PcieComplex;
+ InitEarly->GnbConfig.PsppPolicy = 0;
+}
+
+/*----------------------------------------------------------------------------------------
+ * CUSTOMER OVERIDES MEMORY TABLE
+ *----------------------------------------------------------------------------------------
+ */
+
+/*
+ * Platform Specific Overriding Table allows IBV/OEM to pass in platform information to AGESA
+ * (e.g. MemClk routing, the number of DIMM slots per channel,...). If PlatformSpecificTable
+ * is populated, AGESA will base its settings on the data from the table. Otherwise, it will
+ * use its default conservative settings.
+ */
+
+static CONST PSO_ENTRY ROMDATA MemoryTable_XM_E[] = {
+
+ NUMBER_OF_DIMMS_SUPPORTED(ANY_SOCKET, ANY_CHANNEL, 1),
+ NUMBER_OF_CHANNELS_SUPPORTED(ANY_SOCKET, 2),
+
+ PSO_END
+};
+
+void board_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *InitPost)
+{
+ if (IS_ENABLED(CONFIG_BOARD_ASUS_A88XM_E))
+ InitPost->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *) MemoryTable_XM_E;
+}
+
+void board_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *InitMid)
+{
+ /* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+ InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+}
diff --git a/src/mainboard/asus/a88xm-e/OptionsIds.h b/src/mainboard/asus/a88xm-e/OptionsIds.h
new file mode 100644
index 0000000..b45f5a8
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/OptionsIds.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/**
+ * @file
+ *
+ * IDS Option File
+ *
+ * This file is used to switch on/off IDS features.
+ *
+ */
+#ifndef _OPTION_IDS_H_
+#define _OPTION_IDS_H_
+
+/**
+ *
+ * This file generates the defaults tables for the Integrated Debug Support
+ * Module. The documented build options are imported from a user controlled
+ * file for processing. The build options for the Integrated Debug Support
+ * Module are listed below:
+ *
+ * IDSOPT_IDS_ENABLED
+ * IDSOPT_ERROR_TRAP_ENABLED
+ * IDSOPT_CONTROL_ENABLED
+ * IDSOPT_TRACING_ENABLED
+ * IDSOPT_PERF_ANALYSIS
+ * IDSOPT_ASSERT_ENABLED
+ * IDS_DEBUG_PORT
+ * IDSOPT_CAR_CORRUPTION_CHECK_ENABLED
+ *
+ **/
+
+//#define IDSOPT_IDS_ENABLED TRUE
+//#define IDSOPT_CONTROL_ENABLED TRUE
+#define IDSOPT_TRACING_ENABLED TRUE
+#define IDSOPT_TRACING_CONSOLE_SERIALPORT TRUE
+//#define IDSOPT_PERF_ANALYSIS TRUE
+#define IDSOPT_ASSERT_ENABLED TRUE
+//#undef IDSOPT_DEBUG_ENABLED
+//#define IDSOPT_DEBUG_ENABLED FALSE
+//#undef IDSOPT_HOST_SIMNOW
+//#define IDSOPT_HOST_SIMNOW FALSE
+//#undef IDSOPT_HOST_HDT
+//#define IDSOPT_HOST_HDT FALSE
+//#define IDS_DEBUG_PORT 0x80
+
+#endif
diff --git a/src/mainboard/asus/a88xm-e/acpi/cpstate.asl b/src/mainboard/asus/a88xm-e/acpi/cpstate.asl
new file mode 100644
index 0000000..69de2d8
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/cpstate.asl
@@ -0,0 +1,112 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/* This file defines the processor and performance state capability
+ * for each core in the system. It is included into the DSDT for each
+ * core. It assumes that each core of the system has the same performance
+ * characteristics.
+*/
+/*
+#include <arch/acpi.h>
+DefinitionBlock ("DSDT.AML", "DSDT", 0x01, OEM_ID, ACPI_TABLE_CREATOR, 0x00010001)
+ {
+ Scope (\_PR) {
+ Processor(CPU0,0,0x808,0x06) {
+ #include "cpstate.asl"
+ }
+ Processor(CPU1,1,0x0,0x0) {
+ #include "cpstate.asl"
+ }
+ Processor(CPU2,2,0x0,0x0) {
+ #include "cpstate.asl"
+ }
+ Processor(CPU3,3,0x0,0x0) {
+ #include "cpstate.asl"
+ }
+ }
+*/
+ /* P-state support: The maximum number of P-states supported by the */
+ /* CPUs we'll use is 6. */
+ /* Get from AMI BIOS. */
+ Name(_PSS, Package(){
+ Package()
+ {
+ 0x00000D48,
+ 0x00011170,
+ 0x00000004,
+ 0x00000004,
+ 0x00000000,
+ 0x00000000
+ },
+
+ Package()
+ {
+ 0x00000AF0,
+ 0x0000C544,
+ 0x00000004,
+ 0x00000004,
+ 0x00000001,
+ 0x00000001
+ },
+
+ Package()
+ {
+ 0x000009C4,
+ 0x0000B3B0,
+ 0x00000004,
+ 0x00000004,
+ 0x00000002,
+ 0x00000002
+ },
+
+ Package()
+ {
+ 0x00000898,
+ 0x0000ABE0,
+ 0x00000004,
+ 0x00000004,
+ 0x00000003,
+ 0x00000003
+ },
+
+ Package()
+ {
+ 0x00000708,
+ 0x0000A410,
+ 0x00000004,
+ 0x00000004,
+ 0x00000004,
+ 0x00000004
+ },
+
+ Package()
+ {
+ 0x00000578,
+ 0x00006F54,
+ 0x00000004,
+ 0x00000004,
+ 0x00000005,
+ 0x00000005
+ }
+ })
+
+ Name(_PCT, Package(){
+ ResourceTemplate(){Register(FFixedHW, 0, 0, 0)},
+ ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}
+ })
+
+ Method(_PPC, 0){
+ Return(0)
+ }
diff --git a/src/mainboard/asus/a88xm-e/acpi/gpe.asl b/src/mainboard/asus/a88xm-e/acpi/gpe.asl
new file mode 100644
index 0000000..297db37
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/gpe.asl
@@ -0,0 +1,72 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+Scope(\_GPE) { /* Start Scope GPE */
+
+ /* General event 3 */
+ Method(_L03) {
+ /* DBGO("\\_GPE\\_L00\n") */
+ Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
+ }
+
+ /* Legacy PM event */
+ Method(_L08) {
+ /* DBGO("\\_GPE\\_L08\n") */
+ }
+
+ /* Temp warning (TWarn) event */
+ Method(_L09) {
+ /* DBGO("\\_GPE\\_L09\n") */
+ /* Notify (\_TZ.TZ00, 0x80) */
+ }
+
+ /* USB controller PME# */
+ Method(_L0B) {
+ /* DBGO("\\_GPE\\_L0B\n") */
+ Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PCI0.UOH6, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
+ }
+
+ /* ExtEvent0 SCI event */
+ Method(_L10) {
+ /* DBGO("\\_GPE\\_L10\n") */
+ }
+
+
+ /* ExtEvent1 SCI event */
+ Method(_L11) {
+ /* DBGO("\\_GPE\\_L11\n") */
+ }
+
+ /* GPIO0 or GEvent8 event */
+ Method(_L18) {
+ /* DBGO("\\_GPE\\_L18\n") */
+ Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
+ }
+
+ /* Azalia SCI event */
+ Method(_L1B) {
+ /* DBGO("\\_GPE\\_L1B\n") */
+ Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
+ Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
+ }
+} /* End Scope GPE */
diff --git a/src/mainboard/asus/a88xm-e/acpi/mainboard.asl b/src/mainboard/asus/a88xm-e/acpi/mainboard.asl
new file mode 100644
index 0000000..8398c88
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/mainboard.asl
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+ /* Data to be patched by the BIOS during POST */
+ /* FIXME the patching is not done yet! */
+ /* Memory related values */
+ Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
+ Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
+ Name(PBLN, 0x0) /* Length of BIOS area */
+
+ Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */
+ Name(PCLN, Multiply(0x100000, CONFIG_MMCONF_BUS_NUMBER)) /* Length of PCIe config space, 1MB each bus */
+ Name(HPBA, 0xFED00000) /* Base address of HPET table */
+
+ /* Some global data */
+ Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
+ Name(OSV, Ones) /* Assume nothing */
+ Name(PMOD, One) /* Assume APIC */
diff --git a/src/mainboard/asus/a88xm-e/acpi/routing.asl b/src/mainboard/asus/a88xm-e/acpi/routing.asl
new file mode 100644
index 0000000..0af6b42
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/routing.asl
@@ -0,0 +1,258 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+ /* Routing is in System Bus scope */
+ Name(PR0, Package(){
+ /* NB devices */
+ /* Bus 0, Dev 0 - F15 Host Controller */
+ Package(){0x0000FFFF, 0, INTA, 0 },
+ Package(){0x0000FFFF, 1, INTB, 0 },
+ Package(){0x0000FFFF, 2, INTC, 0 },
+ Package(){0x0000FFFF, 3, INTD, 0 },
+
+ /* Bus 0, Dev 1 - PCI Bridge for Internal Graphics(IGP) */
+ Package(){0x0001FFFF, 0, INTB, 0 },
+ Package(){0x0001FFFF, 1, INTC, 0 },
+
+ /* Bus 0, Dev 2 - PCIe Bridge for x16 slot */
+ Package(){0x0002FFFF, 0, INTC, 0 },
+ Package(){0x0002FFFF, 1, INTD, 0 },
+ Package(){0x0002FFFF, 2, INTA, 0 },
+ Package(){0x0002FFFF, 3, INTB, 0 },
+
+ /* Bus 0, Dev 3 - PCIe graphics port 1 bridge */
+
+ /* Bus 0, Dev 4 - PCIe Bridge for 4x slot */
+ Package(){0x0004FFFF, 0, INTA, 0 },
+ Package(){0x0004FFFF, 1, INTB, 0 },
+ Package(){0x0004FFFF, 2, INTC, 0 },
+ Package(){0x0004FFFF, 3, INTD, 0 },
+
+ /* Bus 0, Dev 5 - General purpose PCIe bridge 5 */
+ /* Bus 0, Dev 6 - PCIe Bridge for Ethernet Chip */
+ /* Bus 0, Dev 7 - PCIe Bridge for x1 PCIe Slot */
+ /* Bus 0, Dev 8 - Southbridge port (normally hidden) */
+
+ /* Bus 0, Dev 20 - F0:SMBus/ACPI,F1:IDE;F2:HDAudio;F3:LPC;F4:PCIBridge;F5:USB */
+ Package(){0x0014FFFF, 0, INTA, 0 },
+ Package(){0x0014FFFF, 1, INTB, 0 },
+ Package(){0x0014FFFF, 2, INTC, 0 },
+ Package(){0x0014FFFF, 3, INTD, 0 },
+
+ /* Bus 0, Dev 18,19,22 - USB: OHCI @ func 0
+ * EHCI @ func 2 */
+ Package(){0x0012FFFF, 0, INTC, 0 },
+ Package(){0x0012FFFF, 1, INTB, 0 },
+
+ Package(){0x0013FFFF, 0, INTC, 0 },
+ Package(){0x0013FFFF, 1, INTB, 0 },
+
+ Package(){0x0016FFFF, 0, INTC, 0 },
+ Package(){0x0016FFFF, 1, INTB, 0 },
+
+ /* SB devices */
+ /* Bus 0, Dev 16 - USB: XHCI func 0, 1 */
+ Package(){0x0010FFFF, 0, INTC, 0 },
+ Package(){0x0010FFFF, 1, INTB, 0 },
+
+ /* Bus 0, Dev 17 - SATA controller */
+ Package(){0x0011FFFF, 0, INTD, 0 },
+
+ /* Bus 0, Dev 21 Pcie Bridge */
+ Package(){0x0015FFFF, 0, INTA, 0 },
+ Package(){0x0015FFFF, 1, INTB, 0 },
+ Package(){0x0015FFFF, 2, INTC, 0 },
+ Package(){0x0015FFFF, 3, INTD, 0 },
+ })
+
+ Name(APR0, Package(){
+ /* NB devices in APIC mode */
+ /* Bus 0, Dev 0 - F15 Host Controller */
+ Package(){0x0000FFFF, 0, 0, 16 },
+ Package(){0x0000FFFF, 1, 0, 17 },
+ Package(){0x0000FFFF, 2, 0, 18 },
+ Package(){0x0000FFFF, 3, 0, 19 },
+
+ /* Bus 0, Dev 1 - PCI Bridge for Internal Graphics(IGP) */
+ Package(){0x0001FFFF, 0, 0, 17 },
+ Package(){0x0001FFFF, 1, 0, 18 },
+
+ /* Bus 0, Dev 2 - PCIe Bridge for x16 PCIe Slot */
+ Package(){0x0002FFFF, 0, 0, 18 },
+ Package(){0x0002FFFF, 1, 0, 19 },
+ Package(){0x0002FFFF, 2, 0, 16 },
+ Package(){0x0002FFFF, 3, 0, 17 },
+
+ /* Bus 0, Dev 3 - PCIe graphics port 1 bridge */
+
+ /* Bus 0, Dev 4 - PCIe Bridge for x4 PCIe Slot black */
+ Package(){0x0004FFFF, 0, 0, 16 },
+ Package(){0x0004FFFF, 1, 0, 17 },
+ Package(){0x0004FFFF, 2, 0, 18 },
+ Package(){0x0004FFFF, 3, 0, 19 },
+
+ /* Bus 0, Dev 5 - General purpose PCIe bridge 5 */
+ /* Bus 0, Dev 6 - General purpose PCIe bridge 6 */
+ /* Bus 0, Dev 7 - PCIe Bridge for network card */
+ /* Bus 0, Dev 8 - Southbridge port (normally hidden) */
+
+ /* Bus 0, Dev 20 - F0:SMBus/ACPI, F1:IDE; F2:HDAudio; F3:LPC; F4:PCIBridge; F5:USB */
+ Package(){0x0014FFFF, 0, 0, 16 },
+ Package(){0x0014FFFF, 1, 0, 17 },
+ Package(){0x0014FFFF, 2, 0, 18 },
+ Package(){0x0014FFFF, 3, 0, 19 },
+
+ /* SB devices in APIC mode */
+ /* Bus 0, Dev 18,19,22 - USB: OHCI @ func 0
+ * EHCI @ func 2 */
+ Package(){0x0012FFFF, 0, 0, 18 },
+ Package(){0x0012FFFF, 1, 0, 17 },
+
+ Package(){0x0013FFFF, 0, 0, 18 },
+ Package(){0x0013FFFF, 1, 0, 17 },
+
+ Package(){0x0016FFFF, 0, 0, 18 },
+ Package(){0x0016FFFF, 1, 0, 17 },
+
+ /* Bus 0, Dev 16 - USB: XHCI func 0, 1 */
+ Package(){0x0010FFFF, 0, 0, 0x12},
+ Package(){0x0010FFFF, 1, 0, 0x11},
+
+ /* Bus 0, Dev 17 - SATA controller */
+ Package(){0x0011FFFF, 0, 0, 19 },
+
+ /* Bus 0, Dev 21 PCIE Bridge */
+ Package(){0x0015FFFF, 0, 0, 17 },
+ Package(){0x0015FFFF, 1, 0, 18 },
+ Package(){0x0015FFFF, 2, 0, 19 },
+ Package(){0x0015FFFF, 3, 0, 16 },
+ })
+
+ Name(PS2, Package(){
+ /* The external GFX - Hooked to PCIe slot 2 */
+ Package(){0x0000FFFF, 0, INTD, 0 },
+ Package(){0x0000FFFF, 1, INTA, 0 },
+ Package(){0x0000FFFF, 2, INTB, 0 },
+ Package(){0x0000FFFF, 3, INTC, 0 },
+ })
+ Name(APS2, Package(){
+ /* The external GFX - Hooked to PCIe slot 2 */
+ Package(){0x0000FFFF, 0, 0, 18 },
+ Package(){0x0000FFFF, 1, 0, 19 },
+ Package(){0x0000FFFF, 2, 0, 16 },
+ Package(){0x0000FFFF, 3, 0, 17 },
+ })
+
+ /* black slot */
+ Name(PS4, Package(){
+ /* PCIe slot - Hooked to PCIe slot 4 */
+ Package(){0x0000FFFF, 0, INTA, 0 },
+ Package(){0x0000FFFF, 1, INTB, 0 },
+ Package(){0x0000FFFF, 2, INTC, 0 },
+ Package(){0x0000FFFF, 3, INTD, 0 },
+ })
+ Name(APS4, Package(){
+ /* PCIe slot - Hooked to PCIe slot 4 */
+ Package(){0x0000FFFF, 0, 0, 16 },
+ Package(){0x0000FFFF, 1, 0, 17 },
+ Package(){0x0000FFFF, 2, 0, 18 },
+ Package(){0x0000FFFF, 3, 0, 19 },
+ })
+
+ Name(PS5, Package(){
+ /* PCIe slot - Hooked to PCIe slot 5 */
+ Package(){0x0000FFFF, 0, INTB, 0 },
+ Package(){0x0000FFFF, 1, INTC, 0 },
+ Package(){0x0000FFFF, 2, INTD, 0 },
+ Package(){0x0000FFFF, 3, INTA, 0 },
+ })
+ Name(APS5, Package(){
+ /* PCIe slot - Hooked to PCIe slot 5 */
+ Package(){0x0000FFFF, 0, 0, 17 },
+ Package(){0x0000FFFF, 1, 0, 18 },
+ Package(){0x0000FFFF, 2, 0, 19 },
+ Package(){0x0000FFFF, 3, 0, 16 },
+ })
+
+ Name(PS6, Package(){
+ /* PCIe slot - Hooked to PCIe slot 6 */
+ Package(){0x0000FFFF, 0, INTC, 0 },
+ Package(){0x0000FFFF, 1, INTD, 0 },
+ Package(){0x0000FFFF, 2, INTA, 0 },
+ Package(){0x0000FFFF, 3, INTB, 0 },
+ })
+ Name(APS6, Package(){
+ /* PCIe slot - Hooked to PCIe slot 6 */
+ Package(){0x0000FFFF, 0, 0, 18 },
+ Package(){0x0000FFFF, 1, 0, 19 },
+ Package(){0x0000FFFF, 2, 0, 16 },
+ Package(){0x0000FFFF, 3, 0, 17 },
+ })
+
+ Name(PS7, Package(){
+ /* The onboard Ethernet chip - Hooked to PCIe slot 7 */
+ Package(){0x0000FFFF, 0, INTD, 0 },
+ Package(){0x0000FFFF, 1, INTA, 0 },
+ Package(){0x0000FFFF, 2, INTB, 0 },
+ Package(){0x0000FFFF, 3, INTC, 0 },
+ })
+
+ Name(APS7, Package(){
+ /* The onboard Ethernet chip - Hooked to PCIe slot 7 */
+ Package(){0x0000FFFF, 0, 0, 19 },
+ Package(){0x0000FFFF, 1, 0, 16 },
+ Package(){0x0000FFFF, 2, 0, 17 },
+ Package(){0x0000FFFF, 3, 0, 18 },
+ })
+
+ Name(PBR0, Package(){
+ /* PCIx1 on SB */
+ Package(){0x0000FFFF, 0, INTA, 0 },
+ Package(){0x0000FFFF, 1, INTB, 0 },
+ Package(){0x0000FFFF, 2, INTC, 0 },
+ Package(){0x0000FFFF, 3, INTD, 0 },
+ })
+ Name(ABR0, Package(){
+ /* PCIx1 on SB */
+ Package(){0x0000FFFF, 0, 0, 0x10 },
+ Package(){0x0000FFFF, 1, 0, 0x11 },
+ Package(){0x0000FFFF, 2, 0, 0x12 },
+ Package(){0x0000FFFF, 3, 0, 0x13 },
+ })
+
+ Name(PBR1, Package(){
+ /* Onboard network */
+ Package(){0x0000FFFF, 0, INTB, 0 },
+ Package(){0x0000FFFF, 1, INTC, 0 },
+ Package(){0x0000FFFF, 2, INTD, 0 },
+ Package(){0x0000FFFF, 3, INTA, 0 },
+ })
+ Name(ABR1, Package(){
+ /* Onboard network */
+ Package(){0x0000FFFF, 0, 0, 0x11 },
+ Package(){0x0000FFFF, 1, 0, 0x12 },
+ Package(){0x0000FFFF, 2, 0, 0x13 },
+ Package(){0x0000FFFF, 3, 0, 0x10 },
+ })
+
+ /* SB PCI Bridge */
+ Name(PCIB, Package(){
+ /* PCI slots: slot 0 behind Dev14, Fun4. */
+ Package(){0x0005FFFF, 0, 0, 0x14 },
+ Package(){0x0005FFFF, 1, 0, 0x15 },
+ Package(){0x0005FFFF, 2, 0, 0x16 },
+ Package(){0x0005FFFF, 3, 0, 0x17 },
+ })
diff --git a/src/mainboard/asus/a88xm-e/acpi/sata.asl b/src/mainboard/asus/a88xm-e/acpi/sata.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/sata.asl
diff --git a/src/mainboard/asus/a88xm-e/acpi/si.asl b/src/mainboard/asus/a88xm-e/acpi/si.asl
new file mode 100644
index 0000000..ff0c3cf
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/si.asl
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+ Scope(\_SI) {
+ Method(_SST, 1) {
+ /* DBGO("\\_SI\\_SST\n") */
+ /* DBGO(" New Indicator state: ") */
+ /* DBGO(Arg0) */
+ /* DBGO("\n") */
+ }
+ } /* End Scope SI */
diff --git a/src/mainboard/asus/a88xm-e/acpi/sleep.asl b/src/mainboard/asus/a88xm-e/acpi/sleep.asl
new file mode 100644
index 0000000..08b7de4
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/sleep.asl
@@ -0,0 +1,96 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/* Wake status package */
+Name(WKST,Package(){Zero, Zero})
+
+/*
+* \_PTS - Prepare to Sleep method
+*
+* Entry:
+* Arg0=The value of the sleeping state S1=1, S2=2, etc
+*
+* Exit:
+* -none-
+*
+* The _PTS control method is executed at the beginning of the sleep process
+* for S1-S5. The sleeping value is passed to the _PTS control method. This
+* control method may be executed a relatively long time before entering the
+* sleep state and the OS may abort the operation without notification to
+* the ACPI driver. This method cannot modify the configuration or power
+* state of any device in the system.
+*/
+Method(\_PTS, 1) {
+ /* DBGO("\\_PTS\n") */
+ /* DBGO("From S0 to S") */
+ /* DBGO(Arg0) */
+ /* DBGO("\n") */
+
+ /* Clear sleep SMI status flag and enable sleep SMI trap. */
+ /*Store(One, CSSM)
+ Store(One, SSEN)*/
+
+ /* On older chips, clear PciExpWakeDisEn */
+ /*if (LLessEqual(\_SB.SBRI, 0x13)) {
+ * Store(0,\_SB.PWDE)
+ *}
+ */
+
+ /* Clear wake status structure. */
+ Store(0, Index(WKST,0))
+ Store(0, Index(WKST,1))
+
+ Store (0x07, UPWS)
+} /* End Method(\_PTS) */
+
+/*
+* \_BFS OEM Back From Sleep method
+*
+* Entry:
+* Arg0=The value of the sleeping state S1=1, S2=2
+*
+* Exit:
+* -none-
+*/
+Method(\_BFS, 1) {
+ /* DBGO("\\_BFS\n") */
+ /* DBGO("From S") */
+ /* DBGO(Arg0) */
+ /* DBGO(" to S0\n") */
+}
+
+/*
+* \_WAK System Wake method
+*
+* Entry:
+* Arg0=The value of the sleeping state S1=1, S2=2
+*
+* Exit:
+* Return package of 2 DWords
+* Dword 1 - Status
+* 0x00000000 wake succeeded
+* 0x00000001 Wake was signaled but failed due to lack of power
+* 0x00000002 Wake was signaled but failed due to thermal condition
+* Dword 2 - Power Supply state
+* if non-zero the effective S-state the power supply entered
+*/
+Method(\_WAK, 1) {
+ /* DBGO("\\_WAK\n") */
+ /* DBGO("From S") */
+ /* DBGO(Arg0) */
+ /* DBGO(" to S0\n") */
+
+ Return(WKST)
+} /* End Method(\_WAK) */
diff --git a/src/mainboard/asus/a88xm-e/acpi/superio.asl b/src/mainboard/asus/a88xm-e/acpi/superio.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/superio.asl
diff --git a/src/mainboard/asus/a88xm-e/acpi/thermal.asl b/src/mainboard/asus/a88xm-e/acpi/thermal.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/thermal.asl
diff --git a/src/mainboard/asus/a88xm-e/acpi/usb_oc.asl b/src/mainboard/asus/a88xm-e/acpi/usb_oc.asl
new file mode 100644
index 0000000..f5d6980
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi/usb_oc.asl
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/* USB overcurrent mapping pins. */
+Name(UOM0, 0)
+Name(UOM1, 2)
+Name(UOM2, 0)
+Name(UOM3, 7)
+Name(UOM4, 2)
+Name(UOM5, 2)
+Name(UOM6, 6)
+Name(UOM7, 2)
+Name(UOM8, 6)
+Name(UOM9, 6)
diff --git a/src/mainboard/asus/a88xm-e/acpi_tables.c b/src/mainboard/asus/a88xm-e/acpi_tables.c
new file mode 100644
index 0000000..f94fde0
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/acpi_tables.c
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+
+#include <arch/acpi.h>
+#include <arch/acpigen.h>
+#include <arch/ioapic.h>
+#include <device/pci.h>
+#include <string.h>
+
+unsigned long acpi_fill_madt(unsigned long current)
+{
+ /* create all subtables for processors */
+ current = acpi_create_madt_lapics(current);
+
+ /* Write Hudson IOAPIC, only one */
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, CONFIG_MAX_CPUS,
+ IO_APIC_ADDR, 0);
+
+ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
+ current, 0, 0, 2, 0);
+ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
+ current, 0, 9, 9, 0xF);
+ /* 0: mean bus 0--->ISA */
+ /* 0: PIC 0 */
+ /* 2: APIC 2 */
+ /* 5 mean: 0101 --> Edge-triggered, Active high */
+
+ /* create all subtables for processors */
+ current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)current, 0xff, 5, 1);
+ /* 1: LINT1 connect to NMI */
+
+ return current;
+}
diff --git a/src/mainboard/asus/a88xm-e/board_info.txt b/src/mainboard/asus/a88xm-e/board_info.txt
new file mode 100644
index 0000000..bc090ff
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/board_info.txt
@@ -0,0 +1,7 @@
+Category: desktop
+Board URL: https://www.asus.com/Motherboards/A88XME/
+ROM package: DIP8
+ROM protocol: [http://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-fl... SPI]
+ROM socketed: y
+Flashrom support: y (without AmdSpiRomProtect modules)
+Release year: 2014
diff --git a/src/mainboard/asus/a88xm-e/buildOpts.c b/src/mainboard/asus/a88xm-e/buildOpts.c
new file mode 100644
index 0000000..c324532
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/buildOpts.c
@@ -0,0 +1,346 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/**
+ * @file
+ *
+ * AMD User options selection for a Brazos platform solution system
+ *
+ * This file is placed in the user's platform directory and contains the
+ * build option selections desired for that platform.
+ *
+ * For Information about this file, see @ref platforminstall.
+ *
+ */
+
+#include <stdlib.h>
+
+#include <vendorcode/amd/agesa/f15tn/AGESA.h>
+
+/* Include the files that instantiate the configuration definitions. */
+#include <vendorcode/amd/agesa/f15tn/Include/AdvancedApi.h>
+#include <vendorcode/amd/agesa/f15tn/Proc/CPU/cpuFamilyTranslation.h>
+#include <vendorcode/amd/agesa/f15tn/Proc/CPU/Feature/cpuFeatures.h>
+#include <vendorcode/amd/agesa/f15tn/Proc/CPU/heapManager.h>
+/* the next two headers depend on heapManager.h */
+#include <vendorcode/amd/agesa/f15tn/Proc/Common/CreateStruct.h>
+#include <vendorcode/amd/agesa/f15tn/Proc/CPU/cpuEarlyInit.h>
+/* These tables are optional and may be used to adjust memory timing settings */
+#include <vendorcode/amd/agesa/f15tn/Proc/Mem/mm.h>
+#include <vendorcode/amd/agesa/f15tn/Proc/Mem/mn.h>
+
+
+/* Select the CPU family. */
+#define INSTALL_FAMILY_10_SUPPORT FALSE
+#define INSTALL_FAMILY_12_SUPPORT FALSE
+#define INSTALL_FAMILY_14_SUPPORT FALSE
+#define INSTALL_FAMILY_15_MODEL_1x_SUPPORT TRUE
+
+/* Select the CPU socket type. */
+#define INSTALL_G34_SOCKET_SUPPORT FALSE
+#define INSTALL_C32_SOCKET_SUPPORT FALSE
+#define INSTALL_S1G3_SOCKET_SUPPORT FALSE
+#define INSTALL_S1G4_SOCKET_SUPPORT FALSE
+#define INSTALL_ASB2_SOCKET_SUPPORT FALSE
+#define INSTALL_FS1_SOCKET_SUPPORT FALSE
+#define INSTALL_FM1_SOCKET_SUPPORT FALSE
+#define INSTALL_FP2_SOCKET_SUPPORT FALSE
+#define INSTALL_FT1_SOCKET_SUPPORT FALSE
+#define INSTALL_AM3_SOCKET_SUPPORT FALSE
+
+#define INSTALL_FM2_SOCKET_SUPPORT TRUE
+
+//#define BLDOPT_REMOVE_UDIMMS_SUPPORT TRUE
+#define BLDOPT_REMOVE_SODIMMS_SUPPORT TRUE
+#define BLDOPT_REMOVE_RDIMMS_SUPPORT TRUE
+#define BLDOPT_REMOVE_LRDIMMS_SUPPORT TRUE
+#define BLDOPT_REMOVE_ECC_SUPPORT TRUE
+//#define BLDOPT_REMOVE_BANK_INTERLEAVE TRUE
+//#define BLDOPT_REMOVE_DCT_INTERLEAVE TRUE
+#define BLDOPT_REMOVE_NODE_INTERLEAVE TRUE
+#define BLDOPT_REMOVE_PARALLEL_TRAINING TRUE
+#define BLDOPT_REMOVE_ONLINE_SPARE_SUPPORT TRUE
+//#define BLDOPT_REMOVE_MEM_RESTORE_SUPPORT TRUE
+#define BLDOPT_REMOVE_MULTISOCKET_SUPPORT TRUE
+//#define BLDOPT_REMOVE_ACPI_PSTATES FALSE
+#define BLDOPT_REMOVE_SRAT FALSE //TRUE
+#define BLDOPT_REMOVE_SLIT FALSE //TRUE
+#define BLDOPT_REMOVE_WHEA FALSE //TRUE
+#define BLDOPT_REMOVE_CRAT TRUE
+#define BLDOPT_REMOVE_DMI TRUE
+//#define BLDOPT_REMOVE_EARLY_SAMPLES FALSE
+//#define BLDCFG_REMOVE_ACPI_PSTATES_PPC TRUE
+//#define BLDCFG_REMOVE_ACPI_PSTATES_PCT TRUE
+//#define BLDCFG_REMOVE_ACPI_PSTATES_PSD TRUE
+//#define BLDCFG_REMOVE_ACPI_PSTATES_PSS TRUE
+//#define BLDCFG_REMOVE_ACPI_PSTATES_XPSS TRUE
+
+//This element selects whether P-States should be forced to be independent,
+// as reported by the ACPI _PSD object. For single-link processors,
+// setting TRUE for OS to support this feature.
+
+//#define BLDCFG_FORCE_INDEPENDENT_PSD_OBJECT TRUE
+
+#define BLDCFG_PCI_MMIO_BASE CONFIG_MMCONF_BASE_ADDRESS
+#define BLDCFG_PCI_MMIO_SIZE CONFIG_MMCONF_BUS_NUMBER
+/* Build configuration values here.
+ */
+#define BLDCFG_VRM_CURRENT_LIMIT 90000
+#define BLDCFG_VRM_LOW_POWER_THRESHOLD 0
+#define BLDCFG_VRM_MAXIMUM_CURRENT_LIMIT 0
+#define BLDCFG_PLAT_NUM_IO_APICS 3
+#define BLDCFG_CORE_LEVELING_MODE CORE_LEVEL_LOWEST
+#define BLDCFG_MEM_INIT_PSTATE 0
+
+#define BLDCFG_AMD_PLATFORM_TYPE AMD_PLATFORM_MOBILE
+
+#define BLDCFG_MEMORY_BUS_FREQUENCY_LIMIT DDR1866_FREQUENCY
+#define BLDCFG_MEMORY_MODE_UNGANGED TRUE
+#define BLDCFG_MEMORY_QUAD_RANK_CAPABLE TRUE
+#define BLDCFG_MEMORY_QUADRANK_TYPE QUADRANK_UNBUFFERED
+#define BLDCFG_MEMORY_RDIMM_CAPABLE FALSE
+#define BLDCFG_MEMORY_UDIMM_CAPABLE TRUE
+#define BLDCFG_MEMORY_SODIMM_CAPABLE FALSE
+#define BLDCFG_MEMORY_ENABLE_BANK_INTERLEAVING TRUE
+#define BLDCFG_MEMORY_ENABLE_NODE_INTERLEAVING FALSE
+#define BLDCFG_MEMORY_CHANNEL_INTERLEAVING TRUE
+#define BLDCFG_MEMORY_POWER_DOWN TRUE
+#define BLDCFG_POWER_DOWN_MODE POWER_DOWN_BY_CHIP_SELECT
+#define BLDCFG_ONLINE_SPARE FALSE
+#define BLDCFG_BANK_SWIZZLE TRUE
+#define BLDCFG_TIMING_MODE_SELECT TIMING_MODE_AUTO
+#define BLDCFG_MEMORY_CLOCK_SELECT DDR1600_FREQUENCY
+#define BLDCFG_DQS_TRAINING_CONTROL TRUE
+#define BLDCFG_IGNORE_SPD_CHECKSUM FALSE
+#define BLDCFG_USE_BURST_MODE FALSE
+#define BLDCFG_MEMORY_ALL_CLOCKS_ON FALSE
+#define BLDCFG_ENABLE_ECC_FEATURE FALSE
+#define BLDCFG_ECC_REDIRECTION FALSE
+#define BLDCFG_SCRUB_DRAM_RATE 0
+#define BLDCFG_SCRUB_L2_RATE 0
+#define BLDCFG_SCRUB_L3_RATE 0
+#define BLDCFG_SCRUB_IC_RATE 0
+#define BLDCFG_SCRUB_DC_RATE 0
+#define BLDCFG_ECC_SYMBOL_SIZE 4
+#define BLDCFG_HEAP_DRAM_ADDRESS 0xB0000
+#define BLDCFG_ECC_SYNC_FLOOD FALSE
+#define BLDCFG_VRM_HIGH_SPEED_ENABLE TRUE
+#define BLDCFG_1GB_ALIGN FALSE
+#define BLDCFG_VRM_HIGH_SPEED_ENABLE TRUE
+#define BLDCFG_PCIE_REFCLK_SPREAD_SPECTRUM 36 // PCIE Spread Spectrum default value 0.36%
+#define BLDCFG_PLATFORM_CSTATE_IO_BASE_ADDRESS 0x1770
+
+#define BLDOPT_REMOVE_ALIB FALSE
+#define BLDCFG_PLATFORM_CPB_MODE CpbModeAuto
+#define BLDCFG_PROCESSOR_SCOPE_NAME0 'P'
+#define BLDCFG_PROCESSOR_SCOPE_NAME1 '0'
+#define BLDCFG_PLATFORM_CSTATE_MODE CStateModeC6
+
+#define BLDCFG_CFG_LCD_BACK_LIGHT_CONTROL 200
+#define BLDCFG_CFG_ABM_SUPPORT 0
+
+//#define BLDCFG_PLATFORM_CSTATE_OPDATA 0x1770
+
+// Specify the default values for the VRM controlling the VDDNB plane.
+// If not specified, the values used for the core VRM will be applied
+//#define BLDCFG_VRM_NB_CURRENT_LIMIT 0 // Not currently used on Trinity
+//#define BLDCFG_VRM_NB_LOW_POWER_THRESHOLD 1 // Zero - disable NBPSI_L, Non-zero - enable NBPSI_L
+//#define BLDCFG_VRM_NB_SLEW_RATE 5000 // Used in calculating the VSRampSlamTime
+//#define BLDCFG_VRM_NB_ADDITIONAL_DELAY 0 // Not currently used on Trinity
+//#define BLDCFG_VRM_NB_HIGH_SPEED_ENABLE 0 // Not currently used on Trinity
+//#define BLDCFG_VRM_NB_INRUSH_CURRENT_LIMIT 0 // Not currently used on Trinity
+
+#define BLDCFG_VRM_NB_CURRENT_LIMIT 60000
+
+#define BLDCFG_LVDS_POWER_ON_SEQ_VARY_BL_TO_BLON 3
+#define BLDCFG_LVDS_POWER_ON_SEQ_BLON_TO_VARY_BL 3
+
+#if IS_ENABLED(CONFIG_GFXUMA)
+#define BLDCFG_UMA_ALIGNMENT UMA_4MB_ALIGNED
+#define BLDCFG_UMA_ALLOCATION_MODE UMA_SPECIFIED
+//#define BLDCFG_UMA_ALLOCATION_SIZE 0x1000//0x1800//0x1000 /* (1000 << 16) = 256M*/
+#define BLDCFG_UMA_ALLOCATION_SIZE 0x2000//512M
+#define BLDCFG_UMA_ABOVE4G_SUPPORT FALSE
+#endif
+
+#define BLDCFG_IOMMU_SUPPORT TRUE
+
+#define BLDCFG_CFG_GNB_HD_AUDIO TRUE
+//#define BLDCFG_IGPU_SUBSYSTEM_ID OEM_IGPU_SSID
+//#define BLDCFG_IGPU_HD_AUDIO_SUBSYSTEM_ID OEM_IGPU_HD_AUDIO_SSID
+//#define BLFCFG_APU_PCIE_PORTS_SUBSYSTEM_ID OEM_APU_PCIE_PORTS_SSID
+
+/* Process the options...
+ * This file include MUST occur AFTER the user option selection settings
+ */
+/*
+ * Customized OEM build configurations for FCH component
+ */
+// #define BLDCFG_SMBUS0_BASE_ADDRESS 0xB00
+// #define BLDCFG_SMBUS1_BASE_ADDRESS 0xB20
+// #define BLDCFG_SIO_PME_BASE_ADDRESS 0xE00
+// #define BLDCFG_ACPI_PM1_EVT_BLOCK_ADDRESS 0x400
+// #define BLDCFG_ACPI_PM1_CNT_BLOCK_ADDRESS 0x404
+// #define BLDCFG_ACPI_PM_TMR_BLOCK_ADDRESS 0x408
+// #define BLDCFG_ACPI_CPU_CNT_BLOCK_ADDRESS 0x410
+// #define BLDCFG_ACPI_GPE0_BLOCK_ADDRESS 0x420
+// #define BLDCFG_SPI_BASE_ADDRESS 0xFEC10000
+// #define BLDCFG_WATCHDOG_TIMER_BASE 0xFEC00000
+// #define BLDCFG_HPET_BASE_ADDRESS 0xFED00000
+// #define BLDCFG_SMI_CMD_PORT_ADDRESS 0xB0
+// #define BLDCFG_ACPI_PMA_BLK_ADDRESS 0xFE00
+// #define BLDCFG_ROM_BASE_ADDRESS 0xFED61000
+// #define BLDCFG_AZALIA_SSID 0x780D1022
+// #define BLDCFG_SMBUS_SSID 0x780B1022
+// #define BLDCFG_IDE_SSID 0x780C1022
+// #define BLDCFG_SATA_AHCI_SSID 0x78011022
+// #define BLDCFG_SATA_IDE_SSID 0x78001022
+// #define BLDCFG_SATA_RAID5_SSID 0x78031022
+// #define BLDCFG_SATA_RAID_SSID 0x78021022
+// #define BLDCFG_EHCI_SSID 0x78081022
+// #define BLDCFG_OHCI_SSID 0x78071022
+// #define BLDCFG_LPC_SSID 0x780E1022
+// #define BLDCFG_SD_SSID 0x78061022
+// #define BLDCFG_XHCI_SSID 0x78121022
+// #define BLDCFG_FCH_PORT80_BEHIND_PCIB FALSE
+// #define BLDCFG_FCH_ENABLE_ACPI_SLEEP_TRAP TRUE
+// #define BLDCFG_FCH_GPP_LINK_CONFIG PortA4
+// #define BLDCFG_FCH_GPP_PORT0_PRESENT FALSE
+// #define BLDCFG_FCH_GPP_PORT1_PRESENT FALSE
+// #define BLDCFG_FCH_GPP_PORT2_PRESENT FALSE
+// #define BLDCFG_FCH_GPP_PORT3_PRESENT FALSE
+// #define BLDCFG_FCH_GPP_PORT0_HOTPLUG FALSE
+// #define BLDCFG_FCH_GPP_PORT1_HOTPLUG FALSE
+// #define BLDCFG_FCH_GPP_PORT2_HOTPLUG FALSE
+// #define BLDCFG_FCH_GPP_PORT3_HOTPLUG FALSE
+
+CONST AP_MTRR_SETTINGS ROMDATA TrinityApMtrrSettingsList[] =
+{
+ { AMD_AP_MTRR_FIX64k_00000, 0x1E1E1E1E1E1E1E1E },
+ { AMD_AP_MTRR_FIX16k_80000, 0x1E1E1E1E1E1E1E1E },
+ { AMD_AP_MTRR_FIX16k_A0000, 0x0000000000000000 },
+ { AMD_AP_MTRR_FIX4k_C0000, 0x0000000000000000 },
+ { AMD_AP_MTRR_FIX4k_C8000, 0x0000000000000000 },
+ { AMD_AP_MTRR_FIX4k_D0000, 0x0000000000000000 },
+ { AMD_AP_MTRR_FIX4k_D8000, 0x0000000000000000 },
+ { AMD_AP_MTRR_FIX4k_E0000, 0x1818181818181818 },
+ { AMD_AP_MTRR_FIX4k_E8000, 0x1818181818181818 },
+ { AMD_AP_MTRR_FIX4k_F0000, 0x1818181818181818 },
+ { AMD_AP_MTRR_FIX4k_F8000, 0x1818181818181818 },
+ { CPU_LIST_TERMINAL }
+};
+
+#define BLDCFG_AP_MTRR_SETTINGS_LIST &TrinityApMtrrSettingsList
+
+ // This is the delivery package title, "BrazosPI"
+ // This string MUST be exactly 8 characters long
+#define AGESA_PACKAGE_STRING {'c', 'b', '_', 'A', 'g', 'e', 's', 'a'}
+
+ // This is the release version number of the AGESA component
+ // This string MUST be exactly 12 characters long
+#define AGESA_VERSION_STRING {'V', '0', '.', '0', '.', '0', '.', '1', ' ', ' ', ' ', ' '}
+
+/* MEMORY_BUS_SPEED */
+#define DDR400_FREQUENCY 200 ///< DDR 400
+#define DDR533_FREQUENCY 266 ///< DDR 533
+#define DDR667_FREQUENCY 333 ///< DDR 667
+#define DDR800_FREQUENCY 400 ///< DDR 800
+#define DDR1066_FREQUENCY 533 ///< DDR 1066
+#define DDR1333_FREQUENCY 667 ///< DDR 1333
+#define DDR1600_FREQUENCY 800 ///< DDR 1600
+#define DDR1866_FREQUENCY 933 ///< DDR 1866
+#define DDR2100_FREQUENCY 1050 ///< DDR 2100
+#define DDR2133_FREQUENCY 1066 ///< DDR 2133
+#define DDR2400_FREQUENCY 1200 ///< DDR 2400
+#define UNSUPPORTED_DDR_FREQUENCY 1201 ///< Highest limit of DDR frequency
+
+/* QUANDRANK_TYPE*/
+#define QUADRANK_REGISTERED 0 ///< Quadrank registered DIMM
+#define QUADRANK_UNBUFFERED 1 ///< Quadrank unbuffered DIMM
+
+/* USER_MEMORY_TIMING_MODE */
+#define TIMING_MODE_AUTO 0 ///< Use best rate possible
+#define TIMING_MODE_LIMITED 1 ///< Set user top limit
+#define TIMING_MODE_SPECIFIC 2 ///< Set user specified speed
+
+/* POWER_DOWN_MODE */
+#define POWER_DOWN_BY_CHANNEL 0 ///< Channel power down mode
+#define POWER_DOWN_BY_CHIP_SELECT 1 ///< Chip select power down mode
+
+/*
+ * Agesa optional capabilities selection.
+ * Uncomment and mark FALSE those features you wish to include in the build.
+ * Comment out or mark TRUE those features you want to REMOVE from the build.
+ */
+
+#define DFLT_SMBUS0_BASE_ADDRESS 0xB00
+#define DFLT_SMBUS1_BASE_ADDRESS 0xB20
+/* The AGESA likes to enable 512 bytes region on this base for LPC bus */
+#define DFLT_SIO_PME_BASE_ADDRESS 0xE00
+#define DFLT_ACPI_PM1_EVT_BLOCK_ADDRESS 0x800
+#define DFLT_ACPI_PM1_CNT_BLOCK_ADDRESS 0x804
+#define DFLT_ACPI_PM_TMR_BLOCK_ADDRESS 0x808
+#define DFLT_ACPI_CPU_CNT_BLOCK_ADDRESS 0x810
+#define DFLT_ACPI_GPE0_BLOCK_ADDRESS 0x820
+#define DFLT_SPI_BASE_ADDRESS 0xFEC10000
+#define DFLT_WATCHDOG_TIMER_BASE_ADDRESS 0xFEC000F0
+#define DFLT_HPET_BASE_ADDRESS 0xFED00000
+#define DFLT_SMI_CMD_PORT 0xB0
+#define DFLT_ACPI_PMA_CNT_BLK_ADDRESS 0xFE00
+#define DFLT_GEC_BASE_ADDRESS 0xFED61000
+#define DFLT_AZALIA_SSID 0x780D1022
+#define DFLT_SMBUS_SSID 0x780B1022
+#define DFLT_IDE_SSID 0x780C1022
+#define DFLT_SATA_AHCI_SSID 0x78011022
+#define DFLT_SATA_IDE_SSID 0x78001022
+#define DFLT_SATA_RAID5_SSID 0x78031022
+#define DFLT_SATA_RAID_SSID 0x78021022
+#define DFLT_EHCI_SSID 0x78081022
+#define DFLT_OHCI_SSID 0x78071022
+#define DFLT_LPC_SSID 0x780E1022
+#define DFLT_SD_SSID 0x78061022
+#define DFLT_XHCI_SSID 0x78121022
+#define DFLT_FCH_PORT80_BEHIND_PCIB FALSE
+#define DFLT_FCH_ENABLE_ACPI_SLEEP_TRAP TRUE
+#define DFLT_FCH_GPP_LINK_CONFIG PortA1B1C1D1
+#define DFLT_FCH_GPP_PORT0_PRESENT TRUE
+#define DFLT_FCH_GPP_PORT1_PRESENT TRUE
+#define DFLT_FCH_GPP_PORT2_PRESENT FALSE
+#define DFLT_FCH_GPP_PORT3_PRESENT FALSE
+#define DFLT_FCH_GPP_PORT0_HOTPLUG FALSE
+#define DFLT_FCH_GPP_PORT1_HOTPLUG FALSE
+#define DFLT_FCH_GPP_PORT2_HOTPLUG FALSE
+#define DFLT_FCH_GPP_PORT3_HOTPLUG FALSE
+//#define BLDCFG_IR_PIN_CONTROL 0x33
+//#define FCH_NO_XHCI_SUPPORT FALSE
+GPIO_CONTROL a88xm_e_gpio[] = {
+// {183, Function1, PullUpB},
+ {-1}
+};
+#define BLDCFG_FCH_GPIO_CONTROL_LIST (&a88xm_e_gpio[0])
+
+// The following definitions specify the default values for various parameters in which there are
+// no clearly defined defaults to be used in the common file. The values below are based on product
+// and BKDG content, please consult the AGESA Memory team for consultation.
+#define DFLT_SCRUB_DRAM_RATE (0)
+#define DFLT_SCRUB_L2_RATE (0)
+#define DFLT_SCRUB_L3_RATE (0)
+#define DFLT_SCRUB_IC_RATE (0)
+#define DFLT_SCRUB_DC_RATE (0)
+#define DFLT_MEMORY_QUADRANK_TYPE QUADRANK_UNBUFFERED
+#define DFLT_VRM_SLEW_RATE (5000)
+
+/* Moving this include up will break AGESA. */
+#include <PlatformInstall.h>
diff --git a/src/mainboard/asus/a88xm-e/cmos.layout b/src/mainboard/asus/a88xm-e/cmos.layout
new file mode 100644
index 0000000..e1dbd9a
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/cmos.layout
@@ -0,0 +1,66 @@
+#*****************************************************************************
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2012 Advanced Micro Devices, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#*****************************************************************************
+
+entries
+
+0 384 r 0 reserved_memory
+384 1 e 4 boot_option
+388 4 h 0 reboot_counter
+#392 3 r 0 unused
+395 1 e 1 hw_scrubber
+396 1 e 1 interleave_chip_selects
+397 2 e 8 max_mem_clock
+399 1 e 2 multi_core
+400 1 e 1 power_on_after_fail
+412 4 e 6 debug_level
+440 4 e 9 slow_cpu
+444 1 e 1 nmi
+445 1 e 1 iommu
+456 1 e 1 ECC_memory
+728 256 h 0 user_data
+984 16 h 0 check_sum
+# Reserve the extended AMD configuration registers
+1000 24 r 0 amd_reserved
+
+enumerations
+
+#ID value text
+1 0 Disable
+1 1 Enable
+2 0 Enable
+2 1 Disable
+4 0 Fallback
+4 1 Normal
+6 5 Notice
+6 6 Info
+6 7 Debug
+6 8 Spew
+8 0 400Mhz
+8 1 333Mhz
+8 2 266Mhz
+8 3 200Mhz
+9 0 off
+9 1 87.5%
+9 2 75.0%
+9 3 62.5%
+9 4 50.0%
+9 5 37.5%
+9 6 25.0%
+9 7 12.5%
+
+checksums
+
+checksum 392 983 984
diff --git a/src/mainboard/asus/a88xm-e/devicetree_a88xm-e.cb b/src/mainboard/asus/a88xm-e/devicetree_a88xm-e.cb
new file mode 100644
index 0000000..e2b0eea
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/devicetree_a88xm-e.cb
@@ -0,0 +1,143 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2012 Advanced Micro Devices, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+chip northbridge/amd/agesa/family15tn/root_complex
+
+ device cpu_cluster 0 on
+ chip cpu/amd/agesa/family15tn
+ device lapic 10 on end
+ end
+ end
+
+ device domain 0 on
+ subsystemid 0x1022 0x1410 inherit
+ chip northbridge/amd/agesa/family15tn # CPU side of HT root complex
+
+ chip northbridge/amd/agesa/family15tn # PCI side of HT root complex
+ device pci 0.0 on end # Root Complex
+ device pci 0.2 on end # IOMMU
+ device pci 1.0 on end # Internal Graphics
+ device pci 1.1 on end # Internal Audio (iGPU)
+ device pci 2.0 on end # PCIE x4/x16 yellow (?)
+ device pci 3.0 on end # unused?
+ device pci 4.0 on end # PCIE x4/x16 yellow (?)
+ device pci 5.0 off end # unused
+ device pci 6.0 off end # unused?
+ device pci 7.0 off end # LAN
+ device pci 8.0 off end # NB/SB Link P2P bridge
+ end #chip northbridge/amd/agesa/family15tn # PCI side of HT root complex
+
+ chip southbridge/amd/agesa/hudson # it is under NB/SB Link, but on the same pci bus
+ device pci 10.0 on end # XHCI HC0
+ device pci 10.1 on end # XHCI HC1
+ device pci 11.0 on end # SATA
+ device pci 12.0 on end # USB
+ device pci 12.2 on end # USB
+ device pci 13.0 on end # USB
+ device pci 13.2 on end # USB
+ device pci 14.0 on # SMBUS
+ chip drivers/generic/generic #dimm 0
+ device i2c 50 on end # 7-bit SPD address
+ end
+ chip drivers/generic/generic #dimm 1
+ device i2c 51 on end # 7-bit SPD address
+ end
+ end # SM
+ device pci 14.1 off end # IDE 0x439c
+ device pci 14.2 on end # HDA 0x4383
+ device pci 14.3 on # LPC 0x439d
+ chip superio/ite/it8728f
+ register "TMPIN1.mode" = "THERMAL_RESISTOR"
+ register "TMPIN2.mode" = "THERMAL_RESISTOR"
+ register "TMPIN3.mode" = "THERMAL_RESISTOR"
+
+ register "FAN1.mode" = "FAN_SMART_AUTOMATIC"
+ register "FAN1.smart.tmpin" = "1"
+ register "FAN1.smart.tmp_off" = "0x80" # never
+ register "FAN1.smart.tmp_start" = "20"
+ register "FAN1.smart.tmp_full" = "70"
+ register "FAN1.smart.tmp_delta" = "0"
+ register "FAN1.smart.smoothing" = "1"
+ register "FAN1.smart.pwm_start" = "20"
+ register "FAN1.smart.slope" = "32"
+
+ # Enable tacho reading for chassis fan.
+ register "FAN2.mode" = "FAN_MODE_OFF"
+
+ device pnp 2e.0 off # Floppy
+ io 0x60 = 0x3f0
+ irq 0x70 = 6
+ drq 0x74 = 2
+ end
+ device pnp 2e.1 on # Com1
+ io 0x60 = 0x3f8
+ irq 0x70 = 4
+ end
+ device pnp 2e.2 off # Com2
+ io 0x60 = 0x2f8
+ irq 0x70 = 3
+ end
+ device pnp 2e.3 off # Parallel Port
+ io 0x60 = 0x378
+ irq 0x70 = 7
+ end
+ device pnp 2e.4 on # Env Controller
+ io 0x60 = 0x290
+ io 0x62 = 0x220
+ irq 0x70 = 0
+ end
+ device pnp 2e.5 on # Keyboard
+ io 0x60 = 0x60
+ io 0x62 = 0x64
+ irq 0x70 = 1
+ end
+ device pnp 2e.6 off # Mouse
+ irq 0x70 = 12
+ end
+ device pnp 2e.7 on # GPIO
+ io 0x60 = 0x228 #SMI
+ io 0x62 = 0x300 #Simple I/O
+ io 0x64 = 0x238 #Phony resource IT8603E does not have it
+ irq 0x70 = 0
+ end
+ device pnp 2e.a off end # CIR
+ end #superio/ite/it8728f
+ end #
+ device pci 14.3 off end # LPC
+ device pci 14.4 on end # PCI 0x4384
+ device pci 14.5 off end # USB 2
+ device pci 14.6 off end # Gec
+ device pci 14.7 off end # SD
+ device pci 15.0 on end # PCIe 0 - onboard PCIe 1x
+ device pci 15.1 off end # unused
+ device pci 15.2 on end # PCI bridge
+ device pci 15.3 off end # unused
+ end #chip southbridge/amd/agesa/hudson
+
+ device pci 18.0 on end
+ device pci 18.1 on end
+ device pci 18.2 on end
+ device pci 18.3 on end
+ device pci 18.4 on end
+ device pci 18.5 on end
+
+ register "spdAddrLookup" = "
+ {
+ { {0xA0, 0x00}, {0xA2, 0x00}, }, // socket 0 - Channel 0 & 1 - 8-bit SPD addresses
+ { {0x00, 0x00}, {0x00, 0x00}, }, // socket 1 - Channel 0 & 1 - 8-bit SPD addresses
+ }"
+
+ end #chip northbridge/amd/agesa/family15tn # CPU side of HT root complex
+ end #domain
+end #chip northbridge/amd/agesa/family15tn/root_complex
diff --git a/src/mainboard/asus/a88xm-e/dsdt.asl b/src/mainboard/asus/a88xm-e/dsdt.asl
new file mode 100644
index 0000000..45a2606
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/dsdt.asl
@@ -0,0 +1,110 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/* DefinitionBlock Statement */
+#include <arch/acpi.h>
+DefinitionBlock (
+ "DSDT.AML", /* Output filename */
+ "DSDT", /* Signature */
+ 0x02, /* DSDT Revision, needs to be 2 for 64bit */
+ OEM_ID,
+ ACPI_TABLE_CREATOR,
+ 0x00010001 /* OEM Revision */
+ )
+{ /* Start of ASL file */
+ /* #include <arch/x86/acpi/debug.asl> */ /* Include global debug methods if needed */
+
+ /* Globals for the platform */
+ #include "acpi/mainboard.asl"
+
+ /* Describe the USB Overcurrent pins */
+ #include "acpi/usb_oc.asl"
+
+ /* PCI IRQ mapping for the Southbridge */
+ #include <southbridge/amd/agesa/hudson/acpi/pcie.asl>
+
+ /* Describe the processor tree (\_PR) */
+ #include <cpu/amd/agesa/family15tn/acpi/cpu.asl>
+
+ /* Describe the supported Sleep States for this Southbridge */
+ #include <southbridge/amd/common/acpi/sleepstates.asl>
+
+ /* Describe the Sleep Methods (WAK, PTS, GTS, etc.) for this platform */
+ #include "acpi/sleep.asl"
+
+ Scope(\_SB) {
+ /* global utility methods expected within the \_SB scope */
+ #include <arch/x86/acpi/globutil.asl>
+
+ /* Describe IRQ Routing mapping for this platform (within the \_SB scope) */
+ #include "acpi/routing.asl"
+
+ Device(PWRB) {
+ Name(_HID, EISAID("PNP0C0C"))
+ Name(_UID, 0xAA)
+ Name(_PRW, Package () {3, 0x04})
+ Name(_STA, 0x0B)
+ }
+
+ Device(PCI0) {
+ /* Describe the AMD Northbridge */
+ #include <northbridge/amd/agesa/family15tn/acpi/northbridge.asl>
+
+ /* Describe the AMD Fusion Controller Hub Southbridge */
+ #include <southbridge/amd/agesa/hudson/acpi/fch.asl>
+
+ /**
+ * TODO: The devices listed here (SBR0 and SBR1) do not appear to
+ * be referenced anywhere and could possibly be removed.
+ */
+ Device(SBR0) { /* PCIe 1x SB */
+ Name(_ADR, 0x00150000)
+ Name(_PRW, Package() {0x18, 4})
+ Method(_PRT,0) {
+ If(PMOD){ Return(ABR0) } /* APIC mode */
+ Return (PBR0) /* PIC mode */
+ }
+ }
+
+ Device(SBR1) { /* Onboard network */
+ Name(_ADR, 0x00150001)
+ Name(_PRW, Package() {0x18, 4})
+ Method(_PRT, 0) {
+ If(PMOD){ Return(ABR1) } /* APIC mode */
+ Return (PBR1) /* PIC mode */
+ }
+ }
+ }
+
+ /* Describe PCI INT[A-H] for the Southbridge */
+ #include <southbridge/amd/agesa/hudson/acpi/pci_int.asl>
+
+ } /* End Scope(_SB) */
+
+ /* Describe SMBUS for the Southbridge */
+ #include <southbridge/amd/agesa/hudson/acpi/smbus.asl>
+
+ /* Define the General Purpose Events for the platform */
+ #include "acpi/gpe.asl"
+
+ /* Define the Thermal zones and methods for the platform */
+ #include "acpi/thermal.asl"
+
+ /* Define the System Indicators for the platform */
+ #include "acpi/si.asl"
+
+}
+/* End of ASL file */
diff --git a/src/mainboard/asus/a88xm-e/irq_tables.c b/src/mainboard/asus/a88xm-e/irq_tables.c
new file mode 100644
index 0000000..88d2160
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/irq_tables.c
@@ -0,0 +1,101 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/pirq_routing.h>
+#include <console/console.h>
+#include <device/pci_def.h>
+#include <stdint.h>
+#include <string.h>
+
+static void write_pirq_info(struct irq_info *pirq_info, u8 bus, u8 devfn,
+ u8 link0, u16 bitmap0, u8 link1, u16 bitmap1,
+ u8 link2, u16 bitmap2, u8 link3, u16 bitmap3,
+ u8 slot, u8 rfu)
+{
+ pirq_info->bus = bus;
+ pirq_info->devfn = devfn;
+ pirq_info->irq[0].link = link0;
+ pirq_info->irq[0].bitmap = bitmap0;
+ pirq_info->irq[1].link = link1;
+ pirq_info->irq[1].bitmap = bitmap1;
+ pirq_info->irq[2].link = link2;
+ pirq_info->irq[2].bitmap = bitmap2;
+ pirq_info->irq[3].link = link3;
+ pirq_info->irq[3].bitmap = bitmap3;
+ pirq_info->slot = slot;
+ pirq_info->rfu = rfu;
+}
+
+unsigned long write_pirq_routing_table(unsigned long addr)
+{
+ struct irq_routing_table *pirq;
+ struct irq_info *pirq_info;
+ u32 slot_num;
+ u8 *v;
+
+ u8 sum = 0;
+ int i;
+
+ /* Align the table to be 16 byte aligned. */
+ addr += 15;
+ addr &= ~15;
+
+ /* This table must be between 0xf0000 & 0x100000 */
+ printk(BIOS_INFO, "Writing IRQ routing tables to 0x%lx...", addr);
+
+ pirq = (void *)(addr);
+ v = (u8 *) (addr);
+
+ pirq->signature = PIRQ_SIGNATURE;
+ pirq->version = PIRQ_VERSION;
+
+ pirq->rtr_bus = 0;
+ pirq->rtr_devfn = PCI_DEVFN(0x14, 4);
+
+ pirq->exclusive_irqs = 0;
+
+ pirq->rtr_vendor = 0x1002;
+ pirq->rtr_device = 0x4384;
+
+ pirq->miniport_data = 0;
+
+ memset(pirq->rfu, 0, sizeof(pirq->rfu));
+
+ pirq_info = (void *)(&pirq->checksum + 1);
+ slot_num = 0;
+
+ /* pci bridge */
+ write_pirq_info(pirq_info, 0, PCI_DEVFN(0x14, 4),
+ 0x1, 0xdef8, 0x2, 0xdef8, 0x3, 0xdef8, 0x4, 0xdef8, 0,
+ 0);
+ pirq_info++;
+
+ slot_num++;
+
+ pirq->size = 32 + 16 * slot_num;
+
+ for (i = 0; i < pirq->size; i++)
+ sum += v[i];
+
+ sum = pirq->checksum - sum;
+
+ if (sum != pirq->checksum) {
+ pirq->checksum = sum;
+ }
+
+ printk(BIOS_INFO, "write_pirq_routing_table done.\n");
+
+ return (unsigned long)pirq_info;
+}
diff --git a/src/mainboard/asus/a88xm-e/mainboard.c b/src/mainboard/asus/a88xm-e/mainboard.c
new file mode 100644
index 0000000..2a0e618
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/mainboard.c
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <console/console.h>
+#include <cpu/x86/msr.h>
+#include <cpu/amd/msr.h>
+#include <device/device.h>
+
+/*************************************************
+ * enable the dedicated function in thatcher board.
+ *************************************************/
+static void mainboard_enable(struct device *dev)
+{
+ msr_t msr;
+
+ printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
+
+ msr = rdmsr(LS_CFG_MSR);
+ msr.lo &= ~(1 << 28);
+ wrmsr(LS_CFG_MSR, msr);
+
+ msr = rdmsr(DC_CFG_MSR);
+ msr.lo &= ~(1 << 4);
+ msr.lo &= ~(1 << 13);
+ wrmsr(DC_CFG_MSR, msr);
+
+ msr = rdmsr(BU_CFG_MSR);
+ msr.lo &= ~(1 << 23);
+ wrmsr(BU_CFG_MSR, msr);
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/asus/a88xm-e/mptable.c b/src/mainboard/asus/a88xm-e/mptable.c
new file mode 100644
index 0000000..d97663d
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/mptable.c
@@ -0,0 +1,181 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/io.h>
+#include <arch/ioapic.h>
+#include <arch/smp/mpspec.h>
+#include <cpu/x86/lapic.h>
+#include <device/pci.h>
+#include <stdint.h>
+#include <string.h>
+#include <southbridge/amd/agesa/hudson/hudson.h>
+
+u8 picr_data[] = {
+ 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x0A,0xF1,0x00,0x00,0x1F,0x1F,0x1F,0x1F,
+ 0x09,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x1F,0x1F,0x1F,0x1F
+};
+u8 intr_data[0x54] = {
+ 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1F,
+ 0x09,0x1F,0x1F,0x10,0x1F,0x10,0x1F,0x10,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x05,0x1F,0x1F,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x12,0x11,0x12,0x11,0x12,0x11,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x11,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x11,0x12,0x13
+};
+
+static void smp_add_mpc_entry(struct mp_config_table *mc, unsigned length)
+{
+ mc->mpc_length += length;
+ mc->mpc_entry_count++;
+}
+
+static void my_smp_write_bus(struct mp_config_table *mc,
+ unsigned char id, const char *bustype)
+{
+ struct mpc_config_bus *mpc;
+ mpc = smp_next_mpc_entry(mc);
+ memset(mpc, '\0', sizeof(*mpc));
+ mpc->mpc_type = MP_BUS;
+ mpc->mpc_busid = id;
+ memcpy(mpc->mpc_bustype, bustype, sizeof(mpc->mpc_bustype));
+ smp_add_mpc_entry(mc, sizeof(*mpc));
+}
+
+static void *smp_write_config_table(void *v)
+{
+ struct mp_config_table *mc;
+ int bus_isa;
+ u8 byte;
+
+ /*
+ * By the time this function gets called, the IOAPIC registers
+ * have been written so they can be read to get the correct
+ * APIC ID and Version
+ */
+ u8 ioapic_id = (io_apic_read(VIO_APIC_VADDR, 0x00) >> 24);
+ u8 ioapic_ver = (io_apic_read(VIO_APIC_VADDR, 0x01) & 0xFF);
+
+ mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN);
+
+ mptable_init(mc, LOCAL_APIC_ADDR);
+ memcpy(mc->mpc_oem, "AMD ", 8);
+
+ smp_write_processors(mc);
+
+ //mptable_write_buses(mc, NULL, &bus_isa);
+ my_smp_write_bus(mc, 0, "PCI ");
+ my_smp_write_bus(mc, 1, "PCI ");
+ bus_isa = 0x02;
+ my_smp_write_bus(mc, bus_isa, "ISA ");
+
+ /* I/O APICs: APIC ID Version State Address */
+ smp_write_ioapic(mc, ioapic_id, ioapic_ver, VIO_APIC_VADDR);
+
+ /* PIC IRQ routine */
+ for (byte = 0x0; byte < sizeof(picr_data); byte ++) {
+ outb(byte, 0xC00);
+ outb(picr_data[byte], 0xC01);
+ }
+
+ /* APIC IRQ routine */
+ for (byte = 0x0; byte < sizeof(intr_data); byte ++) {
+ outb(byte | 0x80, 0xC00);
+ outb(intr_data[byte], 0xC01);
+ }
+
+ /* I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# */
+#define IO_LOCAL_INT(type, intr, apicid, pin) \
+ smp_write_lintsrc(mc, (type), MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, bus_isa, (intr), (apicid), (pin));
+ mptable_add_isa_interrupts(mc, bus_isa, ioapic_id, 0);
+
+ /* PCI interrupts are level triggered, and are
+ * associated with a specific bus/device/function tuple.
+ */
+#define PCI_INT(bus, dev, int_sign, pin) \
+ smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, (bus), (((dev)<<2)|(int_sign)), ioapic_id, (pin))
+
+ /* IOMMU */
+ PCI_INT(0x0, 0x0, 0x0, 0x10);
+ PCI_INT(0x0, 0x0, 0x1, 0x11);
+ PCI_INT(0x0, 0x0, 0x2, 0x12);
+ PCI_INT(0x0, 0x0, 0x3, 0x13);
+
+ /* Internal VGA */
+ PCI_INT(0x0, 0x01, 0x0, intr_data[0x02]);
+ PCI_INT(0x0, 0x01, 0x1, intr_data[0x03]);
+
+ /* SMBUS */
+ PCI_INT(0x0, 0x14, 0x0, 0x10);
+
+ /* HD Audio */
+ PCI_INT(0x0, 0x14, 0x0, intr_data[0x13]);
+
+ /* USB */
+ PCI_INT(0x0, 0x12, 0x0, intr_data[0x30]);
+ PCI_INT(0x0, 0x12, 0x1, intr_data[0x31]);
+ PCI_INT(0x0, 0x13, 0x0, intr_data[0x32]);
+ PCI_INT(0x0, 0x13, 0x1, intr_data[0x33]);
+ PCI_INT(0x0, 0x16, 0x0, intr_data[0x34]);
+ PCI_INT(0x0, 0x16, 0x1, intr_data[0x35]);
+ PCI_INT(0x0, 0x14, 0x2, intr_data[0x36]);
+
+ /* sata */
+ PCI_INT(0x0, 0x11, 0x0, intr_data[0x40]);
+ PCI_INT(0x0, 0x11, 0x0, intr_data[0x41]);
+
+ /* on board NIC & Slot PCIE. */
+
+ /* PCI slots */
+ struct device *dev = dev_find_slot(0, PCI_DEVFN(0x14, 4));
+ if (dev && dev->enabled) {
+ u8 bus_pci = dev->link_list->secondary;
+ /* PCI_SLOT 0. */
+ PCI_INT(bus_pci, 0x5, 0x0, 0x14);
+ PCI_INT(bus_pci, 0x5, 0x1, 0x15);
+ PCI_INT(bus_pci, 0x5, 0x2, 0x16);
+ PCI_INT(bus_pci, 0x5, 0x3, 0x17);
+ }
+
+ /* PCIe Lan*/
+ PCI_INT(0x0, 0x06, 0x0, 0x13);
+
+ /* FCH PCIe PortA */
+ PCI_INT(0x0, 0x15, 0x0, 0x10);
+ /* FCH PCIe PortB */
+ PCI_INT(0x0, 0x15, 0x1, 0x11);
+ /* FCH PCIe PortC */
+ PCI_INT(0x0, 0x15, 0x2, 0x12);
+ /* FCH PCIe PortD */
+ PCI_INT(0x0, 0x15, 0x3, 0x13);
+
+ /*Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# */
+ IO_LOCAL_INT(mp_ExtINT, 0, MP_APIC_ALL, 0x0);
+ IO_LOCAL_INT(mp_NMI, 0, MP_APIC_ALL, 0x1);
+ /* There is no extension information... */
+
+ /* Compute the checksums */
+ return mptable_finalize(mc);
+}
+
+unsigned long write_smp_table(unsigned long addr)
+{
+ void *v;
+ v = smp_write_floating_table(addr, 0);
+ return (unsigned long)smp_write_config_table(v);
+}
diff --git a/src/mainboard/asus/a88xm-e/romstage.c b/src/mainboard/asus/a88xm-e/romstage.c
new file mode 100644
index 0000000..0a85c27
--- /dev/null
+++ b/src/mainboard/asus/a88xm-e/romstage.c
@@ -0,0 +1,102 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ * Copyright (C) 2012 Rudolf Marek <r.marek(a)assembler.cz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/io.h>
+
+#include <northbridge/amd/agesa/state_machine.h>
+#include <southbridge/amd/common/amd_defs.h>
+#include <southbridge/amd/agesa/hudson/hudson.h>
+#include <southbridge/amd/agesa/hudson/smbus.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <superio/ite/common/ite.h>
+#include <superio/ite/it8728f/it8728f.h>
+
+#define MMIO_NON_POSTED_START 0xfed00000
+#define MMIO_NON_POSTED_END 0xfedfffff
+#define SB_MMIO_MISC32(x) *(volatile u32 *)(AMD_SB_ACPI_MMIO_ADDR + 0xE00 + (x))
+
+static void sbxxx_enable_48mhzout(void)
+{
+ /* most likely programming to 48MHz out signal */
+ u32 reg32;
+ reg32 = SB_MMIO_MISC32(0x28);
+ reg32 &= 0xffc7ffff;
+ reg32 |= 0x00100000;
+ SB_MMIO_MISC32(0x28) = reg32;
+
+ reg32 = SB_MMIO_MISC32(0x40);
+ reg32 &= ~0x80u;
+ SB_MMIO_MISC32(0x40) = reg32;
+}
+
+static void superio_init_e(void)
+{
+ pnp_devfn_t uart = PNP_DEV(0x2e, IT8728F_SP1);
+ pnp_devfn_t gpio = PNP_DEV(0x2e, IT8728F_GPIO);
+
+ ite_kill_watchdog(gpio);
+ ite_enable_serial(uart, CONFIG_TTYS0_BASE);
+ ite_enable_3vsbsw(gpio);
+}
+
+void board_BeforeAgesa(struct sysinfo *cb)
+{
+ u8 byte;
+ pci_devfn_t dev;
+
+ if (IS_ENABLED(CONFIG_POST_DEVICE_PCI_PCIE))
+ hudson_pci_port80();
+ else if (IS_ENABLED(CONFIG_POST_DEVICE_LPC))
+ hudson_lpc_port80();
+
+ /* enable SIO LPC decode */
+ dev = PCI_DEV(0, 0x14, 3);
+ byte = pci_read_config8(dev, 0x48);
+ byte |= 3; /* 2e, 2f */
+ pci_write_config8(dev, 0x48, byte);
+
+ /* enable serial decode */
+ byte = pci_read_config8(dev, 0x44);
+ byte |= (1 << 6); /* 0x3f8 */
+ pci_write_config8(dev, 0x44, byte);
+
+ post_code(0x30);
+
+ /* enable SB MMIO space */
+ outb(0x24, 0xcd6);
+ outb(0x1, 0xcd7);
+
+ /* enable SIO clock */
+ sbxxx_enable_48mhzout();
+
+ if (IS_ENABLED(CONFIG_BOARD_ASUS_A88XM_E))
+ superio_init_e();
+
+ /* turn on secondary smbus at b20 */
+ outb(0x28, 0xcd6);
+ byte = inb(0xcd7);
+ byte |= 1;
+ outb(byte, 0xcd7);
+
+ /* set DDR3 voltage */
+ byte = CONFIG_BOARD_ASUS_A88XM_E_DDR3_VOLT_VAL;
+
+ /* default is byte = 0x0, so no need to set it in this case */
+ if (byte)
+ do_smbus_write_byte(0xb20, 0x15, 0x3, byte);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/30987
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I60fa0636ba41f5f1a6a3faa2764bf2f0a968cf90
Gerrit-Change-Number: 30987
Gerrit-PatchSet: 1
Gerrit-Owner: Balázs Vinarz <vinibali1(a)gmail.com>
Gerrit-MessageType: newchange
6 days, 9 hours
Change in ...coreboot[master]: soc/intel/denverton_ns: Allow using FSP repo
by Felix Singer (Code Review)
Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30931
Change subject: soc/intel/denverton_ns: Allow using FSP repo
......................................................................
soc/intel/denverton_ns: Allow using FSP repo
Change-Id: I615305da5865bef305f560f5c90482cf0937b25a
Signed-off-by: Felix Singer <migy(a)darmstadt.ccc.de>
---
M src/drivers/intel/fsp2_0/Kconfig
M src/soc/intel/denverton_ns/Kconfig
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/30931/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index 8156d18..6f5ed2a 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -85,7 +85,8 @@
bool "Use the IntelFSP based binaries"
depends on ADD_FSP_BINARIES
depends on SOC_INTEL_APOLLOLAKE || SOC_INTEL_SKYLAKE || \
- SOC_INTEL_KABYLAKE || SOC_INTEL_COFFEELAKE
+ SOC_INTEL_KABYLAKE || SOC_INTEL_COFFEELAKE || \
+ SOC_INTEL_DENVERTON_NS
help
When selecting this option, the SoC must set FSP_HEADER_PATH
and FSP_FD_PATH correctly so FSP splitting works.
diff --git a/src/soc/intel/denverton_ns/Kconfig b/src/soc/intel/denverton_ns/Kconfig
index 1096549..dfb5c37 100644
--- a/src/soc/intel/denverton_ns/Kconfig
+++ b/src/soc/intel/denverton_ns/Kconfig
@@ -78,6 +78,16 @@
help
The memory location of the Intel FSP-S binary for this platform.
+config FSP_HEADER_PATH
+ string "Location of FSP headers"
+ depends on MAINBOARD_USES_FSP2_0
+ default "3rdparty/fsp/DenvertonNSFspBinPkg/Include/"
+
+config FSP_FD_PATH
+ string
+ depends on FSP_USE_REPO
+ default "3rdparty/fsp/DenvertonNSFspBinPkg/FspBin/DenvertonNSFsp.fd"
+
# CAR memory layout on DENVERTON_NS hardware:
## CAR base address - 0xfef00000
## CAR size 1MB - 0x100 (0xfff00)
--
To view, visit https://review.coreboot.org/c/coreboot/+/30931
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I615305da5865bef305f560f5c90482cf0937b25a
Gerrit-Change-Number: 30931
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <migy(a)darmstadt.ccc.de>
Gerrit-MessageType: newchange
6 days, 15 hours
Change in ...coreboot[master]: arch/x86: Drop Kconfig SIPI_VECTOR_IN_ROM
by Kyösti Mälkki (Code Review)
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30856
Change subject: arch/x86: Drop Kconfig SIPI_VECTOR_IN_ROM
......................................................................
arch/x86: Drop Kconfig SIPI_VECTOR_IN_ROM
This was used to enforce 4kiB alignment of _start16bit in
romcc bootblock. Platforms requiring this moved away to
C_ENVIRONMENT_BOOTBLOCK that globally forces the alignment.
Change-Id: I8ca453bbc56ab2aeb127f3e081c69e1b38bb8396
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/arch/x86/Kconfig
M src/arch/x86/failover.ld
M src/cpu/intel/car/p4-netburst/cache_as_ram.S
M src/cpu/intel/model_106cx/Kconfig
M src/cpu/intel/socket_LGA775/Kconfig
M src/cpu/intel/socket_mPGA604/Kconfig
M src/cpu/x86/16bit/entry16.inc
7 files changed, 5 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/30856/1
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 242a7cf..c2fc914 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -81,13 +81,6 @@
default n
depends on ARCH_X86 && SMP
-# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
-# can boot AP CPUs to enable their shared caches.
-config SIPI_VECTOR_IN_ROM
- bool
- default n
- depends on ARCH_X86
-
# Set the rambase for systems that still need it, only 5 chipsets as of
# Sep 2018. This value was 0x100000, chosen to match the entry point
# of Linux 2.2 in 1999. The new value, 14 MiB, makes a lot more sense
diff --git a/src/arch/x86/failover.ld b/src/arch/x86/failover.ld
index b32aa29..eabc9f7 100644
--- a/src/arch/x86/failover.ld
+++ b/src/arch/x86/failover.ld
@@ -23,12 +23,11 @@
TARGET(binary)
SECTIONS
{
- /* Symbol ap_sipi_vector must be aligned to 4kB to start AP CPUs
- * with Startup IPI message without RAM. Align .rom to next 4 byte
- * boundary anyway, so no pad byte appears between _rom and _start.
+ /* Align .rom to 4 byte boundary so no pad byte appears
+ * between _rom and _start.
*/
.bogus ROMLOC_MIN : {
- . = CONFIG_SIPI_VECTOR_IN_ROM ? ALIGN(4096) : ALIGN(4);
+ . = ALIGN(4);
ROMLOC = .;
} >rom = 0xff
@@ -49,12 +48,7 @@
* may cause the total size of a section to change when the start
* address gets applied.
*/
- ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16) -
- (CONFIG_SIPI_VECTOR_IN_ROM ? 4096 : 0);
-
- /* Post-check proper SIPI vector. */
- _bogus = ASSERT(!CONFIG_SIPI_VECTOR_IN_ROM || (ap_sipi_vector_in_rom == 0xff),
- "Address mismatch on AP_SIPI_VECTOR");
+ ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16);
/DISCARD/ : {
*(.comment)
diff --git a/src/cpu/intel/car/p4-netburst/cache_as_ram.S b/src/cpu/intel/car/p4-netburst/cache_as_ram.S
index fda572d..5c579a1 100644
--- a/src/cpu/intel/car/p4-netburst/cache_as_ram.S
+++ b/src/cpu/intel/car/p4-netburst/cache_as_ram.S
@@ -23,10 +23,6 @@
/* Macro to access Local APIC registers at default base. */
#define LAPIC(x) $(LAPIC_DEFAULT_BASE | LAPIC_ ## x)
-#if !IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)
-/* Fixed location, ASSERTED in failover.ld if it changes. */
-.set ap_sipi_vector_in_rom, 0xff
-#endif
#define CACHE_AS_RAM_SIZE CONFIG_DCACHE_RAM_SIZE
#define CACHE_AS_RAM_BASE CONFIG_DCACHE_RAM_BASE
diff --git a/src/cpu/intel/model_106cx/Kconfig b/src/cpu/intel/model_106cx/Kconfig
index f365cf1..2a324fb 100644
--- a/src/cpu/intel/model_106cx/Kconfig
+++ b/src/cpu/intel/model_106cx/Kconfig
@@ -7,7 +7,6 @@
select SMP
select SSE2
select UDELAY_LAPIC
- select SIPI_VECTOR_IN_ROM
select AP_IN_SIPI_WAIT
select TSC_SYNC_MFENCE
select SUPPORT_CPU_UCODE_IN_CBFS
diff --git a/src/cpu/intel/socket_LGA775/Kconfig b/src/cpu/intel/socket_LGA775/Kconfig
index 8b227bd..6c3d837 100644
--- a/src/cpu/intel/socket_LGA775/Kconfig
+++ b/src/cpu/intel/socket_LGA775/Kconfig
@@ -13,7 +13,6 @@
select CPU_INTEL_MODEL_1067X
select MMX
select SSE
- select SIPI_VECTOR_IN_ROM
config DCACHE_RAM_SIZE
hex
diff --git a/src/cpu/intel/socket_mPGA604/Kconfig b/src/cpu/intel/socket_mPGA604/Kconfig
index ca2f7b3..e860ded 100644
--- a/src/cpu/intel/socket_mPGA604/Kconfig
+++ b/src/cpu/intel/socket_mPGA604/Kconfig
@@ -9,7 +9,6 @@
select MMX
select SSE
select UDELAY_TSC
- select SIPI_VECTOR_IN_ROM
select C_ENVIRONMENT_BOOTBLOCK
# mPGA604 are usually Intel Netburst CPUs which should have SSE2
diff --git a/src/cpu/x86/16bit/entry16.inc b/src/cpu/x86/16bit/entry16.inc
index 2a9f8c5..f110980 100644
--- a/src/cpu/x86/16bit/entry16.inc
+++ b/src/cpu/x86/16bit/entry16.inc
@@ -29,8 +29,7 @@
#include <arch/rom_segs.h>
-#if IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK) || \
- IS_ENABLED(CONFIG_SIPI_VECTOR_IN_ROM)
+#if IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)
/* Symbol _start16bit must be aligned to 4kB to start AP CPUs with
* Startup IPI message without RAM.
*/
--
To view, visit https://review.coreboot.org/c/coreboot/+/30856
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8ca453bbc56ab2aeb127f3e081c69e1b38bb8396
Gerrit-Change-Number: 30856
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange
1 week
Change in ...coreboot[master]: autoport: Add support for Haswell-LynxPoint platform
by Iru Cai (vimacs) (Code Review)
Hello Iru Cai,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/30890
to review the following change.
Change subject: autoport: Add support for Haswell-LynxPoint platform
......................................................................
autoport: Add support for Haswell-LynxPoint platform
It can now generate a buildable source for Clevo W650SZ.
TODO:
- Support Lynx Point LP (GPIO registers differ from non-LP)
- Use PCH HD-Audio in azilia instead of the CPU/Northbridge HD-Audio
Change-Id: I4f6e8c97b5122101de2f36bba8ba9f8ddd5b813a
Signed-off-by: Iru Cai <mytbk920423(a)gmail.com>
---
M util/autoport/azalia.go
A util/autoport/haswell.go
A util/autoport/lynxpoint.go
M util/autoport/main.go
4 files changed, 625 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/30890/1
diff --git a/util/autoport/azalia.go b/util/autoport/azalia.go
index c525189..3090dd0 100644
--- a/util/autoport/azalia.go
+++ b/util/autoport/azalia.go
@@ -62,4 +62,9 @@
RegisterPCI(0x8086, 0x1c20, azalia{})
/* C216/ivybridge */
RegisterPCI(0x8086, 0x1e20, azalia{})
+ /* Haswell */
+ RegisterPCI(0x8086, 0x0c0c, azalia{})
+ /* Lynx Point */
+ RegisterPCI(0x8086, 0x8c20, azalia{})
+ RegisterPCI(0x8086, 0x9c20, azalia{})
}
diff --git a/util/autoport/haswell.go b/util/autoport/haswell.go
new file mode 100644
index 0000000..d3c9d9f
--- /dev/null
+++ b/util/autoport/haswell.go
@@ -0,0 +1,119 @@
+package main
+
+type haswellmc struct {
+ variant string
+}
+
+func (i haswellmc) Scan(ctx Context, addr PCIDevData) {
+ inteltool := ctx.InfoSource.GetInteltool()
+
+ /* FIXME:XX Move this somewhere else. */
+ MainboardIncludes = append(MainboardIncludes, "drivers/intel/gma/int15.h")
+ MainboardEnable += (` /* FIXME: fix those values*/
+ install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
+`)
+
+ DevTree = DevTreeNode{
+ Chip: "northbridge/intel/haswell",
+ MissingParent: "northbridge",
+ Comment: "FIXME: check gfx.ndid and gfx.did",
+ Registers: map[string]string{
+ "gpu_dp_b_hotplug": FormatInt32((inteltool.IGD[0xc4030] >> 2) & 7),
+ "gpu_dp_c_hotplug": FormatInt32((inteltool.IGD[0xc4030] >> 10) & 7),
+ "gpu_dp_d_hotplug": FormatInt32((inteltool.IGD[0xc4030] >> 18) & 7),
+ "gpu_panel_port_select": FormatInt32((inteltool.IGD[0xc7208] >> 30) & 3),
+ "gpu_panel_power_up_delay": FormatInt32((inteltool.IGD[0xc7208] >> 16) & 0x1fff),
+ "gpu_panel_power_backlight_on_delay": FormatInt32(inteltool.IGD[0xc7208] & 0x1fff),
+ "gpu_panel_power_down_delay": FormatInt32((inteltool.IGD[0xc720c] >> 16) & 0x1fff),
+ "gpu_panel_power_backlight_off_delay": FormatInt32(inteltool.IGD[0xc720c] & 0x1fff),
+ "gpu_panel_power_cycle_delay": FormatInt32(inteltool.IGD[0xc7210] & 0xff),
+ "gpu_cpu_backlight": FormatHex32(inteltool.IGD[0x48254]),
+ "gpu_pch_backlight": FormatHex32((inteltool.IGD[0xc8254] >> 16) * 0x10001),
+ "gpu_ddi_e_connected": FormatBool(((inteltool.IGD[0x64000] >> 4) & 1) == 0),
+ /* FIXME:XX hardcoded. */
+ "gfx.ndid": "3",
+ "gfx.did": "{ 0x80000100, 0x80000240, 0x80000410, 0x80000410, 0x00000005 }",
+ },
+ Children: []DevTreeNode{
+ {
+ Chip: "cpu_cluster",
+ Dev: 0,
+ Children: []DevTreeNode{
+ {
+ Chip: "cpu/intel/haswell",
+ Children: []DevTreeNode{
+ {
+ Chip: "lapic",
+ Dev: 0,
+ },
+ {
+ Chip: "lapic",
+ Dev: 0xacac,
+ Disabled: true,
+ },
+ },
+ Registers: map[string]string{
+ /* FIXME:XX hardcoded. */
+ "c1_acpower": "1",
+ "c2_acpower": "3",
+ "c3_acpower": "5",
+ "c1_battery": "1",
+ "c2_battery": "3",
+ "c3_battery": "5",
+ },
+ },
+ },
+ },
+
+ {
+ Chip: "domain",
+ Dev: 0,
+ PCIController: true,
+ ChildPCIBus: 0,
+ PCISlots: []PCISlot{
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x0, Func: 0}, writeEmpty: true, additionalComment: "Host bridge"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1, Func: 0}, writeEmpty: true, additionalComment: "PCIe Bridge for discrete graphics"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x2, Func: 0}, writeEmpty: true, additionalComment: "Internal graphics"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x3, Func: 0}, writeEmpty: true, additionalComment: "Mini-HD audio"},
+ },
+ },
+ },
+ }
+
+ PutPCIDev(addr, "Host bridge")
+
+ /* FIXME:XX some configs are unsupported. */
+
+ KconfigBool["CPU_INTEL_HASWELL"] = true
+ KconfigBool["NORTHBRIDGE_INTEL_HASWELL"] = true
+ KconfigBool["INTEL_INT15"] = true
+ KconfigBool["HAVE_ACPI_TABLES"] = true
+ KconfigBool["HAVE_ACPI_RESUME"] = true
+
+ KconfigInt["MAX_CPUS"] = 8
+
+ DSDTIncludes = append(DSDTIncludes, DSDTInclude{
+ File: "cpu/intel/common/acpi/cpu.asl",
+ })
+
+ DSDTPCI0Includes = append(DSDTPCI0Includes, DSDTInclude{
+ File: "northbridge/intel/haswell/acpi/haswell.asl",
+ }, DSDTInclude{
+ File: "drivers/intel/gma/acpi/default_brightness_levels.asl",
+ })
+}
+
+func init() {
+ RegisterPCI(0x8086, 0x0c00, haswellmc{variant: "Desktop"})
+ RegisterPCI(0x8086, 0x0c04, haswellmc{variant: "Mobile"})
+ RegisterPCI(0x8086, 0x0a04, haswellmc{variant: "ULT"})
+ RegisterPCI(0x8086, 0x0c08, haswellmc{variant: "Server"})
+ for _, id := range []uint16{
+ 0x0402, 0x0412, 0x0422,
+ 0x0406, 0x0416, 0x0426,
+ 0x0d16, 0x0d26, 0x0d36,
+ 0x0a06, 0x0a16, 0x0a26,
+ } {
+ RegisterPCI(0x8086, id, GenericVGA{GenericPCI{Comment: "VGA controller"}})
+ }
+}
diff --git a/util/autoport/lynxpoint.go b/util/autoport/lynxpoint.go
new file mode 100644
index 0000000..df20c3f
--- /dev/null
+++ b/util/autoport/lynxpoint.go
@@ -0,0 +1,495 @@
+package main
+
+import (
+ "fmt"
+ "os"
+)
+
+type lynxpoint struct {
+ variant string
+ node *DevTreeNode
+}
+
+func (b lynxpoint) writeGPIOSet(ctx Context, sb *os.File,
+ val uint32, set uint, partno int, constraint uint32) {
+
+ max := uint(32)
+ if set == 3 {
+ max = 12
+ }
+
+ bits := [6][2]string{
+ {"GPIO_MODE_NATIVE", "GPIO_MODE_GPIO"},
+ {"GPIO_DIR_OUTPUT", "GPIO_DIR_INPUT"},
+ {"GPIO_LEVEL_LOW", "GPIO_LEVEL_HIGH"},
+ {"GPIO_RESET_PWROK", "GPIO_RESET_RSMRST"},
+ {"GPIO_NO_INVERT", "GPIO_INVERT"},
+ {"GPIO_NO_BLINK", "GPIO_BLINK"},
+ }
+
+ for i := uint(0); i < max; i++ {
+ if ((constraint>>i)&1 == 1) {
+ fmt.Fprintf(sb, " .gpio%d = %s,\n",
+ (set-1)*32+i,
+ bits[partno][(val>>i)&1])
+ }
+ }
+}
+
+func (b lynxpoint) GPIO(ctx Context, inteltool InteltoolData) {
+ var constraint uint32
+ gpio := Create(ctx, "gpio.c")
+ defer gpio.Close()
+
+ AddROMStageFile("gpio.c", "")
+
+ Add_gpl(gpio)
+ gpio.WriteString("#include <southbridge/intel/common/gpio.h>\n\n")
+
+ /* TODO: different in LP PCH */
+ addresses := [3][6]int{
+ {0x00, 0x04, 0x0c, 0x60, 0x2c, 0x18},
+ {0x30, 0x34, 0x38, 0x64, -1, -1},
+ {0x40, 0x44, 0x48, 0x68, -1, -1},
+ }
+
+ for set := 1; set <= 3; set++ {
+ for partno, part := range []string{"mode", "direction", "level", "reset", "invert", "blink"} {
+ addr := addresses[set-1][partno]
+ if addr < 0 {
+ continue
+ }
+ fmt.Fprintf(gpio, "static const struct pch_gpio_set%d pch_gpio_set%d_%s = {\n",
+ set, set, part)
+
+ constraint = 0xffffffff
+ switch part {
+ case "direction":
+ /* Ignored on native mode */
+ constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
+ case "level":
+ /* Level doesn't matter for input */
+ constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
+ constraint &^= inteltool.GPIO[uint16(addresses[set-1][1])]
+ case "reset":
+ /* Only show reset */
+ constraint = inteltool.GPIO[uint16(addresses[set-1][3])]
+ case "invert":
+ /* Only on input and only show inverted GPIO */
+ constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
+ constraint &= inteltool.GPIO[uint16(addresses[set-1][1])]
+ constraint &= inteltool.GPIO[uint16(addresses[set-1][4])]
+ case "blink":
+ /* Only on output and only show blinking GPIO */
+ constraint = inteltool.GPIO[uint16(addresses[set-1][0])]
+ constraint &^= inteltool.GPIO[uint16(addresses[set-1][1])]
+ constraint &= inteltool.GPIO[uint16(addresses[set-1][5])]
+ }
+ b.writeGPIOSet(ctx, gpio, inteltool.GPIO[uint16(addr)], uint(set), partno, constraint)
+ gpio.WriteString("};\n\n")
+ }
+ }
+
+ gpio.WriteString(`const struct pch_gpio_map mainboard_gpio_map = {
+ .set1 = {
+ .mode = &pch_gpio_set1_mode,
+ .direction = &pch_gpio_set1_direction,
+ .level = &pch_gpio_set1_level,
+ .blink = &pch_gpio_set1_blink,
+ .invert = &pch_gpio_set1_invert,
+ .reset = &pch_gpio_set1_reset,
+ },
+ .set2 = {
+ .mode = &pch_gpio_set2_mode,
+ .direction = &pch_gpio_set2_direction,
+ .level = &pch_gpio_set2_level,
+ .reset = &pch_gpio_set2_reset,
+ },
+ .set3 = {
+ .mode = &pch_gpio_set3_mode,
+ .direction = &pch_gpio_set3_direction,
+ .level = &pch_gpio_set3_level,
+ .reset = &pch_gpio_set3_reset,
+ },
+};
+`)
+}
+
+func (b lynxpoint) IsPCIeHotplug(ctx Context, port int) bool {
+ portDev, ok := PCIMap[PCIAddr{Bus: 0, Dev: 0x1c, Func: port}]
+ if !ok {
+ return false
+ }
+ return (portDev.ConfigDump[0xdb] & (1 << 6)) != 0
+}
+
+func (b lynxpoint) GetGPIOHeader() string {
+ return "southbridge/intel/lynxpoint/pch.h"
+}
+
+func (b lynxpoint) EnableGPE(in int) {
+ b.node.Registers[fmt.Sprintf("gpi%d_routing", in)] = "2"
+}
+
+func (b lynxpoint) EncodeGPE(in int) int {
+ return in + 0x10
+}
+
+func (b lynxpoint) DecodeGPE(in int) int {
+ return in - 0x10
+}
+
+func (b lynxpoint) NeedRouteGPIOManually() {
+ b.node.Comment += ", FIXME: set gpiX_routing for EC support"
+}
+
+func (b lynxpoint) Scan(ctx Context, addr PCIDevData) {
+
+ SouthBridge = &b
+
+ inteltool := ctx.InfoSource.GetInteltool()
+ b.GPIO(ctx, inteltool)
+
+ KconfigBool["SOUTHBRIDGE_INTEL_LYNXPOINT"] = true
+ if b.variant == "Lynx Point LP" {
+ KconfigBool["INTEL_LYNXPOINT_LP"] = true
+ }
+ KconfigBool["SERIRQ_CONTINUOUS_MODE"] = true
+ KconfigInt["USBDEBUG_HCD_INDEX"] = 2
+ KconfigComment["USBDEBUG_HCD_INDEX"] = "FIXME: check this"
+ dmi := ctx.InfoSource.GetDMI()
+ if dmi.Vendor == "LENOVO" {
+ KconfigInt["DRAM_RESET_GATE_GPIO"] = 10
+ } else {
+ KconfigInt["DRAM_RESET_GATE_GPIO"] = 60
+ }
+ KconfigComment["DRAM_RESET_GATE_GPIO"] = "FIXME: check this"
+
+ /* Not strictly speaking correct. These subsys/subvendor referer to PCI devices.
+ But most systems don't have any of those. But the config needs to be set
+ nevertheless. So set it to southbridge subsys/subvendor. */
+ KconfigHex["MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID"] = uint32(GetLE16(addr.ConfigDump[0x2c:0x2e]))
+ KconfigHex["MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID"] = uint32(GetLE16(addr.ConfigDump[0x2e:0x30]))
+
+ ich9GetFlashSize(ctx)
+
+ DSDTDefines = append(DSDTDefines,
+ DSDTDefine{
+ Key: "BRIGHTNESS_UP",
+ Value: "\\_SB.PCI0.GFX0.INCB",
+ },
+ DSDTDefine{
+ Key: "BRIGHTNESS_DOWN",
+ Value: "\\_SB.PCI0.GFX0.DECB",
+ },
+ DSDTDefine{
+ Key: "ACPI_VIDEO_DEVICE",
+ Value: "\\_SB.PCI0.GFX0",
+ })
+
+ /* SPI init */
+ MainboardIncludes = append(MainboardIncludes, "southbridge/intel/lynxpoint/pch.h")
+
+ cur := DevTreeNode{
+ Chip: "southbridge/intel/lynxpoint",
+ Comment: "Intel Series 8 Lynx Point PCH",
+
+ Registers: map[string]string{
+ "pirqa_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x60]),
+ "pirqb_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x61]),
+ "pirqc_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x62]),
+ "pirqd_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x63]),
+ "pirqe_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x68]),
+ "pirqf_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x69]),
+ "pirqg_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x6a]),
+ "pirqh_routing": FormatHex8(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x6b]),
+ "sata_ahci": "1",
+ "gen1_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x84:0x88]),
+ "gen2_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x88:0x8c]),
+ "gen3_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x8c:0x90]),
+ "gen4_dec": FormatHexLE32(PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 0}].ConfigDump[0x90:0x94]),
+ "sata_port_map": fmt.Sprintf("0x%x", PCIMap[PCIAddr{Bus: 0, Dev: 0x1f, Func: 2}].ConfigDump[0x92]&0x3f),
+ },
+ PCISlots: []PCISlot{
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x14, Func: 0}, writeEmpty: false, additionalComment: "USB 3.0 Controller"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 0}, writeEmpty: true, additionalComment: "Management Engine Interface 1"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 1}, writeEmpty: true, additionalComment: "Management Engine Interface 2"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 2}, writeEmpty: true, additionalComment: "Management Engine IDE-R"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x16, Func: 3}, writeEmpty: true, additionalComment: "Management Engine KT"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x19, Func: 0}, writeEmpty: true, additionalComment: "Intel Gigabit Ethernet"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1a, Func: 0}, writeEmpty: true, additionalComment: "USB2 EHCI #2"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1b, Func: 0}, writeEmpty: true, additionalComment: "High Definition Audio"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 0}, writeEmpty: true, additionalComment: "PCIe Port #1"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 1}, writeEmpty: true, additionalComment: "PCIe Port #2"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 2}, writeEmpty: true, additionalComment: "PCIe Port #3"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 3}, writeEmpty: true, additionalComment: "PCIe Port #4"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 4}, writeEmpty: true, additionalComment: "PCIe Port #5"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 5}, writeEmpty: true, additionalComment: "PCIe Port #6"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 6}, writeEmpty: true, additionalComment: "PCIe Port #7"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1c, Func: 7}, writeEmpty: true, additionalComment: "PCIe Port #8"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1d, Func: 0}, writeEmpty: true, additionalComment: "USB2 EHCI #1"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1e, Func: 0}, writeEmpty: true, additionalComment: "PCI bridge"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 0}, writeEmpty: true, additionalComment: "LPC bridge"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 2}, writeEmpty: true, additionalComment: "SATA Controller 1"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 3}, writeEmpty: true, additionalComment: "SMBus"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 5}, writeEmpty: true, additionalComment: "SATA Controller 2"},
+ PCISlot{PCIAddr: PCIAddr{Dev: 0x1f, Func: 6}, writeEmpty: true, additionalComment: "Thermal"},
+ },
+ }
+
+ b.node = &cur
+
+ PutPCIChip(addr, cur)
+ PutPCIDevParent(addr, "PCI-LPC bridge", "lpc")
+
+ DSDTIncludes = append(DSDTIncludes, DSDTInclude{
+ File: "southbridge/intel/lynxpoint/acpi/platform.asl",
+ })
+ DSDTIncludes = append(DSDTIncludes, DSDTInclude{
+ File: "southbridge/intel/lynxpoint/acpi/globalnvs.asl",
+ Comment: "global NVS and variables",
+ })
+ DSDTIncludes = append(DSDTIncludes, DSDTInclude{
+ File: "southbridge/intel/lynxpoint/acpi/sleepstates.asl",
+ })
+ DSDTPCI0Includes = append(DSDTPCI0Includes, DSDTInclude{
+ File: "southbridge/intel/lynxpoint/acpi/pch.asl",
+ })
+
+ sb := Create(ctx, "romstage.c")
+ defer sb.Close()
+ Add_gpl(sb)
+ sb.WriteString(`#include <stdint.h>
+#include <cpu/intel/romstage.h>
+#include <cpu/intel/haswell/haswell.h>
+#include <northbridge/intel/haswell/haswell.h>
+#include <northbridge/intel/haswell/pei_data.h>
+#include <southbridge/intel/common/gpio.h>
+#include <southbridge/intel/lynxpoint/pch.h>
+
+static const struct rcba_config_instruction rcba_config[] = {
+`)
+ RestoreDIRRoute(sb, "D31IR", uint16(inteltool.RCBA[0x3140]))
+ RestoreDIRRoute(sb, "D29IR", uint16(inteltool.RCBA[0x3144]))
+ RestoreDIRRoute(sb, "D28IR", uint16(inteltool.RCBA[0x3146]))
+ RestoreDIRRoute(sb, "D27IR", uint16(inteltool.RCBA[0x3148]))
+ RestoreDIRRoute(sb, "D26IR", uint16(inteltool.RCBA[0x314c]))
+ RestoreDIRRoute(sb, "D25IR", uint16(inteltool.RCBA[0x3150]))
+ RestoreDIRRoute(sb, "D22IR", uint16(inteltool.RCBA[0x315c]))
+ RestoreDIRRoute(sb, "D20IR", uint16(inteltool.RCBA[0x3160]))
+
+ sb.WriteString(`
+ RCBA_RMW_REG_32(FD, ~0, PCH_DISABLE_ALWAYS),
+
+ RCBA_END_CONFIG,
+};`)
+
+ sb.WriteString(`
+
+void mainboard_config_superio(void)
+{
+}
+
+void mainboard_romstage_entry(unsigned long bist)
+{
+ struct pei_data pei_data = {
+ .pei_version = PEI_VERSION,
+ .mchbar = (uintptr_t)DEFAULT_MCHBAR,
+ .dmibar = (uintptr_t)DEFAULT_DMIBAR,
+ .epbar = DEFAULT_EPBAR,
+ .pciexbar = DEFAULT_PCIEXBAR,
+ .smbusbar = SMBUS_IO_BASE,
+ .wdbbar = 0x4000000,
+ .wdbsize = 0x1000,
+ .hpet_address = HPET_ADDR,
+ .rcba = (uintptr_t)DEFAULT_RCBA,
+ .pmbase = DEFAULT_PMBASE,
+ .gpiobase = DEFAULT_GPIOBASE,
+ .temp_mmio_base = 0xfed08000,
+ .system_type = 1, /* desktop/server, FIXME: check this */
+ .tseg_size = CONFIG_SMM_TSEG_SIZE,
+ .spd_addresses = { 0xa0, 0xa2, 0xa4, 0xa6 }, /* FIXME: check this */
+ .ec_present = 0,
+ .dimm_channel0_disabled = 0, /* FIXME: leave channel 0 enabled */
+ .dimm_channel1_disabled = 0, /* FIXME: leave channel 1 enabled */
+ .max_ddr3_freq = 1600,
+ .usb2_ports = {
+ /* Length, Enable, OCn#, Location */
+`)
+
+ pdo1 := PCIMap[PCIAddr{Bus: 0, Dev: 0x1d, Func: 0}].ConfigDump[0x64]
+ ocmap1 := PCIMap[PCIAddr{Bus: 0, Dev: 0x1d, Func: 0}].ConfigDump[0x74:0x78]
+ pdo2 := PCIMap[PCIAddr{Bus: 0, Dev: 0x1a, Func: 0}].ConfigDump[0x64]
+ ocmap2 := PCIMap[PCIAddr{Bus: 0, Dev: 0x1a, Func: 0}].ConfigDump[0x74:0x78]
+
+ for port := uint(0); port < 14; port++ {
+ var port_oc int = -1
+ var port_pos string
+ var port_disable uint8
+
+ if port < 8 {
+ port_disable = (pdo1 >> port) & 1
+ for oc := 0; oc < 4; oc++ {
+ if ((ocmap1[oc] & (1 << port)) != 0) {
+ port_oc = oc
+ break
+ }
+ }
+ } else {
+ port_disable = (pdo2 >> (port - 8)) & 1
+ for oc := 0; oc < 4; oc++ {
+ if ((ocmap2[oc] & (1 << (port - 8))) != 0) {
+ port_oc = oc + 4
+ break
+ }
+ }
+ }
+ if port_disable == 1 {
+ port_pos = "USB_PORT_SKIP"
+ } else {
+ port_pos = "USB_PORT_BACK_PANEL"
+ }
+ if port_oc == -1 {
+ fmt.Fprintf(sb, " { 0x0040, %d, USB_OC_PIN_SKIP, %s },\n",
+ (port_disable ^ 1), port_pos)
+ } else {
+ fmt.Fprintf(sb, " { 0x0040, %d, %d, %s },\n",
+ (port_disable ^ 1), port_oc, port_pos)
+ }
+ }
+
+ sb.WriteString(` },
+ .usb3_ports = {
+`)
+
+ xpdo := PCIMap[PCIAddr{Bus: 0, Dev: 0x14, Func: 0}].ConfigDump[0xe8]
+ u3ocm := PCIMap[PCIAddr{Bus: 0, Dev: 0x14, Func: 0}].ConfigDump[0xc8:0xd0]
+
+ for port := uint(0); port < 6; port++ {
+ var port_oc int = -1
+ port_disable := (xpdo >> port) & 1
+ for oc := 0; oc < 8; oc++ {
+ if (u3ocm[oc] & (1 << port)) != 0 {
+ port_oc = oc
+ break
+ }
+ }
+ if port_oc == -1 {
+ fmt.Fprintf(sb, " { %d, USB_OC_PIN_SKIP },\n",
+ (port_disable ^ 1))
+ } else {
+ fmt.Fprintf(sb, " { %d, %d },\n",
+ (port_disable ^ 1), port_oc)
+ }
+ }
+
+ sb.WriteString(` },
+ };
+
+ struct romstage_params romstage_params = {
+ .pei_data = &pei_data,
+ .gpio_map = &mainboard_gpio_map,
+ .rcba_config = &rcba_config[0],
+ .bist = bist,
+ };
+
+ romstage_common(&romstage_params);
+}`)
+
+ gnvs := Create(ctx, "acpi_tables.c")
+ defer gnvs.Close()
+
+ Add_gpl(gnvs)
+ gnvs.WriteString(`#include <southbridge/intel/lynxpoint/nvs.h>
+
+/* FIXME: check this function. */
+void acpi_create_gnvs(global_nvs_t *gnvs)
+{
+ /* Disable USB ports in S3 by default */
+ gnvs->s3u0 = 0;
+ gnvs->s3u1 = 0;
+
+ /* Disable USB ports in S5 by default */
+ gnvs->s5u0 = 0;
+ gnvs->s5u1 = 0;
+
+ // the lid is open by default.
+ gnvs->lids = 1;
+
+ gnvs->tcrt = 100;
+ gnvs->tpsv = 90;
+}
+`)
+
+}
+
+func init() {
+ for _, id := range []uint16 {
+ 0x8c41, 0x8c49, 0x8c4b, 0x8c4f,
+ } {
+ RegisterPCI(0x8086, uint16(id), lynxpoint{variant: "Lynx Point Mobile"})
+ }
+
+ for _, id := range []uint16 {
+ 0x8c42, 0x8c44, 0x8c46, 0x8c4a,
+ 0x8c4c, 0x8c4e, 0x8c50, 0x8c5c,
+ } {
+ RegisterPCI(0x8086, uint16(id), lynxpoint{variant: "Lynx Point Desktop"})
+ }
+
+ for _, id := range []uint16 {
+ 0x8c52, 0x8c54, 0x8c56,
+ } {
+ RegisterPCI(0x8086, uint16(id), lynxpoint{variant: "Lynx Point Server"})
+ }
+
+ for _, id := range []uint16 {
+ 0x9c41, 0x9c43, 0x9c45,
+ } {
+ RegisterPCI(0x8086, uint16(id), lynxpoint{variant: "Lynx Point LP"})
+ }
+
+ /* PCIe bridge */
+ for _, id := range []uint16{
+ 0x8c10, 0x8c12, 0x8c14, 0x8c16, 0x8c18, 0x8c1a, 0x8c1c, 0x8c1e,
+ 0x9c10, 0x9c12, 0x9c14, 0x9c16, 0x9c18, 0x9c1a,
+ } {
+ RegisterPCI(0x8086, id, GenericPCI{})
+ }
+
+ /* SMBus controller */
+ RegisterPCI(0x8086, 0x1c22, GenericPCI{MissingParent: "smbus"})
+ RegisterPCI(0x8086, 0x1e22, GenericPCI{MissingParent: "smbus"})
+ RegisterPCI(0x8086, 0x8c22, GenericPCI{MissingParent: "smbus"})
+ RegisterPCI(0x8086, 0x9c22, GenericPCI{MissingParent: "smbus"})
+
+ /* SATA */
+ for _, id := range []uint16{
+ 0x8c00, 0x8c02, 0x8c04, 0x8c06, 0x8c08, 0x8c0e,
+ 0x8c01, 0x8c03, 0x8c05, 0x8c07, 0x8c09, 0x8c0f,
+ 0x9c03, 0x9c05, 0x9c07, 0x9c0f,
+ } {
+ RegisterPCI(0x8086, id, GenericPCI{})
+ }
+
+ /* EHCI */
+ for _, id := range []uint16{
+ 0x9c26, 0x8c26, 0x8c2d,
+ } {
+ RegisterPCI(0x8086, id, GenericPCI{})
+ }
+
+ /* XHCI */
+ RegisterPCI(0x8086, 0x8c31, GenericPCI{})
+ RegisterPCI(0x8086, 0x9c31, GenericPCI{})
+
+ /* ME and children */
+ for _, id := range []uint16{
+ 0x8c3a, 0x8c3b,
+ } {
+ RegisterPCI(0x8086, id, GenericPCI{})
+ }
+
+ /* Ethernet */
+ RegisterPCI(0x8086, 0x8c33, GenericPCI{})
+}
diff --git a/util/autoport/main.go b/util/autoport/main.go
index 05a829b..c1920a7 100644
--- a/util/autoport/main.go
+++ b/util/autoport/main.go
@@ -236,6 +236,12 @@
pcidev.ConfigDump[addr])
}
+func RestoreDIRRoute(f *os.File, regname string, val uint16) {
+ fmt.Fprintf(f, " RCBA_SET_REG_16(%s, DIR_ROUTE(PIRQ%c, PIRQ%c, PIRQ%c, PIRQ%c)),\n",
+ regname, 'A' + (val & 7), 'A' + ((val >> 4) & 7),
+ 'A' + ((val >> 8) & 7), 'A' + ((val >> 12) & 7))
+}
+
func RestorePCI32Simple(f *os.File, pcidev PCIDevData, addr uint16) {
fmt.Fprintf(f, " pci_write_config32(PCI_DEV(%d, 0x%02x, %d), 0x%02x, 0x%02x%02x%02x%02x);\n",
pcidev.Bus, pcidev.Dev, pcidev.Func, addr,
--
To view, visit https://review.coreboot.org/c/coreboot/+/30890
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4f6e8c97b5122101de2f36bba8ba9f8ddd5b813a
Gerrit-Change-Number: 30890
Gerrit-PatchSet: 1
Gerrit-Owner: Iru Cai (vimacs) <mytbk920423(a)gmail.com>
Gerrit-Reviewer: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-MessageType: newchange
1 week, 1 day
Change in ...coreboot[master]: security/lockdown: Write-protect WP_RO
by Patrick Rudolph (Code Review)
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32705
Change subject: security/lockdown: Write-protect WP_RO
......................................................................
security/lockdown: Write-protect WP_RO
Add another choice to boot media protection and write-protect WP_RO
in case VBOOT is enabled.
Tested on Lenovo T520:
The WP_RO region is write-protected.
Change-Id: I72c3e1a0720514b9b85b0433944ab5fb7109b2a2
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/security/lockdown/Kconfig
M src/security/lockdown/bootmedia.c
2 files changed, 29 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/32705/1
diff --git a/src/security/lockdown/Kconfig b/src/security/lockdown/Kconfig
index bb4d072..1e982d8 100644
--- a/src/security/lockdown/Kconfig
+++ b/src/security/lockdown/Kconfig
@@ -15,6 +15,18 @@
config BOOTMEDIA_LOCK_NONE
bool "Don't lock boot media sections"
+config BOOTMEDIA_LOCK_VBOOT_RO
+ bool "Write-protect WP_RO region in boot media"
+ depends on VBOOT
+ help
+ Select this if you want to write-protect the WP_RO region as specified
+ in the VBOOT FMAP. You will only be able to write the regions
+ FW_MAIN_A/FW_MAIN_B, which are not write-protected using the internal
+ programmer.
+ The locking will take place during the chipset lockdown, which
+ is either triggered by coreboot (when INTEL_CHIPSET_LOCKDOWN is set)
+ or has to be triggered later (e.g. by the payload or the OS).
+
config BOOTMEDIA_LOCK_RO
bool "Write-protect the whole boot media"
help
diff --git a/src/security/lockdown/bootmedia.c b/src/security/lockdown/bootmedia.c
index 8fb4ae9..6fa2de2 100644
--- a/src/security/lockdown/bootmedia.c
+++ b/src/security/lockdown/bootmedia.c
@@ -17,6 +17,7 @@
#include <commonlib/region.h>
#include <console/console.h>
#include <bootstate.h>
+#include <fmap.h>
/*
* Enable write protection on the WP_RO region of the bootmedia.
@@ -47,8 +48,23 @@
"of whole bootmedia\n");
locked = true;
}
- }
+ } else if (CONFIG(BOOTMEDIA_LOCK_VBOOT_RO)) {
+ struct region_device dev;
+ if (fmap_locate_area_as_rdev("WP_RO", &dev) < 0) {
+ printk(BIOS_ERR, "BM-LOCKDOWN: Could not find region 'WP_RO'\n");
+ } else {
+ for (size_t i = 0; i < ARRAY_SIZE(wp_prot); i++) {
+ printk(BIOS_DEBUG, "BM-LOCKDOWN: Trying write-protection"
+ "#%zu ...\n", i);
+ if (boot_device_wp_region(&dev, wp_prot[i]) < 0)
+ continue;
+ printk(BIOS_INFO, "BM-LOCKDOWN: Enabled write-protection of"
+ "WP_RO region\n");
+ locked = true;
+ }
+ }
+ }
if (!locked)
printk(BIOS_INFO, "BM-LOCKDOWN: Didn't enable bootmedia protection\n");
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/32705
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I72c3e1a0720514b9b85b0433944ab5fb7109b2a2
Gerrit-Change-Number: 32705
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
1 week, 4 days
Change in ...coreboot[master]: security: Add common boot media write protection
by Patrick Rudolph (Code Review)
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32704
Change subject: security: Add common boot media write protection
......................................................................
security: Add common boot media write protection
Introduce boot media protection settings and use the existing
boot_device_wp_region() function to apply settings on all
platforms that supports it yet.
Also remove the Intel southbridge code, which is now obsolete.
Tested on Lenovo T520. The whole flash is protected.
Change-Id: Iceb3ecf0bde5cec562bc62d1d5c79da35305d183
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/security/Kconfig
M src/security/Makefile.inc
A src/security/lockdown/Kconfig
A src/security/lockdown/Makefile.inc
A src/security/lockdown/bootmedia.c
M src/soc/intel/common/block/fast_spi/Kconfig
M src/southbridge/intel/common/Kconfig
M src/southbridge/intel/common/finalize.c
8 files changed, 124 insertions(+), 49 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32704/1
diff --git a/src/security/Kconfig b/src/security/Kconfig
index 6a334ac..99cb054 100644
--- a/src/security/Kconfig
+++ b/src/security/Kconfig
@@ -14,3 +14,4 @@
source "src/security/vboot/Kconfig"
source "src/security/tpm/Kconfig"
+source "src/security/lockdown/Kconfig"
diff --git a/src/security/Makefile.inc b/src/security/Makefile.inc
index a940b82..a74e498 100644
--- a/src/security/Makefile.inc
+++ b/src/security/Makefile.inc
@@ -1,2 +1,3 @@
subdirs-y += vboot
subdirs-y += tpm
+subdirs-y += lockdown
diff --git a/src/security/lockdown/Kconfig b/src/security/lockdown/Kconfig
new file mode 100644
index 0000000..bb4d072
--- /dev/null
+++ b/src/security/lockdown/Kconfig
@@ -0,0 +1,46 @@
+
+config SECURITY_BOOTMEDIA_LOCKDOWN
+ bool
+ default n
+ help
+ Platform support the locking of boot media. This can be for example
+ SPI controller protected regions or flash status register locking.
+
+if SECURITY_BOOTMEDIA_LOCKDOWN
+
+choice
+ prompt "Boot media protection"
+ default BOOTMEDIA_LOCK_NONE
+
+config BOOTMEDIA_LOCK_NONE
+ bool "Don't lock boot media sections"
+
+config BOOTMEDIA_LOCK_RO
+ bool "Write-protect the whole boot media"
+ help
+ Select this if you want to write-protect the whole firmware boot
+ media. The locking will take place during the chipset lockdown, which
+ is either triggered by coreboot (when INTEL_CHIPSET_LOCKDOWN is set)
+ or has to be triggered later (e.g. by the payload or the OS).
+
+ NOTE: If you trigger the chipset lockdown unconditionally,
+ you won't be able to write to the flash chip using the
+ internal programmer any more.
+
+config BOOTMEDIA_LOCK_NO_ACCESS
+ bool "Read- and write-protect the whole boot media"
+ help
+ Select this if you want to protect the firmware boot media against
+ all further accesses. On platforms that memory map a part of the
+ boot media the corresponding region is still readable.
+ The locking will take place during the chipset lockdown, which is
+ either triggered by coreboot (when INTEL_CHIPSET_LOCKDOWN is set) or
+ has to be triggered later (e.g. by the payload or the OS).
+
+ NOTE: If you trigger the chipset lockdown unconditionally,
+ you won't be able to write to the boot media using the
+ internal programmer any more.
+
+endchoice
+
+endif
diff --git a/src/security/lockdown/Makefile.inc b/src/security/lockdown/Makefile.inc
new file mode 100644
index 0000000..c287b9b
--- /dev/null
+++ b/src/security/lockdown/Makefile.inc
@@ -0,0 +1,16 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2019 9elements Agency GmbH <patrick.rudolph(a)9elements.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+ramstage-$(CONFIG_SECURITY_BOOTMEDIA_LOCKDOWN) += bootmedia.c
diff --git a/src/security/lockdown/bootmedia.c b/src/security/lockdown/bootmedia.c
new file mode 100644
index 0000000..8fb4ae9
--- /dev/null
+++ b/src/security/lockdown/bootmedia.c
@@ -0,0 +1,58 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 9elements Agency GmbH <patrick.rudolph(a)9elements.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <boot_device.h>
+#include <commonlib/region.h>
+#include <console/console.h>
+#include <bootstate.h>
+
+/*
+ * Enable write protection on the WP_RO region of the bootmedia.
+ */
+static void security_lockdown_bootmedia(void *unused)
+{
+ static const int wp_prot[] = {MEDIA_WP, CTRLR_WP};
+ const struct region_device *rdev;
+ bool locked = false;
+
+ if (CONFIG(BOOTMEDIA_LOCK_RO)) {
+ rdev = boot_device_ro();
+
+ for (size_t i = 0; i < ARRAY_SIZE(wp_prot); i++) {
+ printk(BIOS_DEBUG, "BM-LOCKDOWN: Trying write-protection"
+ "#%zu ...\n", i);
+ if (boot_device_wp_region(rdev, wp_prot[i]) < 0)
+ continue;
+
+ printk(BIOS_INFO, "BM-LOCKDOWN: Enabled write-protection of"
+ "whole bootmedia\n");
+ locked = true;
+ }
+ } else if (CONFIG(BOOTMEDIA_LOCK_NO_ACCESS)) {
+ rdev = boot_device_ro();
+ if (boot_device_wp_region(rdev, CTRLR_RWP) == 0) {
+ printk(BIOS_INFO, "BM-LOCKDOWN: Enabled read- and write protection"
+ "of whole bootmedia\n");
+ locked = true;
+ }
+ }
+
+ if (!locked)
+ printk(BIOS_INFO, "BM-LOCKDOWN: Didn't enable bootmedia protection\n");
+}
+
+/* BS_POST_DEVICE will lock the hardware */
+BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, security_lockdown_bootmedia,
+ NULL);
diff --git a/src/soc/intel/common/block/fast_spi/Kconfig b/src/soc/intel/common/block/fast_spi/Kconfig
index 4bd1f59..ff02844 100644
--- a/src/soc/intel/common/block/fast_spi/Kconfig
+++ b/src/soc/intel/common/block/fast_spi/Kconfig
@@ -1,5 +1,6 @@
config SOC_INTEL_COMMON_BLOCK_FAST_SPI
bool
+ select SECURITY_BOOTMEDIA_LOCKDOWN
help
Intel Processor common FAST_SPI support
diff --git a/src/southbridge/intel/common/Kconfig b/src/southbridge/intel/common/Kconfig
index c3bd90d..39234a8 100644
--- a/src/southbridge/intel/common/Kconfig
+++ b/src/southbridge/intel/common/Kconfig
@@ -20,6 +20,7 @@
config SOUTHBRIDGE_INTEL_COMMON_SPI
def_bool n
select SPI_FLASH
+ select SECURITY_BOOTMEDIA_LOCKDOWN
config SOUTHBRIDGE_INTEL_COMMON_PIRQ_ACPI_GEN
def_bool n
@@ -68,42 +69,3 @@
config SOUTHBRIDGE_INTEL_COMMON_WATCHDOG
bool
depends on SOUTHBRIDGE_INTEL_COMMON
-
-if SOUTHBRIDGE_INTEL_COMMON_FINALIZE
-
-choice
- prompt "Flash locking during chipset lockdown"
- default LOCK_SPI_FLASH_NONE
-
-config LOCK_SPI_FLASH_NONE
- bool "Don't lock flash sections"
-
-config LOCK_SPI_FLASH_RO
- bool "Write-protect all flash sections"
- help
- Select this if you want to write-protect the whole firmware flash
- chip. The locking will take place during the chipset lockdown, which
- is either triggered by coreboot (when INTEL_CHIPSET_LOCKDOWN is set)
- or has to be triggered later (e.g. by the payload or the OS).
-
- NOTE: If you trigger the chipset lockdown unconditionally,
- you won't be able to write to the flash chip using the
- internal programmer any more.
-
-config LOCK_SPI_FLASH_NO_ACCESS
- bool "Write-protect all flash sections and read-protect non-BIOS sections"
- help
- Select this if you want to protect the firmware flash against all
- further accesses (with the exception of the memory mapped BIOS re-
- gion which is always readable). The locking will take place during
- the chipset lockdown, which is either triggered by coreboot (when
- INTEL_CHIPSET_LOCKDOWN is set) or has to be triggered later (e.g.
- by the payload or the OS).
-
- NOTE: If you trigger the chipset lockdown unconditionally,
- you won't be able to write to the flash chip using the
- internal programmer any more.
-
-endchoice
-
-endif
diff --git a/src/southbridge/intel/common/finalize.c b/src/southbridge/intel/common/finalize.c
index 80c65bb..6f7934a 100644
--- a/src/southbridge/intel/common/finalize.c
+++ b/src/southbridge/intel/common/finalize.c
@@ -28,16 +28,6 @@
{
const pci_devfn_t lpc_dev = PCI_DEV(0, 0x1f, 0);
- if (CONFIG(LOCK_SPI_FLASH_RO) ||
- CONFIG(LOCK_SPI_FLASH_NO_ACCESS)) {
- int i;
- u32 lockmask = 1UL << 31;
- if (CONFIG(LOCK_SPI_FLASH_NO_ACCESS))
- lockmask |= 1 << 15;
- for (i = 0; i < 20; i += 4)
- RCBA32(0x3874 + i) = RCBA32(0x3854 + i) | lockmask;
- }
-
/* Lock SPIBAR */
RCBA32_OR(0x3804, (1 << 15));
--
To view, visit https://review.coreboot.org/c/coreboot/+/32704
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iceb3ecf0bde5cec562bc62d1d5c79da35305d183
Gerrit-Change-Number: 32704
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
1 week, 4 days
Change in ...coreboot[master]: [RFC] Initial commit to support SKL SP and OCP Tiogapass platform
by Name of user not set (Code Review)
Name of user not set #1002246 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31205
Change subject: [RFC] Initial commit to support SKL SP and OCP Tiogapass platform
......................................................................
[RFC] Initial commit to support SKL SP and OCP Tiogapass platform
Summary:
This commit adds support for SK SP and OCP Tiogapass platform:
* Added microcode files.
* Added FSP header files.
* Updated skylake soc code to accomodate FSP 2.0.
* Added tiogapass platform code to accomodate FSP 2.0.
With this commit, it is able to build coreboot.rom image.
The 3 FSP binaries are added to the coreboot image. It looks
okay by examining the coreboot.rom file through ifdtool command.
However, when booting with this image, no postcode is
observed on port 80, no UART message shows up. Debugging
is on-going. This commit is submitted as draft to enable
early review feedback.
Change-Id: I389355162eb9515b533a8d7f77cc8f03b8beb019
Signed-off-by: Jonathan Zhang <jonzhang(a)fb.com>
test
Change-Id: I033a52bc3f0b86f0ec1db8325b7435d20d194fda
---
M src/Kconfig
M src/drivers/intel/fsp2_0/include/fsp/api.h
A src/mainboard/ocp/tiogapass/Kconfig
A src/mainboard/ocp/tiogapass/Kconfig.name
A src/mainboard/ocp/tiogapass/Makefile.inc
A src/mainboard/ocp/tiogapass/acpi/mainboard.asl
A src/mainboard/ocp/tiogapass/board_id.c
A src/mainboard/ocp/tiogapass/board_id.h
A src/mainboard/ocp/tiogapass/board_info.txt
A src/mainboard/ocp/tiogapass/bootblock.c
A src/mainboard/ocp/tiogapass/cmos.default
A src/mainboard/ocp/tiogapass/cmos.layout
A src/mainboard/ocp/tiogapass/devicetree.cb
A src/mainboard/ocp/tiogapass/dsdt.asl
A src/mainboard/ocp/tiogapass/gpio.h
A src/mainboard/ocp/tiogapass/pei_data.c
A src/mainboard/ocp/tiogapass/ramstage.c
A src/mainboard/ocp/tiogapass/romstage.c
A src/mainboard/ocp/tiogapass/spd/Makefile.inc
A src/mainboard/ocp/tiogapass/spd/spd.h
A src/mainboard/ocp/tiogapass/spd/spd_util.c
M src/soc/intel/skylake/Kconfig
M src/soc/intel/skylake/Makefile.inc
M src/soc/intel/skylake/chip_fsp20.c
M src/soc/intel/skylake/include/fsp20/soc/ramstage.h
M src/soc/intel/skylake/irq.c
M src/soc/intel/skylake/romstage/romstage_fsp20.c
M src/soc/intel/skylake/vr_config.c
M src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/DebugSupport.h
A src/vendorcode/intel/fsp/fsp2_0/skykabylake/FirmwareVersionInfoHob.h
A src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspUpd.h
A src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspmUpd.h
A src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspsUpd.h
A src/vendorcode/intel/fsp/fsp2_0/skykabylake/FsptUpd.h
34 files changed, 1,968 insertions(+), 162 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/31205/1
diff --git a/src/Kconfig b/src/Kconfig
index a069f63..7de3335 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -360,6 +360,7 @@
source "src/ec/*/*/Kconfig"
# FIXME move to vendorcode
source "src/drivers/intel/fsp1_0/Kconfig"
+source "src/drivers/intel/fsp2_0/Kconfig"
source "src/southbridge/intel/common/firmware/Kconfig"
source "src/vendorcode/*/Kconfig"
diff --git a/src/drivers/intel/fsp2_0/include/fsp/api.h b/src/drivers/intel/fsp2_0/include/fsp/api.h
index 5ed3801..666020a 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/api.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/api.h
@@ -66,9 +66,9 @@
void platform_fsp_notify_status(enum fsp_notify_phase phase);
/* Initialize memory margin analysis settings. */
-void setup_mma(FSP_M_CONFIG *memory_cfg);
+void setup_mma(FSPM_CONFIG *memory_cfg);
/* Update the SOC specific memory config param for mma. */
-void soc_update_memory_params_for_mma(FSP_M_CONFIG *memory_cfg,
+void soc_update_memory_params_for_mma(FSPM_CONFIG *memory_cfg,
struct mma_config_param *mma_cfg);
/*
diff --git a/src/mainboard/ocp/tiogapass/Kconfig b/src/mainboard/ocp/tiogapass/Kconfig
new file mode 100644
index 0000000..c411b15
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/Kconfig
@@ -0,0 +1,58 @@
+if BOARD_OCP_TIOGAPASS
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select BOARD_ROMSIZE_KB_32768
+ select CONSOLE_SERIAL
+ select DRIVERS_UART
+ select GENERIC_SPD_BIN
+ select HAVE_ACPI_RESUME
+ select HAVE_ACPI_TABLES
+ select EC_ACPI
+ select HAVE_OPTION_TABLE
+ select HAVE_SMI_HANDLER
+ select SERIRQ_CONTINUOUS_MODE
+ select SKYLAKE_SOC_PCH_H
+ select SOC_INTEL_SKYLAKE
+ select SUPERIO_NUVOTON_NCT6776
+ select SUPERIO_NUVOTON_NCT6776_COM_A
+ select MAINBOARD_USES_FSP2_0
+ select HAVE_CMOS_DEFAULT
+
+
+config PLATFORM_USES_FSP2_0
+ bool "FSP driver 2.0"
+
+config IRQ_SLOT_COUNT
+ int
+ default 18
+
+config MAINBOARD_DIR
+ string
+ default "ocp/tiogapass"
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "Tioga Pass"
+
+config MAINBOARD_FAMILY
+ string
+ default "OCP_TiogaPass"
+
+config CBFS_SIZE
+ hex
+ default 0x1000000
+
+config VIRTUAL_ROM_SIZE
+ hex
+ default 0x2000000
+
+config MAX_CPUS
+ int
+ default 8
+
+config TPM_PIRQ
+ hex
+ default 0x18 # GPP_E0_IRQ
+
+endif # BOARD_OCP_TIOGAPASS
diff --git a/src/mainboard/ocp/tiogapass/Kconfig.name b/src/mainboard/ocp/tiogapass/Kconfig.name
new file mode 100644
index 0000000..0c57fd3
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_OCP_TIOGAPASS
+ bool "Tioga Pass"
diff --git a/src/mainboard/ocp/tiogapass/Makefile.inc b/src/mainboard/ocp/tiogapass/Makefile.inc
new file mode 100644
index 0000000..77cdb16
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/Makefile.inc
@@ -0,0 +1,23 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2013 Google Inc.
+## Copyright (C) 2016 Intel Corporation.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+subdirs-y += spd
+
+bootblock-y += bootblock.c
+romstage-y += pei_data.c
+romstage-y += board_id.c
+
+ramstage-y += ramstage.c
diff --git a/src/mainboard/ocp/tiogapass/acpi/mainboard.asl b/src/mainboard/ocp/tiogapass/acpi/mainboard.asl
new file mode 100644
index 0000000..5174eeb
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/acpi/mainboard.asl
@@ -0,0 +1,17 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ * Copyright (C) 2016 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <soc/gpio.h>
diff --git a/src/mainboard/ocp/tiogapass/board_id.c b/src/mainboard/ocp/tiogapass/board_id.c
new file mode 100644
index 0000000..a362b08
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/board_id.c
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#include "board_id.h"
+#include <ec/acpi/ec.h>
+#include <stdint.h>
+
+/*
+ * Get Board ID via EC I/O port write/read
+ */
+int get_board_id(void)
+{
+ uint8_t buffer[2];
+ uint8_t index;
+ if (send_ec_command(EC_FAB_ID_CMD) == 0) {
+ for (index = 0; index < sizeof(buffer); index++)
+ buffer[index] = recv_ec_data();
+ return (buffer[1] << 8) | buffer[0];
+ }
+ return -1;
+}
diff --git a/src/mainboard/ocp/tiogapass/board_id.h b/src/mainboard/ocp/tiogapass/board_id.h
new file mode 100644
index 0000000..881866f
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/board_id.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _MAINBOARD_BOARD_ID_H_
+#define _MAINBOARD_BOARD_ID_H_
+
+/* Mobile Board Id 0x00 - 0xFF */
+#define BOARD_ID_SKL_A0_RVP3 0x04
+#define BOARD_ID_SKL_RVP7 0x0B
+
+/* 60-6F reserved for KBL RVPs */
+#define BOARD_ID_KBL_LPDDR3_RVP3 0x60
+#define BOARD_ID_KBL_LPDDR3_RVP7 0x64
+
+/* Board/FAB ID Command */
+#define EC_FAB_ID_CMD 0x0D
+
+/*
+ * Returns board information (board id[15:8] and
+ * Fab info[7:0]) on success and < 0 on error
+ */
+int get_board_id(void);
+
+#endif /* _MAINBOARD_BOARD_ID_H_ */
diff --git a/src/mainboard/ocp/tiogapass/board_info.txt b/src/mainboard/ocp/tiogapass/board_info.txt
new file mode 100644
index 0000000..25dac38
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/board_info.txt
@@ -0,0 +1,5 @@
+Board name: Tioga Pass
+Category: server
+ROM protocol: SPI
+ROM socketed: yes
+Release year: 2017
diff --git a/src/mainboard/ocp/tiogapass/bootblock.c b/src/mainboard/ocp/tiogapass/bootblock.c
new file mode 100644
index 0000000..cf9740d
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/bootblock.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <bootblock_common.h>
+#include <soc/gpio.h>
+#include "gpio.h"
+
+#include <superio/nuvoton/common/nuvoton.h>
+#include <superio/nuvoton/nct6776/nct6776.h>
+
+#define SERIAL_DEV PNP_DEV(0x2e, NCT6776_SP1)
+
+static void early_config_gpio(void)
+{
+ /* This is a hack for FSP because it does things in MemoryInit()
+ * which it shouldn't do. We have to prepare certain gpios here
+ * because of the brokenness in FSP. */
+ gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
+}
+
+void bootblock_mainboard_init(void)
+{
+ early_config_gpio();
+}
+
+void bootblock_mainboard_early_init(void)
+{
+ nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
+}
diff --git a/src/mainboard/ocp/tiogapass/cmos.default b/src/mainboard/ocp/tiogapass/cmos.default
new file mode 100644
index 0000000..cd8bd47
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/cmos.default
@@ -0,0 +1,4 @@
+boot_option=Fallback
+debug_level=Spew
+power_on_after_fail=Disable
+nmi=Enable
diff --git a/src/mainboard/ocp/tiogapass/cmos.layout b/src/mainboard/ocp/tiogapass/cmos.layout
new file mode 100644
index 0000000..83a2e05
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/cmos.layout
@@ -0,0 +1,117 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2007-2008 coresystems GmbH
+## Copyright (C) 2016 Intel Corporation.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+# -----------------------------------------------------------------
+entries
+
+#start-bit length config config-ID name
+#0 8 r 0 seconds
+#8 8 r 0 alarm_seconds
+#16 8 r 0 minutes
+#24 8 r 0 alarm_minutes
+#32 8 r 0 hours
+#40 8 r 0 alarm_hours
+#48 8 r 0 day_of_week
+#56 8 r 0 day_of_month
+#64 8 r 0 month
+#72 8 r 0 year
+# -----------------------------------------------------------------
+# Status Register A
+#80 4 r 0 rate_select
+#84 3 r 0 REF_Clock
+#87 1 r 0 UIP
+# -----------------------------------------------------------------
+# Status Register B
+#88 1 r 0 auto_switch_DST
+#89 1 r 0 24_hour_mode
+#90 1 r 0 binary_values_enable
+#91 1 r 0 square-wave_out_enable
+#92 1 r 0 update_finished_enable
+#93 1 r 0 alarm_interrupt_enable
+#94 1 r 0 periodic_interrupt_enable
+#95 1 r 0 disable_clock_updates
+# -----------------------------------------------------------------
+# Status Register C
+#96 4 r 0 status_c_rsvd
+#100 1 r 0 uf_flag
+#101 1 r 0 af_flag
+#102 1 r 0 pf_flag
+#103 1 r 0 irqf_flag
+# -----------------------------------------------------------------
+# Status Register D
+#104 7 r 0 status_d_rsvd
+#111 1 r 0 valid_cmos_ram
+# -----------------------------------------------------------------
+# Diagnostic Status Register
+#112 8 r 0 diag_rsvd1
+
+# -----------------------------------------------------------------
+0 120 r 0 reserved_memory
+#120 264 r 0 unused
+
+# -----------------------------------------------------------------
+# RTC_BOOT_BYTE (coreboot hardcoded)
+384 1 e 4 boot_option
+388 4 h 0 reboot_counter
+#390 2 r 0 unused?
+
+# -----------------------------------------------------------------
+# coreboot config options: console
+392 3 r 0 unused
+395 4 e 6 debug_level
+#399 1 r 0 unused
+
+# coreboot config options: cpu
+#401 7 r 0 unused
+
+# coreboot config options: southbridge
+409 2 e 7 power_on_after_fail
+#411 5 r 0 unused
+
+# coreboot config options: bootloader
+#544 440 r 0 unused
+
+
+# coreboot config options: check sums
+984 16 h 0 check_sum
+
+# -----------------------------------------------------------------
+
+enumerations
+
+#ID value text
+1 0 Disable
+1 1 Enable
+2 0 Enable
+2 1 Disable
+4 0 Fallback
+4 1 Normal
+6 0 Emergency
+6 1 Alert
+6 2 Critical
+6 3 Error
+6 4 Warning
+6 5 Notice
+6 6 Info
+6 7 Debug
+6 8 Spew
+7 0 Disable
+7 1 Enable
+7 2 Keep
+# -----------------------------------------------------------------
+checksums
+
+checksum 392 415 984
diff --git a/src/mainboard/ocp/tiogapass/devicetree.cb b/src/mainboard/ocp/tiogapass/devicetree.cb
new file mode 100644
index 0000000..9b23a0e
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/devicetree.cb
@@ -0,0 +1,293 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2017 Intel Corporation.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+chip soc/intel/skylake
+
+ # Enable deep Sx states
+ register "deep_s5_enable_ac" = "0"
+ register "deep_s5_enable_dc" = "0"
+ register "deep_sx_config" = "DSX_EN_LAN_WAKE_PIN"
+
+ # GPE configuration
+ # Note that GPE events called out in ASL code rely on this
+ # route. i.e. If this route changes then the affected GPE
+ # offset bits also need to be changed.
+ register "gpe0_dw0" = "GPP_B"
+ register "gpe0_dw1" = "GPP_D"
+ register "gpe0_dw2" = "GPP_E"
+
+ # Enable "Intel Speed Shift Technology"
+ register "speed_shift_enable" = "1"
+
+ # FSP Configuration
+ register "EnableAzalia" = "1"
+ register "DspEnable" = "1"
+ register "IoBufferOwnership" = "3"
+ register "SmbusEnable" = "1"
+ register "ScsEmmcEnabled" = "0"
+ register "ScsEmmcHs400Enabled" = "0"
+ register "ScsSdCardEnabled" = "0"
+ register "InternalGfx" = "1"
+ register "SkipExtGfxScan" = "1"
+ register "Device4Enable" = "0"
+ register "Heci3Enabled" = "0"
+
+ register "SaGv" = "3"
+ register "PmTimerDisabled" = "0"
+
+ # Enabling SLP_S3#, SLP_S4#, SLP_SUS and SLP_A Stretch
+ # SLP_S3 Minimum Assertion Width. Values 0: 60us, 1: 1ms, 2: 50ms, 3: 2s
+ register "PmConfigSlpS3MinAssert" = "0x02"
+
+ # SLP_S4 Minimum Assertion Width. Values 0: default, 1: 1s, 2: 2s, 3: 3s, 4: 4s
+ register "PmConfigSlpS4MinAssert" = "0x04"
+
+ # SLP_SUS Minimum Assertion Width. Values 0: 0ms, 1: 500ms, 2: 1s, 3: 4s
+ register "PmConfigSlpSusMinAssert" = "0x03"
+
+ # SLP_A Minimum Assertion Width. Values 0: 0ms, 1: 4s, 2: 98ms, 3: 2s
+ register "PmConfigSlpAMinAssert" = "0x03"
+
+ # Determines if enable Serial IRQ. Values 0: Disabled, 1: Enabled
+ register "SerialIrqConfigSirqEnable" = "0x01"
+ register "SerialIrqConfigSirqMode" = "0x01"
+
+ # VR Settings Configuration for 5 Domains
+ #+----------------+-------+-------+-------------+-------------+-------+
+ #| Domain/Setting | SA | IA | Ring Sliced | GT Unsliced | GT |
+ #+----------------+-------+-------+-------------+-------------+-------+
+ #| Psi1Threshold | 20A | 20A | 20A | 20A | 20A |
+ #| Psi2Threshold | 4A | 5A | 5A | 5A | 5A |
+ #| Psi3Threshold | 1A | 1A | 1A | 1A | 1A |
+ #| Psi3Enable | 1 | 1 | 1 | 1 | 1 |
+ #| Psi4Enable | 1 | 1 | 1 | 1 | 1 |
+ #| ImonSlope | 0 | 0 | 0 | 0 | 0 |
+ #| ImonOffset | 0 | 0 | 0 | 0 | 0 |
+ #| IccMax | 7A | 34A | 34A | 35A | 35A |
+ #| VrVoltageLimit | 1.52V | 1.52V | 1.52V | 1.52V | 1.52V |
+ #+----------------+-------+-------+-------------+-------------+-------+
+ register "domain_vr_config[VR_SYSTEM_AGENT]" = "{
+ .vr_config_enable = 1, \
+ .psi1threshold = 0x50, \
+ .psi2threshold = 0x10, \
+ .psi3threshold = 0x4, \
+ .psi3enable = 1, \
+ .psi4enable = 1, \
+ .imon_slope = 0x0, \
+ .imon_offset = 0x0, \
+ .icc_max = 0x1C, \
+ .voltage_limit = 0x5F0 \
+ }"
+
+ register "domain_vr_config[VR_IA_CORE]" = "{
+ .vr_config_enable = 1, \
+ .psi1threshold = 0x50, \
+ .psi2threshold = 0x14, \
+ .psi3threshold = 0x4, \
+ .psi3enable = 1, \
+ .psi4enable = 1, \
+ .imon_slope = 0x0, \
+ .imon_offset = 0x0, \
+ .icc_max = 0x88, \
+ .voltage_limit = 0x5F0 \
+ }"
+
+ register "domain_vr_config[VR_GT_UNSLICED]" = "{
+ .vr_config_enable = 1, \
+ .psi1threshold = 0x50, \
+ .psi2threshold = 0x14, \
+ .psi3threshold = 0x4, \
+ .psi3enable = 1, \
+ .psi4enable = 1, \
+ .imon_slope = 0x0, \
+ .imon_offset = 0x0, \
+ .icc_max = 0x8C ,\
+ .voltage_limit = 0x5F0 \
+ }"
+
+ register "domain_vr_config[VR_GT_SLICED]" = "{
+ .vr_config_enable = 1, \
+ .psi1threshold = 0x50, \
+ .psi2threshold = 0x14, \
+ .psi3threshold = 0x4, \
+ .psi3enable = 1, \
+ .psi4enable = 1, \
+ .imon_slope = 0x0, \
+ .imon_offset = 0x0, \
+ .icc_max = 0x8C, \
+ .voltage_limit = 0x5F0 \
+ }"
+
+ # Skip coreboot MP Init
+ register "common_soc_config" = "{
+ .use_fsp_mp_init = 1,
+ }"
+
+ # Enable x1 slot
+ register "PcieRpEnable[7]" = "1"
+ register "PcieRpClkReqSupport[7]" = "1"
+ register "PcieRpClkReqNumber[7]" = "3" #uses SRCCLKREQ3
+
+ # Enable x4 slot
+ register "PcieRpEnable[8]" = "1"
+ register "PcieRpClkReqSupport[8]" = "1"
+ register "PcieRpClkReqNumber[8]" = "4" #uses SRCCLKREQ4
+
+ # Enable Root port 6 and 13.
+ register "PcieRpEnable[5]" = "1"
+ register "PcieRpEnable[12]" = "1"
+
+ # Enable CLKREQ#
+ register "PcieRpClkReqSupport[5]" = "1"
+ register "PcieRpClkReqSupport[12]" = "1"
+
+ # RP 6 uses SRCCLKREQ1# while RP `3 uses SRCCLKREQ2#
+ register "PcieRpClkReqNumber[5]" = "0"
+ register "PcieRpClkReqNumber[12]" = "1"
+
+ register "EnableLan" = "1"
+
+ # USB related
+ register "SsicPortEnable" = "1"
+
+ register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # OTG
+ register "usb2_ports[1]" = "USB2_PORT_MID(OC3)" # Touch Pad
+ register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # M.2 BT
+ register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # Touch Panel
+ register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # M.2 WWAN
+ register "usb2_ports[5]" = "USB2_PORT_MID(OC0)" # Front Panel
+ register "usb2_ports[6]" = "USB2_PORT_MID(OC0)" # Front Panel
+ register "usb2_ports[7]" = "USB2_PORT_MID(OC2)" # Stacked conn (lan + usb)
+ register "usb2_ports[8]" = "USB2_PORT_MID(OC2)" # Stacked conn (lan + usb)
+ register "usb2_ports[9]" = "USB2_PORT_MID(OC1)" # LAN MAGJACK
+ register "usb2_ports[10]" = "USB2_PORT_MID(OC1)" # LAN MAGJACK
+ register "usb2_ports[11]" = "USB2_PORT_MID(OC_SKIP)" # Finger print sensor
+ register "usb2_ports[12]" = "USB2_PORT_MID(OC4)" # USB 2 stack conn
+ register "usb2_ports[13]" = "USB2_PORT_MID(OC4)" # USB 2 stack conn
+
+ register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC5)" # OTG
+ register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # M.2 WWAN
+ register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC3)" # Flex
+ register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # IVCAM
+ register "usb3_ports[4]" = "USB3_PORT_DEFAULT(OC1)" # LAN MAGJACK
+ register "usb3_ports[5]" = "USB3_PORT_DEFAULT(OC0)" # Front Panel
+ register "usb3_ports[6]" = "USB3_PORT_DEFAULT(OC0)" # Front Panel
+ register "usb3_ports[7]" = "USB3_PORT_DEFAULT(OC2)" # Stack Conn
+ register "usb3_ports[8]" = "USB3_PORT_DEFAULT(OC2)" # Stack Conn
+ register "usb3_ports[9]" = "USB3_PORT_DEFAULT(OC1)" # LAN MAGJACK
+
+ register "i2c_voltage[4]" = "I2C_VOLTAGE_1V8" # I2C4 is 1.8V
+
+ # Must leave UART0 enabled or SD/eMMC will not work as PCI
+
+ register "pirqa_routing" = "0x0b"
+ register "pirqb_routing" = "0x0a"
+ register "pirqc_routing" = "0x0b"
+ register "pirqd_routing" = "0x0b"
+ register "pirqe_routing" = "0x0b"
+ register "pirqf_routing" = "0x0b"
+ register "pirqg_routing" = "0x0b"
+ register "pirqh_routing" = "0x0b"
+
+ register "PmTimerDisabled" = "0"
+
+ register "EnableSata" = "1"
+ register "SataSalpSupport" = "1"
+ register "SataPortsEnable" = "{ \
+ [0] = 1, \
+ [1] = 1, \
+ [2] = 1, \
+ [3] = 1, \
+ [4] = 1, \
+ [5] = 1, \
+ [6] = 1, \
+ [7] = 1, \
+ }"
+ register "SerialIoDevMode" = "{ \
+ [PchSerialIoIndexI2C0] = PchSerialIoPci, \
+ [PchSerialIoIndexI2C1] = PchSerialIoPci, \
+ [PchSerialIoIndexI2C2] = PchSerialIoPci, \
+ [PchSerialIoIndexI2C3] = PchSerialIoPci, \
+ [PchSerialIoIndexI2C4] = PchSerialIoPci, \
+ [PchSerialIoIndexI2C5] = PchSerialIoPci, \
+ [PchSerialIoIndexSpi0] = PchSerialIoPci, \
+ [PchSerialIoIndexSpi1] = PchSerialIoPci, \
+ [PchSerialIoIndexUart0] = PchSerialIoPci, \
+ [PchSerialIoIndexUart1] = PchSerialIoPci, \
+ [PchSerialIoIndexUart2] = PchSerialIoSkipInit, \
+ }"
+
+ # PL2 override 25W
+ register "tdp_pl2_override" = "25"
+
+ # Send an extra VR mailbox command for the PS4 exit issue
+ register "SendVrMbxCmd" = "2"
+
+ # Enable/Disable VMX feature
+ register "VmxEnable" = "0"
+ # Use default SD card detect GPIO configuration
+ #register "sdcard_cd_gpio_default" = "GPP_A7"
+
+ device cpu_cluster 0 on
+ device lapic 0 on end
+ end
+ device domain 0 on
+ device pci 00.0 on end # Host Bridge
+ device pci 02.0 on end # Integrated Graphics Device
+ device pci 14.0 on end # USB xHCI
+ device pci 14.1 off end # USB xDCI (OTG)
+ device pci 14.2 on end # Thermal Subsystem
+ device pci 15.0 on end # I2C #0
+ device pci 15.1 on end # I2C #1
+ device pci 15.2 on end # I2C #2
+ device pci 15.3 on end # I2C #3
+ device pci 16.0 on end # Management Engine Interface 1
+ device pci 16.1 off end # Management Engine Interface 2
+ device pci 16.2 off end # Management Engine IDE-R
+ device pci 16.3 off end # Management Engine KT Redirection
+ device pci 16.4 off end # Management Engine Interface 3
+ device pci 17.0 on end # SATA
+ device pci 19.0 on end # UART #2
+ device pci 19.1 on end # I2C #5
+ device pci 19.2 on end # I2C #4
+ device pci 1c.0 on end # PCI Express Port 1
+ device pci 1c.1 off end # PCI Express Port 2
+ device pci 1c.2 off end # PCI Express Port 3
+ device pci 1c.3 off end # PCI Express Port 4
+ device pci 1c.4 off end # PCI Express Port 5
+ device pci 1c.5 off end # PCI Express Port 6
+ device pci 1c.6 off end # PCI Express Port 7
+ device pci 1c.7 off end # PCI Express Port 8
+ device pci 1d.0 off end # PCI Express Port 9
+ device pci 1d.1 off end # PCI Express Port 10
+ device pci 1d.2 off end # PCI Express Port 11
+ device pci 1d.3 off end # PCI Express Port 12
+ device pci 1e.0 on end # UART #0
+ device pci 1e.1 on end # UART #1
+ device pci 1e.2 on end # GSPI #0
+ device pci 1e.3 on end # GSPI #1
+ device pci 1e.4 off end # eMMC
+ device pci 1e.5 off end # SDIO
+ device pci 1e.6 off end # SDCard
+ device pci 1f.0 on
+ end # LPC Interface
+ device pci 1f.1 on end # P2SB
+ device pci 1f.2 on end # Power Management Controller
+ device pci 1f.3 on end # Intel HDA
+ device pci 1f.4 on end # SMBus
+ device pci 1f.5 on end # PCH SPI
+ device pci 1f.6 on end # GbE
+ end
+end
diff --git a/src/mainboard/ocp/tiogapass/dsdt.asl b/src/mainboard/ocp/tiogapass/dsdt.asl
new file mode 100644
index 0000000..45d9a85
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/dsdt.asl
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2015 Google Inc.
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+DefinitionBlock(
+ "dsdt.aml",
+ "DSDT",
+ 0x05, // DSDT revision: ACPI v5.0
+ "COREv4", // OEM id
+ "COREBOOT", // OEM table id
+ 0x20110725 // OEM revision
+)
+{
+ // Some generic macros
+ #include <soc/intel/skylake/acpi/platform.asl>
+
+ // global NVS and variables
+ #include <soc/intel/skylake/acpi/globalnvs.asl>
+
+ // CPU
+ #include <soc/intel/skylake/acpi/cpu.asl>
+
+ Scope (\_SB) {
+ Device (PCI0)
+ {
+ #include <soc/intel/skylake/acpi/systemagent.asl>
+ #include <soc/intel/skylake/acpi/pch.asl>
+ }
+ }
+
+ // Chipset specific sleep states
+ #include <soc/intel/skylake/acpi/sleepstates.asl>
+
+ // Mainboard specific
+ #include "acpi/mainboard.asl"
+}
diff --git a/src/mainboard/ocp/tiogapass/gpio.h b/src/mainboard/ocp/tiogapass/gpio.h
new file mode 100644
index 0000000..f8db6cd
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/gpio.h
@@ -0,0 +1,183 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _GPIORVP8_H
+#define _GPIORVP8_H
+
+#include <soc/gpe.h>
+#include <soc/gpio.h>
+
+/* TCA6424A I/O Expander */
+#define IO_EXPANDER_BUS 4
+#define IO_EXPANDER_0_ADDR 0x22
+#define IO_EXPANDER_P0CONF 0x0C /* Port 0 conf offset */
+#define IO_EXPANDER_P0DOUT 0x04 /* Port 0 data offset */
+#define IO_EXPANDER_P1CONF 0x0D
+#define IO_EXPANDER_P1DOUT 0x05
+#define IO_EXPANDER_P2CONF 0x0E
+#define IO_EXPANDER_P2DOUT 0x06
+#define IO_EXPANDER_1_ADDR 0x23
+
+/* GPE_EC_WAKE */
+#define GPE_EC_WAKE GPE0_LAN_WAK
+#define EC_SMI_GPI GPP_I3
+
+/*
+ * Gpio based irq for touchpad, 18th index in North Bank
+ * MAX_DIRECT_IRQ + GPSW_SIZE + 19
+ */
+#define KBLRVP_TOUCHPAD_IRQ 33
+
+#define KBLRVP_TOUCH_IRQ 31
+
+#define BOARD_TOUCHPAD_NAME "touchpad"
+#define BOARD_TOUCHPAD_IRQ KBLRVP_TOUCHPAD_IRQ
+#define BOARD_TOUCHPAD_I2C_BUS 0
+#define BOARD_TOUCHPAD_I2C_ADDR 0x20
+
+#define BOARD_TOUCHSCREEN_NAME "touchscreen"
+#define BOARD_TOUCHSCREEN_IRQ KBLRVP_TOUCH_IRQ
+#define BOARD_TOUCHSCREEN_I2C_BUS 0
+#define BOARD_TOUCHSCREEN_I2C_ADDR 0x4c
+
+#ifndef __ACPI__
+
+/* Pad configuration in ramstage. */
+static const struct pad_config gpio_table[] = {
+/* EC_PCH_RCIN */ PAD_CFG_NF(GPP_A0, NONE, DEEP, NF3),
+/* EC_LPC_IO0 */ PAD_CFG_NF(GPP_A1, 20K_PU, DEEP, NF3),
+/* EC_LPC_IO1*/ PAD_CFG_NF(GPP_A2, 20K_PU, DEEP, NF3),
+/* EC_LPC_IO2 */ PAD_CFG_NF(GPP_A3, 20K_PU, DEEP, NF3),
+/* EC_LPC_IO3 */ PAD_CFG_NF(GPP_A4, 20K_PU, DEEP, NF3),
+/* LPC_FRAME */ PAD_CFG_NF(GPP_A5, NONE, DEEP, NF3),
+/* LPC_SERIRQ */ PAD_CFG_NF(GPP_A6, NONE, DEEP, NF3),
+/* PIRQAB */ PAD_CFG_GPI(GPP_A7, NONE, DEEP),
+/* LPC_CLKRUN */ PAD_CFG_NF(GPP_A8, NONE, DEEP, NF1),
+/* EC_LPC_CLK */ PAD_CFG_NF(GPP_A9, NONE, DEEP, NF3),
+/* PCH_LPC_CLK */ PAD_CFG_NF(GPP_A10, 20K_PD, DEEP, NF1),
+/* PMEB */ PAD_CFG_GPI(GPP_A11, NONE, DEEP),
+/* SUS_PWR_ACK_R */ PAD_CFG_NF(GPP_A13, NONE, DEEP, NF1),
+/* PM_SUS_ESPI_RST */ PAD_CFG_NF(GPP_A14, NONE, DEEP, NF3),
+/* PCH_SUSACK */ PAD_CFG_NF(GPP_A15, 20K_PU, DEEP, NF1),
+/* BT_RF_KILL */ PAD_CFG_GPO(GPP_B3, 1, DEEP),
+/* EXTTS_SNI_DRV1 */ PAD_CFG_NF(GPP_B4, NONE, DEEP, NF1),
+/* SRCCLKREQ0# */ PAD_CFG_GPI_ACPI_SCI(GPP_B5, NONE, DEEP, YES),
+/* PM_SLP_S0 */ PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
+/* PCH_PLT_RST */ PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
+/* GPP_B_14_SPKR */ PAD_CFG_NF(GPP_B14, 20K_PD, DEEP, NF1),
+/* GSPI0_MISO */ PAD_CFG_GPO(GPP_B17, 1, DEEP),
+/* PCHHOTB */ PAD_CFG_NF(GPP_B23, 20K_PD, DEEP, NF2),
+/* SMB_CLK */ PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1),
+/* SMB_DATA */ PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1),
+/* SMBALERT# */ PAD_CFG_GPO(GPP_C2, 1, DEEP),
+/* SML0_CLK */ PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1),
+/* SML0_DATA */ PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1),
+/* SML1_CLK */ PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1),
+/* SML1_DATA */ PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1),
+/* UART0_RXD */ PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
+/* UART0_TXD */ PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
+/* UART0_RTS_N */ PAD_CFG_NF(GPP_C10, NONE, DEEP, NF1),
+/* UART0_CTS_N */ PAD_CFG_NF(GPP_C11, NONE, DEEP, NF1),
+/* GD_UART2_RXD */ PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1),
+/* GD_UART2_TXD */ PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1),
+/* UART2_RTS_N */ PAD_CFG_NF(GPP_C22, NONE, DEEP, NF1),
+/* UART2_CTS_N */ PAD_CFG_NF(GPP_C23, NONE, DEEP, NF1),
+/* SSP0_SFRM */ PAD_CFG_NF(GPP_D5, NONE, DEEP, NF1),
+/* SSP0_TXD */ PAD_CFG_NF(GPP_D6, NONE, DEEP, NF1),
+/* SSP0_RXD */ PAD_CFG_NF(GPP_D7, NONE, DEEP, NF1),
+/* SSP0_SCLK */ PAD_CFG_NF(GPP_D8, NONE, DEEP, NF1),
+/* SATAE_IFDET */ PAD_CFG_NF(GPP_E0, 20K_PU, DEEP, NF1),
+/* SATAE_IFDET */ PAD_CFG_NF(GPP_E1, 20K_PU, DEEP, NF1),
+/* CPU_GP0 */ PAD_CFG_NF(GPP_E3, NONE, DEEP, NF1),
+/* SSD_SATA_DEVSLP */ PAD_CFG_NF(GPP_E4, NONE, DEEP, NF1),
+/* SATALED# */ PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1),
+/* USB2_OC_0 */ PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1),
+/* USB2_OC_1 */ PAD_CFG_NF(GPP_E10, NONE, DEEP, NF1),
+/* USB2_OC_2 */ PAD_CFG_NF(GPP_E11, NONE, DEEP, NF1),
+/* USB2_OC_3 */ PAD_CFG_NF(GPP_E12, NONE, DEEP, NF1),
+/* SATAXPCIE_4 */ PAD_CFG_NF(GPP_F1, 20K_PU, DEEP,NF1),
+/* SATA_DEVSLP_3 */ PAD_CFG_GPI_ACPI_SCI(GPP_F5, NONE, DEEP, YES),
+/* SATA_DEVSLP_4 */ PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1),
+/* SATA_SCLOCK */ PAD_CFG_GPI_APIC(GPP_F10, NONE, DEEP),
+/* SATA_SLOAD */ PAD_CFG_GPI(GPP_F11, NONE, DEEP),
+/* SATA_SDATAOUT1 */ PAD_CFG_GPI_APIC(GPP_F12, NONE, DEEP),
+/* SATA_SDATAOUT0 */ PAD_CFG_GPI_APIC(GPP_F13, NONE, DEEP),
+/* H_SKTOCC_N */ PAD_CFG_GPI_APIC(GPP_F14, NONE, DEEP),
+/* USB_OC4_R_N */ PAD_CFG_NF(GPP_F15, NONE, DEEP, NF1),
+/* USB_OC5_R_N */ PAD_CFG_NF(GPP_F16, NONE, DEEP, NF1),
+/* USB_OC6_R_N */ PAD_CFG_NF(GPP_F17, NONE, DEEP, NF1),
+/* USB_OC7_R_N */ PAD_CFG_GPO(GPP_F18, 1, DEEP),
+/* GPIO_PEG_RESET */ PAD_CFG_GPO(GPP_F22, 1, DEEP),
+/* VCORE_VBOOST_CTRL */ PAD_CFG_GPO(GPP_F23, 0, DEEP),
+/* FAN_TACH_0 */ PAD_CFG_GPO(GPP_G0, 1, DEEP),
+/* FAN_TACH_1 */ PAD_CFG_GPO(GPP_G1, 1, DEEP),
+/* FAN_TACH_2 */ PAD_CFG_GPI_ACPI_SCI(GPP_G2, NONE, DEEP, YES),
+/* FAN_TACH_3 */ PAD_CFG_GPI_ACPI_SCI(GPP_G3, NONE, DEEP, YES),
+/* FAN_TACH_4 */ PAD_CFG_GPO(GPP_G4, 1, DEEP),
+/* FAN_TACH_5 */ PAD_CFG_GPI_APIC(GPP_G5, NONE, DEEP),
+/* FAN_TACH_6 */ PAD_CFG_GPI_ACPI_SCI(GPP_G6, NONE, DEEP, YES),
+/* FAN_TACH_7 */ PAD_CFG_GPO(GPP_G7, 1, DEEP),
+/* GSXDOUT */ PAD_CFG_GPI_ACPI_SCI(GPP_G12, 20K_PD, DEEP, YES),
+/* GSXSLOAD */ PAD_CFG_GPO(GPP_G13, 1, DEEP),
+/* GSXDIN */ PAD_CFG_GPI_ACPI_SCI(GPP_G14, NONE, DEEP, YES),
+/* GSXSRESETB */ PAD_CFG_GPO(GPP_G15, 0, DEEP),
+/* GSXCLK */ PAD_CFG_GPO(GPP_G16, 0, DEEP),
+/* NMIB */ PAD_CFG_GPI_APIC(GPP_G18, NONE, DEEP),
+/* SMIB */ PAD_CFG_NF(GPP_G19, NONE, DEEP, NF1),
+/* TEST_SETUP_MENU */ PAD_CFG_GPI_APIC(GPP_G20, NONE, DEEP),
+/* P_INTF_N */ PAD_CFG_GPI_ACPI_SCI(GPP_G21, NONE, DEEP, YES),
+/* PCH_PEGSLOT1 */ PAD_CFG_GPO(GPP_G22, 1, DEEP),
+/* IVCAM_DFU_R */ PAD_CFG_GPO(GPP_G23, 1, DEEP),
+/* SRCCLKREQB_8 */ PAD_CFG_NF(GPP_H2, NONE, DEEP, NF1),
+/* SML2CLK */ PAD_CFG_GPI(GPP_H10, NONE, DEEP),
+/* SML2DATA */ PAD_CFG_GPI(GPP_H11, NONE, DEEP),
+/* SML3CLK */ PAD_CFG_GPI_APIC(GPP_H13, NONE, DEEP),
+/* SML3DATA */ PAD_CFG_GPI_APIC(GPP_H14, NONE, DEEP),
+/* SML3ALERTB */ PAD_CFG_GPI_APIC(GPP_H15, NONE, DEEP),
+/* SML4DATA */ PAD_CFG_GPO(GPP_H17, 1, DEEP),
+/* LED_DRIVE */ PAD_CFG_GPO(GPP_H23, 0, DEEP),
+/* DDSP_HPD_0 */ PAD_CFG_NF(GPP_I0, NONE, DEEP, NF1),
+/* DDSP_HPD_1 */ PAD_CFG_NF(GPP_I1, NONE, DEEP, NF1),
+/* DDSP_HPD_2 */ PAD_CFG_NF(GPP_I2, NONE, DEEP, NF1),
+/* DDSP_HPD_1 */ PAD_CFG_GPI_ACPI_SMI(GPP_I3, NONE, DEEP, YES),
+/* DDPB_CTRLCLK */ PAD_CFG_NF(GPP_I5, NONE, DEEP, NF1),
+/* DDPB_CTRLDATA */ PAD_CFG_NF(GPP_I6, 20K_PD, DEEP, NF1),
+/* DDPC_CTRLCLK */ PAD_CFG_NF(GPP_I7, NONE, DEEP, NF1),
+/* DDPC_CTRLDATA */ PAD_CFG_NF(GPP_I8, 20K_PD, DEEP, NF1),
+/* DDPD_CTRLCLK */ PAD_CFG_NF(GPP_I9, NONE, DEEP, NF1),
+/* DDPD_CTRLDATA */ PAD_CFG_NF(GPP_I10, 20K_PD, DEEP, NF1),
+/* EC_PCH_ACPRESENT */ PAD_CFG_GPO(GPD1, 0, DEEP),
+/* EC_PCH_WAKE */ PAD_CFG_NF(GPD2, NONE, DEEP, NF1),
+/* PM_PWRBTN_R_N */ PAD_CFG_NF(GPD3, 20K_PU, DEEP, NF1),
+/* PM_SLP_S3# */ PAD_CFG_NF(GPD4, NONE, DEEP, NF1),
+/* PM_SLP_S4# */ PAD_CFG_NF(GPD5, NONE, DEEP, NF1),
+/* PM_SLP_SA# */ PAD_CFG_NF(GPD6, NONE, DEEP, NF1),
+/* USB_WAKEOUT_N */ PAD_CFG_NF(GPD7, NONE, DEEP, NF1),
+/* PM_SUSCLK */ PAD_CFG_NF(GPD8, NONE, DEEP, NF1),
+/* PCH_SLP_WLAN# */ PAD_CFG_NF(GPD9, NONE, DEEP, NF1),
+/* PM_SLP_S5# */ PAD_CFG_NF(GPD10, NONE, DEEP, NF1),
+/* LANPHYC */ PAD_CFG_NF(GPD11, NONE, DEEP, NF1),
+
+};
+
+/* Early pad configuration in romstage. */
+static const struct pad_config early_gpio_table[] = {
+/* UART0_RXD */ PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
+/* UART0_TXD */ PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
+};
+
+
+#endif
+#endif
diff --git a/src/mainboard/ocp/tiogapass/pei_data.c b/src/mainboard/ocp/tiogapass/pei_data.c
new file mode 100644
index 0000000..ac4ce95
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/pei_data.c
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ * Copyright (C) 2015 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <soc/pei_data.h>
+#include <soc/pei_wrapper.h>
+#include "spd/spd.h"
+
+void mainboard_fill_pei_data(struct pei_data *pei_data)
+{
+ mainboard_fill_dq_map_data(&pei_data->dq_map);
+ mainboard_fill_dqs_map_data(&pei_data->dqs_map);
+ mainboard_fill_rcomp_res_data(&pei_data->RcompResistor);
+ mainboard_fill_rcomp_strength_data(&pei_data->RcompTarget);
+}
diff --git a/src/mainboard/ocp/tiogapass/ramstage.c b/src/mainboard/ocp/tiogapass/ramstage.c
new file mode 100644
index 0000000..6fef017
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/ramstage.c
@@ -0,0 +1,67 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <bootstate.h>
+#include <console/console.h>
+#include <device/i2c_simple.h>
+#include <soc/ramstage.h>
+#include "gpio.h"
+
+void mainboard_silicon_init_params(FSP_SIL_UPD *params)
+{
+ /* Configure pads prior to SiliconInit() in case there's any
+ * dependencies during hardware initialization. */
+ gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
+// params->CdClock = 3;
+
+ /* Enable Virtual Channel 1 */
+// params->PchHdaVcType = 0x1;
+}
+
+static void ioexpander_init(void *unused)
+{
+ printk(BIOS_DEBUG, "Programming TCA6424A I/O expander\n");
+
+ /* I/O Expander 1, Port 0 Data */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_0_ADDR, IO_EXPANDER_P0DOUT,
+ 0xF7);
+ /* Port 0 Configuration */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_0_ADDR, IO_EXPANDER_P0CONF,
+ 0xE0);
+
+ /* Port 1 Data */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_0_ADDR, IO_EXPANDER_P1DOUT,
+ 0x9E);
+ /* Port 1 Configuration */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_0_ADDR, IO_EXPANDER_P1CONF,
+ 0x8C);
+
+ /* Port 2 Data */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_0_ADDR, IO_EXPANDER_P2DOUT,
+ 0xDA);
+ /* Port 2 Configuration */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_0_ADDR, IO_EXPANDER_P2CONF,
+ 0x08);
+
+ /* I/O Expander 2, Port 0 Data */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_1_ADDR, IO_EXPANDER_P0DOUT,
+ 0xFF);
+ /* Port 0 Configuration */
+ i2c_writeb(IO_EXPANDER_BUS, IO_EXPANDER_1_ADDR, IO_EXPANDER_P0CONF,
+ 0x00);
+
+}
+
+BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_EXIT, ioexpander_init, NULL);
diff --git a/src/mainboard/ocp/tiogapass/romstage.c b/src/mainboard/ocp/tiogapass/romstage.c
new file mode 100644
index 0000000..230cc50
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/romstage.c
@@ -0,0 +1,71 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/byteorder.h>
+#include <cbfs.h>
+#include <console/console.h>
+#include <fsp/api.h>
+#include <gpio.h>
+#include "gpio.h"
+#include <soc/romstage.h>
+#include <soc/gpio.h>
+#include "spd/spd.h"
+#include <string.h>
+#include <spd_bin.h>
+#include "board_id.h"
+
+
+void mainboard_memory_init_params(FSPM_UPD *mupd)
+{
+ FSPM_CONFIG *mem_cfg;
+ mem_cfg = &mupd->FspmConfig;
+ u8 spd_index = (get_board_id() >> 5) & 0x7;
+
+ printk(BIOS_INFO, "SPD index %d\n", spd_index);
+/*
+ mainboard_fill_dq_map_data(&mem_cfg->DqByteMapCh0);
+ mainboard_fill_dqs_map_data(&mem_cfg->DqsMapCpu2DramCh0);
+ mainboard_fill_rcomp_res_data(&mem_cfg->RcompResistor);
+ mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
+*/
+ if (IS_ENABLED(CONFIG_BOARD_INTEL_KBLRVP3)) {
+ struct region_device spd_rdev;
+
+// mem_cfg->DqPinsInterleaved = 0;
+ if (get_spd_cbfs_rdev(&spd_rdev, spd_index) < 0)
+ die("spd.bin not found\n");
+// mem_cfg->MemorySpdDataLen = region_device_sz(&spd_rdev);
+ /* Memory leak is ok since we have memory mapped boot media */
+// mem_cfg->MemorySpdPtr00 = (uintptr_t)rdev_mmap_full(&spd_rdev);
+ } else { /* CONFIG_BOARD_INTEL_KBLRVP7 and CONFIG_BOARD_INTEL_KBLRVP8 */
+ struct spd_block blk = {
+ .addr_map = { 0x50, 0x51, 0x52, 0x53, },
+ };
+
+// mem_cfg->DqPinsInterleaved = 1;
+ get_spd_smbus(&blk);
+// mem_cfg->MemorySpdDataLen = blk.len;
+// mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
+// mem_cfg->MemorySpdPtr10 = (uintptr_t)blk.spd_array[2];
+ if (IS_ENABLED(CONFIG_BOARD_INTEL_KBLRVP8)) {
+// mem_cfg->MemorySpdPtr01 = (uintptr_t)blk.spd_array[1];
+// mem_cfg->MemorySpdPtr11 = (uintptr_t)blk.spd_array[3];
+ }
+
+ }
+// mupd->FspmTestConfig.DmiVc1 = 1;
+// if (IS_ENABLED(CONFIG_BOARD_INTEL_KBLRVP8))
+// mem_cfg->UserBd = BOARD_TYPE_DESKTOP;
+}
diff --git a/src/mainboard/ocp/tiogapass/spd/Makefile.inc b/src/mainboard/ocp/tiogapass/spd/Makefile.inc
new file mode 100644
index 0000000..721736d
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/spd/Makefile.inc
@@ -0,0 +1,17 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2014 Google Inc.
+## Copyright (C) 2015 Intel Corporation.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+romstage-y += spd_util.c
diff --git a/src/mainboard/ocp/tiogapass/spd/spd.h b/src/mainboard/ocp/tiogapass/spd/spd.h
new file mode 100644
index 0000000..a5f1af3
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/spd/spd.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ * Copyright (C) 2015 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef MAINBOARD_SPD_H
+#define MAINBOARD_SPD_H
+
+#define RCOMP_TARGET_PARAMS 0x5
+
+void mainboard_fill_dq_map_data(void *dq_map_ptr);
+void mainboard_fill_dqs_map_data(void *dqs_map_ptr);
+void mainboard_fill_rcomp_res_data(void *rcomp_ptr);
+void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr);
+
+#endif
diff --git a/src/mainboard/ocp/tiogapass/spd/spd_util.c b/src/mainboard/ocp/tiogapass/spd/spd_util.c
new file mode 100644
index 0000000..2c26d78
--- /dev/null
+++ b/src/mainboard/ocp/tiogapass/spd/spd_util.c
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <stdint.h>
+#include <string.h>
+#include <soc/pei_data.h>
+#include <soc/pei_wrapper.h>
+#include "spd.h"
+
+void mainboard_fill_dq_map_data(void *dq_map_ptr)
+{
+ /* DQ byte map */
+ const u8 dq_map[2][12] = {
+ { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
+ 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
+ { 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC,
+ 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00 } };
+ memcpy(dq_map_ptr, dq_map, sizeof(dq_map));
+}
+
+void mainboard_fill_dqs_map_data(void *dqs_map_ptr)
+{
+ /* DQS CPU<>DRAM map */
+ const u8 dqs_map[2][8] = {
+ { 0, 1, 3, 2, 4, 5, 6, 7 },
+ { 1, 0, 4, 5, 2, 3, 6, 7 } };
+ memcpy(dqs_map_ptr, dqs_map, sizeof(dqs_map));
+}
+
+void mainboard_fill_rcomp_res_data(void *rcomp_ptr)
+{
+ /* Rcomp resistor */
+ const u16 RcompResistor[3] = { 121, 81, 100 };
+ memcpy(rcomp_ptr, RcompResistor, sizeof(RcompResistor));
+}
+
+void mainboard_fill_rcomp_strength_data(void *rcomp_strength_ptr)
+{
+ /* Rcomp target */
+ static const u16 RcompTarget[RCOMP_TARGET_PARAMS] = {
+ 100, 40, 20, 20, 26 };
+ memcpy(rcomp_strength_ptr, RcompTarget, sizeof(RcompTarget));
+}
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index 506a041..f1f03d7 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -20,6 +20,7 @@
select ARCH_RAMSTAGE_X86_32
select ARCH_ROMSTAGE_X86_32
select ARCH_VERSTAGE_X86_32
+ select BOOTBLOCK_CONSOLE
select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if BOOT_DEVICE_SPI_FLASH
select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS
@@ -28,43 +29,40 @@
select COMMON_FADT
select CPU_INTEL_FIRMWARE_INTERFACE_TABLE
select C_ENVIRONMENT_BOOTBLOCK
- select FSP_M_XIP if MAINBOARD_USES_FSP2_0
- select FSP_T_XIP if FSP_CAR
select GENERIC_GPIO_LIB
select HAVE_FSP_GOP
- select INTEL_DESCRIPTOR_MODE_CAPABLE
+ select HAVE_INTEL_FIRMWARE
select HAVE_MONOTONIC_TIMER
select HAVE_SMI_HANDLER
- select INTEL_CAR_NEM_ENHANCED
select INTEL_GMA_ACPI
select IOAPIC
select MRC_SETTINGS_PROTECT
select NO_FIXED_XIP_ROM_SIZE
select PARALLEL_MP
select PARALLEL_MP_AP_WORK
+ select PCIEXP_ASPM
+ select PCIEXP_CLK_PM
+ select PCIEXP_COMMON_CLOCK
+ select PCIEXP_L1_SUB_STATE
select PCIEX_LENGTH_64MB
select REG_SCRIPT
+ select RTC
select SA_ENABLE_DPR
select SMM_TSEG
select SMP
- select PMC_GLOBAL_RESET_ENABLE_LOCK
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_BLOCK
- select SOC_INTEL_COMMON_BLOCK_CAR
select SOC_INTEL_COMMON_BLOCK_CHIP_CONFIG
select SOC_INTEL_COMMON_BLOCK_CPU
select SOC_INTEL_COMMON_BLOCK_CPU_MPINIT
- select SOC_INTEL_COMMON_BLOCK_GPIO_DUAL_ROUTE_SUPPORT
select SOC_INTEL_COMMON_BLOCK_GPIO_LEGACY_MACROS
select SOC_INTEL_COMMON_BLOCK_GPIO_PADCFG_PADTOL
select SOC_INTEL_COMMON_BLOCK_GSPI
- select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_SA
select SOC_INTEL_COMMON_BLOCK_SGX
select SOC_INTEL_COMMON_BLOCK_SMM
select SOC_INTEL_COMMON_BLOCK_SMM_IO_TRAP
- select SOC_INTEL_COMMON_BLOCK_UART
select SOC_INTEL_COMMON_BLOCK_VMX
select SOC_INTEL_COMMON_PCH_BASE
select SOC_INTEL_COMMON_NHLT
@@ -76,10 +74,6 @@
select TSC_SYNC_MFENCE
select UDELAY_TSC
-config CPU_INTEL_NUM_FIT_ENTRIES
- int
- default 10
-
config MAINBOARD_USES_FSP2_0
bool
default n
@@ -88,7 +82,7 @@
def_bool y
depends on MAINBOARD_USES_FSP2_0
select PLATFORM_USES_FSP2_0
- select UDK_2015_BINDING
+ select UDK_2017_BINDING
select INTEL_GMA_ADD_VBT if RUN_FSP_GOP
select POSTCAR_CONSOLE
select POSTCAR_STAGE
@@ -98,7 +92,6 @@
depends on !MAINBOARD_USES_FSP2_0
select PLATFORM_USES_FSP1_1
select DISPLAY_FSP_ENTRY_POINTS
- select SKIP_FSP_CAR
config CHROMEOS
select CHROMEOS_RAMOOPS_DYNAMIC
@@ -112,6 +105,10 @@
select VBOOT_VBNV_CMOS
select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
+config BOOTBLOCK_RESETS
+ string
+ default "soc/intel/common/reset.c"
+
config CBFS_SIZE
hex
default 0x200000
@@ -124,6 +121,10 @@
hex
default 0xfef00000
+config BOOTBLOCK_CPU_INIT
+ string
+ default "soc/intel/skylake/bootblock/bootblock.c"
+
config DCACHE_RAM_SIZE
hex
default 0x40000
@@ -162,6 +163,10 @@
help
This option allows you to select MMIO Base Address of sideband bus.
+config SERIAL_CPU_INIT
+ bool
+ default n
+
config SERIRQ_CONTINUOUS_MODE
bool
default n
@@ -181,12 +186,31 @@
string
default "8086,0406"
+config UART_DEBUG
+ bool "Enable UART debug port."
+ default y
+ select CONSOLE_SERIAL
+ select DRIVERS_UART_8250MEM_32
+ select NO_UART_ON_SUPERIO
+
+config UART_FOR_CONSOLE
+ int "Index for LPSS UART port to use for console"
+ default 2 if DRIVERS_UART_8250MEM
+ default 0
+ help
+ Index for LPSS UART port to use for console:
+ 0 = LPSS UART0, 1 = LPSS UART1, 2 = LPSS UART2
+
config SKYLAKE_SOC_PCH_H
bool
default n
help
Choose this option if you have a PCH-H chipset.
+config CHIPSET_BOOTBLOCK_INCLUDE
+ string
+ default "soc/intel/skylake/bootblock/timestamp.inc"
+
config NHLT_DMIC_2CH
bool
default n
@@ -247,19 +271,37 @@
help
Include DSP firmware settings for DA7219 headset codec.
-config FSP_HEADER_PATH
- string "Location of FSP headers"
- depends on MAINBOARD_USES_FSP2_0
- # Use KabylakeFsp for both Skylake and Kabylake as it supports both.
- # SkylakeFsp is FSP 1.1 and therefore incompatible.
- default "3rdparty/fsp/KabylakeFspBinPkg/Include/" if SOC_INTEL_SKYLAKE
- default "3rdparty/fsp/KabylakeFspBinPkg/Include/" if SOC_INTEL_KABYLAKE
+choice
+ prompt "Cache-as-ram implementation"
+ default USE_SKYLAKE_CAR_NEM_ENHANCED
+ help
+ This option allows you to select how cache-as-ram (CAR) is set up.
-config FSP_FD_PATH
- string
- depends on FSP_USE_REPO
- default "3rdparty/fsp/KabylakeFspBinPkg/Fsp.fd" if SOC_INTEL_SKYLAKE
- default "3rdparty/fsp/KabylakeFspBinPkg/Fsp.fd" if SOC_INTEL_KABYLAKE
+config USE_SKYLAKE_CAR_NEM_ENHANCED
+ bool "Enhanced Non-evict mode"
+ select SOC_INTEL_COMMON_BLOCK_CAR
+ select INTEL_CAR_NEM_ENHANCED
+ help
+ A current limitation of NEM (Non-Evict mode) is that code and data
+ sizes are derived from the requirement to not write out any modified
+ cache line. With NEM, if there is no physical memory behind the
+ cached area, the modified data will be lost and NEM results will be
+ inconsistent. ENHANCED NEM guarantees that modified data is always
+ kept in cache while clean data is replaced.
+
+config USE_SKYLAKE_FSP_CAR
+ bool "Use FSP CAR"
+ select FSP_CAR
+ help
+ Use FSP APIs to initialize and tear down the Cache-As-Ram.
+
+endchoice
+
+config SKIP_FSP_CAR
+ bool "Skip cache as RAM setup in FSP"
+ default y
+ help
+ Skip Cache as RAM setup in FSP.
config SPI_FLASH_INCLUDE_ALL_DRIVERS
bool
diff --git a/src/soc/intel/skylake/Makefile.inc b/src/soc/intel/skylake/Makefile.inc
index ee2c928..c5451e6 100644
--- a/src/soc/intel/skylake/Makefile.inc
+++ b/src/soc/intel/skylake/Makefile.inc
@@ -2,7 +2,6 @@
subdirs-y += nhlt
subdirs-y += romstage
-subdirs-y += ../../../cpu/intel/common
subdirs-y += ../../../cpu/intel/microcode
subdirs-y += ../../../cpu/intel/turbo
subdirs-y += ../../../cpu/x86/lapic
@@ -11,7 +10,6 @@
subdirs-y += ../../../cpu/x86/tsc
bootblock-y += bootblock/bootblock.c
-bootblock-$(CONFIG_FSP_CAR) += fspcar.c
bootblock-y += bootblock/cpu.c
bootblock-y += i2c.c
bootblock-y += bootblock/pch.c
@@ -22,13 +20,13 @@
bootblock-y += pmutil.c
bootblock-y += spi.c
bootblock-y += lpc.c
-bootblock-y += uart.c
+bootblock-$(CONFIG_UART_DEBUG) += uart.c
verstage-y += gspi.c
verstage-y += pmutil.c
verstage-y += i2c.c
verstage-y += spi.c
-verstage-y += uart.c
+verstage-$(CONFIG_UART_DEBUG) += uart.c
romstage-y += gpio.c
romstage-y += gspi.c
@@ -40,7 +38,7 @@
romstage-y += pmutil.c
romstage-$(CONFIG_PLATFORM_USES_FSP2_0) += reset.c
romstage-y += spi.c
-romstage-y += uart.c
+romstage-$(CONFIG_UART_DEBUG) += uart.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-$(CONFIG_PLATFORM_USES_FSP1_1) += chip.c
@@ -67,33 +65,22 @@
ramstage-y += spi.c
ramstage-y += systemagent.c
ramstage-y += thermal.c
-ramstage-y += uart.c
-ramstage-y += vr_config.c
+ramstage-$(CONFIG_UART_DEBUG) += uart.c
+//ramstage-y += vr_config.c
smm-y += elog.c
smm-y += gpio.c
smm-y += p2sb.c
smm-y += pmutil.c
smm-y += smihandler.c
-smm-y += uart.c
+smm-$(CONFIG_UART_DEBUG) += uart.c
postcar-y += memmap.c
postcar-y += gspi.c
postcar-y += spi.c
-postcar-y += i2c.c
-postcar-y += uart.c
+postcar-$(CONFIG_UART_DEBUG) += uart.c
-
-# Skylake D0
-cpu_microcode_bins += 3rdparty/blobs/cpu/intel/model_406ex/microcode.bin
-# Skylake H Q0
-cpu_microcode_bins += 3rdparty/blobs/cpu/intel/model_506ex/microcode.bin
-# Kabylake H0, Y0
-cpu_microcode_bins += 3rdparty/blobs/cpu/intel/model_806ex/microcode.bin
-# Kabylake HB0
-cpu_microcode_bins += 3rdparty/blobs/cpu/intel/model_906ex/microcode.bin
-# Missing for Skylake C0 (0x406e2), Kabylake G0 (0x406e8), Kabylake HA0 (0x506e8)
-# since those are probably pre-release samples.
+# cpu_microcode_bins += ???
CPPFLAGS_common += -I$(src)/soc/intel/skylake
CPPFLAGS_common += -I$(src)/soc/intel/skylake/include
@@ -103,6 +90,7 @@
CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp1_1/skylake
else
CPPFLAGS_common += -I$(src)/soc/intel/skylake/include/fsp20
+CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp2_0/skykabylake
endif
# Currently used for microcode path.
diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c
index 3ade8d7..020dea3 100644
--- a/src/soc/intel/skylake/chip_fsp20.c
+++ b/src/soc/intel/skylake/chip_fsp20.c
@@ -20,12 +20,16 @@
#include <fsp/api.h>
#include <arch/acpi.h>
#include <arch/io.h>
+#include <chip.h>
+#include <compiler.h>
+#include <bootstate.h>
#include <console/console.h>
#include <device/device.h>
+#include <device/pci.h>
#include <device/pci_ids.h>
+#include <fsp/api.h>
#include <fsp/util.h>
#include <intelblocks/chip.h>
-#include <intelblocks/itss.h>
#include <intelblocks/xdci.h>
#include <intelpch/lockdown.h>
#include <romstage_handoff.h>
@@ -34,7 +38,6 @@
#include <soc/interrupt.h>
#include <soc/iomap.h>
#include <soc/irq.h>
-#include <soc/itss.h>
#include <soc/pci_devs.h>
#include <soc/ramstage.h>
#include <soc/systemagent.h>
@@ -165,16 +168,8 @@
void soc_init_pre_device(void *chip_info)
{
- /* Snapshot the current GPIO IRQ polarities. FSP is setting a
- * default policy that doesn't honor boards' requirements. */
- itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
-
/* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume());
-
- /* Restore GPIO IRQ polarities back to previous settings. */
- itss_restore_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
-
/* swap enabled PCI ports in device tree if needed */
pcie_override_devicetree_after_silicon_init();
}
@@ -227,8 +222,9 @@
/* UPD parameters to be initialized before SiliconInit */
void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
{
- FSP_S_CONFIG *params = &supd->FspsConfig;
- FSP_S_TEST_CONFIG *tconfig = &supd->FspsTestConfig;
+ FSPS_CONFIG *params = &supd->FspsConfig;
+#if 0
+// FSP_S_TEST_CONFIG *tconfig = &supd->FspsTestConfig;
static struct soc_intel_skylake_config *config;
uintptr_t vbt_data = (uintptr_t)vbt_get();
int i;
@@ -244,14 +240,14 @@
/* Set PsysPmax if it is available from DT */
if (config->psys_pmax) {
/* PsysPmax is in unit of 1/8 Watt */
- tconfig->PsysPmax = config->psys_pmax * 8;
- printk(BIOS_DEBUG, "psys_pmax = %d\n", tconfig->PsysPmax);
+// tconfig->PsysPmax = config->psys_pmax * 8;
+// printk(BIOS_DEBUG, "psys_pmax = %d\n", tconfig->PsysPmax);
}
- params->GraphicsConfigPtr = (u32) vbt_data;
+// params->GraphicsConfigPtr = (u32) vbt_data;
for (i = 0; i < ARRAY_SIZE(config->usb2_ports); i++) {
- params->PortUsb20Enable[i] =
+/* params->PortUsb20Enable[i] =
config->usb2_ports[i].enable;
params->Usb2OverCurrentPin[i] =
config->usb2_ports[i].ocpin;
@@ -295,6 +291,7 @@
sizeof(params->PcieRpLtrEnable));
memcpy(params->PcieRpHotPlug, config->PcieRpHotPlug,
sizeof(params->PcieRpHotPlug));
+*/
/*
* PcieRpClkSrcNumber UPD is set to clock source number(0-6) for
@@ -341,15 +338,6 @@
params->ScsEmmcHs400Enabled = config->ScsEmmcHs400Enabled;
params->ScsSdCardEnabled = config->ScsSdCardEnabled;
- if (!!params->ScsEmmcHs400Enabled && !!config->EmmcHs400DllNeed) {
- params->PchScsEmmcHs400DllDataValid =
- !!config->EmmcHs400DllNeed;
- params->PchScsEmmcHs400RxStrobeDll1 =
- config->ScsEmmcHs400RxStrobeDll1;
- params->PchScsEmmcHs400TxDataDll =
- config->ScsEmmcHs400TxDataDll;
- }
-
/* If ISH is enabled, enable ISH elements */
dev = dev_find_slot(0, PCH_DEVFN_ISH);
if (dev)
@@ -365,20 +353,18 @@
params->SataMode = config->SataMode;
params->SataSpeedLimit = config->SataSpeedLimit;
params->SataPwrOptEnable = config->SataPwrOptEnable;
- params->EnableTcoTimer = !config->PmTimerDisabled;
- tconfig->PchLockDownGlobalSmi = config->LockDownConfigGlobalSmi;
- tconfig->PchLockDownRtcLock = config->LockDownConfigRtcLock;
- tconfig->PowerLimit4 = config->PowerLimit4;
+// tconfig->PchLockDownGlobalSmi = config->LockDownConfigGlobalSmi;
+// tconfig->PchLockDownRtcLock = config->LockDownConfigRtcLock;
/*
* To disable HECI, the Psf needs to be left unlocked
* by FSP till end of post sequence. Based on the devicetree
* setting, we set the appropriate PsfUnlock policy in FSP,
* do the changes and then lock it back in coreboot during finalize.
*/
- tconfig->PchSbAccessUnlock = (config->HeciEnabled == 0) ? 1 : 0;
+// tconfig->PchSbAccessUnlock = (config->HeciEnabled == 0) ? 1 : 0;
if (get_lockdown_config() == CHIPSET_LOCKDOWN_COREBOOT) {
- tconfig->PchLockDownBiosInterface = 0;
+// tconfig->PchLockDownBiosInterface = 0;
params->PchLockDownBiosLock = 0;
params->PchLockDownSpiEiss = 0;
/*
@@ -390,17 +376,8 @@
*/
params->SpiFlashCfgLockDown = 0;
}
- /* only replacing preexisting subsys ID defaults when non-zero */
- if (CONFIG_SUBSYSTEM_VENDOR_ID != 0) {
- params->DefaultSvid = CONFIG_SUBSYSTEM_VENDOR_ID;
- params->PchSubSystemVendorId = CONFIG_SUBSYSTEM_VENDOR_ID;
- }
-
- if (CONFIG_SUBSYSTEM_DEVICE_ID != 0) {
- params->DefaultSid = CONFIG_SUBSYSTEM_DEVICE_ID;
- params->PchSubSystemId = CONFIG_SUBSYSTEM_DEVICE_ID;
- }
-
+ params->PchSubSystemVendorId = config->PchConfigSubSystemVendorId;
+ params->PchSubSystemId = config->PchConfigSubSystemId;
params->PchPmWolEnableOverride = config->WakeConfigWolEnableOverride;
params->PchPmPcieWakeFromDeepSx = config->WakeConfigPcieWakeFromDeepSx;
params->PchPmDeepSxPol = config->PmConfigDeepSxPol;
@@ -467,13 +444,13 @@
params->FastPkgCRampDisableSa = config->FastPkgCRampDisableSa;
/* Enable PMC XRAM read */
- tconfig->PchPmPmcReadDisable = config->PchPmPmcReadDisable;
+// tconfig->PchPmPmcReadDisable = config->PchPmPmcReadDisable;
/* Enable/Disable EIST */
- tconfig->Eist = config->eist_enable;
+// tconfig->Eist = config->eist_enable;
/* Set TccActivationOffset */
- tconfig->TccActivationOffset = config->tcc_offset;
+// tconfig->TccActivationOffset = config->tcc_offset;
/* Enable VT-d and X2APIC */
if (!config->ignore_vtd && soc_is_vtd_capable()) {
@@ -487,12 +464,13 @@
params->PchIoApicDeviceNumber = 31;
params->PchIoApicFunctionNumber = 0;
}
+#endif
soc_irq_settings(params);
}
/* Mainboard GPIO Configuration */
-__weak void mainboard_silicon_init_params(FSP_S_CONFIG *params)
+__weak void mainboard_silicon_init_params(FSPS_CONFIG *params)
{
printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
}
diff --git a/src/soc/intel/skylake/include/fsp20/soc/ramstage.h b/src/soc/intel/skylake/include/fsp20/soc/ramstage.h
index e75b350..820e517 100644
--- a/src/soc/intel/skylake/include/fsp20/soc/ramstage.h
+++ b/src/soc/intel/skylake/include/fsp20/soc/ramstage.h
@@ -22,10 +22,10 @@
#include <fsp/api.h>
#include <fsp/util.h>
-#define FSP_SIL_UPD FSP_S_CONFIG
-#define FSP_MEM_UPD FSP_M_CONFIG
+#define FSP_SIL_UPD FSPS_CONFIG
+#define FSP_MEM_UPD FSPM_CONFIG
-void mainboard_silicon_init_params(FSP_S_CONFIG *params);
+void mainboard_silicon_init_params(FSPS_CONFIG *params);
void soc_fsp_load(void);
void soc_init_pre_device(void *chip_info);
void soc_irq_settings(FSP_SIL_UPD *params);
diff --git a/src/soc/intel/skylake/irq.c b/src/soc/intel/skylake/irq.c
index 7b3e1bd..d26bd84 100644
--- a/src/soc/intel/skylake/irq.c
+++ b/src/soc/intel/skylake/irq.c
@@ -22,6 +22,7 @@
#include <soc/irq.h>
#include <string.h>
+#if 0
static const SI_PCH_DEVICE_INTERRUPT_CONFIG devintconfig[] = {
/*
* cAVS(Audio, Voice, Speech), INTA is default, programmed in
@@ -216,23 +217,26 @@
DEVICE_INT_CONFIG(PCH_DEV_SLOT_ISH,
PCI_FUNC(PCH_DEVFN_ISH), int_A, ISH_IRQ)
};
+#endif
void soc_irq_settings(FSP_SIL_UPD *params)
{
- uint32_t i, intdeventry;
+ uint32_t i;
+// uint32_t i, intdeventry;
u8 irq_config[PCH_MAX_IRQ_CONFIG];
- const struct device *dev = dev_find_slot(0, PCH_DEVFN_LPC);
- const struct soc_intel_skylake_config *config = dev->chip_info;
+// const struct device *dev = dev_find_slot(0, PCH_DEVFN_LPC);
+// const struct soc_intel_skylake_config *config = dev->chip_info;
/* Get Device Int Count */
- intdeventry = ARRAY_SIZE(devintconfig);
+// intdeventry = ARRAY_SIZE(devintconfig);
/* update irq table */
- memcpy((SI_PCH_DEVICE_INTERRUPT_CONFIG *)
+/* memcpy((SI_PCH_DEVICE_INTERRUPT_CONFIG *)
(params->DevIntConfigPtr), devintconfig, intdeventry *
sizeof(SI_PCH_DEVICE_INTERRUPT_CONFIG));
params->NumOfDevIntConfig = intdeventry;
+*/
/* PxRC to IRQ programming */
for (i = 0; i < PCH_MAX_IRQ_CONFIG; i++) {
switch (i) {
@@ -250,13 +254,15 @@
break;
}
}
- memcpy(params->PxRcConfig, irq_config, PCH_MAX_IRQ_CONFIG);
+// memcpy(params->PxRcConfig, irq_config, PCH_MAX_IRQ_CONFIG);
/* GPIO IRQ Route The valid values is 14 or 15 */
- if (config->GpioIrqSelect == 0)
+/* if (config->GpioIrqSelect == 0)
params->GpioIrqRoute = GPIO_IRQ14;
else
params->GpioIrqRoute = config->GpioIrqSelect;
+*/
/* SCI IRQ Select The valid values is 9, 10, 11 and 20 21, 22, 23 */
+#if 0
if (config->SciIrqSelect == 0)
params->SciIrqSelect = SCI_IRQ9;
else
@@ -268,6 +274,7 @@
params->TcoIrqSelect = config->TcoIrqSelect;
/* TCO Irq enable/disable */
params->TcoIrqEnable = config->TcoIrqEnable;
+#endif
}
/*
diff --git a/src/soc/intel/skylake/romstage/romstage_fsp20.c b/src/soc/intel/skylake/romstage/romstage_fsp20.c
index 2a60158..48f3429 100644
--- a/src/soc/intel/skylake/romstage/romstage_fsp20.c
+++ b/src/soc/intel/skylake/romstage/romstage_fsp20.c
@@ -18,6 +18,7 @@
#include <arch/io.h>
#include <arch/symbols.h>
#include <assert.h>
+#include <compiler.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/msr.h>
#include <cbmem.h>
@@ -37,6 +38,7 @@
#include <string.h>
#include <timestamp.h>
#include <security/vboot/vboot_common.h>
+#include <MemInfoHob.h>
#define FSP_SMBIOS_MEMORY_INFO_GUID \
{ \
@@ -101,18 +103,18 @@
if (src_dimm->Status != DIMM_PRESENT)
continue;
- switch (memory_info_hob->MemoryType) {
+ switch(memory_info_hob->MemoryType) {
case MRC_DDR_TYPE_DDR4:
- ddr_type = MEMORY_TYPE_DDR4;
+ ddr_type = MEMORY_DEVICE_DDR4;
break;
case MRC_DDR_TYPE_DDR3:
- ddr_type = MEMORY_TYPE_DDR3;
+ ddr_type = MEMORY_DEVICE_DDR3;
break;
case MRC_DDR_TYPE_LPDDR3:
- ddr_type = MEMORY_TYPE_LPDDR3;
+ ddr_type = MEMORY_DEVICE_LPDDR3;
break;
default:
- ddr_type = MEMORY_TYPE_UNKNOWN;
+ ddr_type = MEMORY_DEVICE_UNKNOWN;
break;
}
@@ -190,19 +192,19 @@
run_postcar_phase(&pcf);
}
-static void cpu_flex_override(FSP_M_CONFIG *m_cfg)
+static void cpu_flex_override(FSPM_CONFIG *m_cfg)
{
msr_t flex_ratio;
- m_cfg->CpuRatioOverride = 1;
+// m_cfg->CpuRatioOverride = 1;
/*
* Set cpuratio to that value set in bootblock, This will ensure FSPM
* knows the intended flex ratio.
*/
flex_ratio = rdmsr(MSR_FLEX_RATIO);
- m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff;
+// m_cfg->CpuRatio = (flex_ratio.lo >> 8) & 0xff;
}
-static void soc_memory_init_params(FSP_M_CONFIG *m_cfg,
+static void soc_memory_init_params(FSPM_CONFIG *m_cfg,
const struct soc_intel_skylake_config *config)
{
int i;
@@ -215,31 +217,30 @@
* With the default stolen size of 32MB(-8MB) there is not enough space
* for FBC to work with a high resolution panel.
*/
- m_cfg->IgdDvmt50PreAlloc = 2;
- m_cfg->MmioSize = 0x800; /* 2GB in MB */
- m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE;
- m_cfg->IedSize = CONFIG_IED_REGION_SIZE;
- m_cfg->ProbelessTrace = config->ProbelessTrace;
- m_cfg->SaGv = config->SaGv;
- m_cfg->UserBd = BOARD_TYPE_ULT_ULX;
- m_cfg->RMT = config->Rmt;
- m_cfg->CmdTriStateDis = config->CmdTriStateDis;
- m_cfg->DdrFreqLimit = config->DdrFreqLimit;
- m_cfg->VmxEnable = config->VmxEnable;
- m_cfg->PrmrrSize = config->PrmrrSize;
+// m_cfg->IgdDvmt50PreAlloc = 2;
+// m_cfg->MmioSize = 0x800; /* 2GB in MB */
+// m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE;
+// m_cfg->IedSize = CONFIG_IED_REGION_SIZE;
+// m_cfg->ProbelessTrace = config->ProbelessTrace;
+// m_cfg->SaGv = config->SaGv;
+// m_cfg->UserBd = BOARD_TYPE_ULT_ULX;
+// m_cfg->RMT = config->Rmt;
+// m_cfg->DdrFreqLimit = config->DdrFreqLimit;
+// m_cfg->VmxEnable = config->VmxEnable;
+// m_cfg->PrmrrSize = config->PrmrrSize;
for (i = 0; i < ARRAY_SIZE(config->PcieRpEnable); i++) {
if (config->PcieRpEnable[i])
mask |= (1<<i);
}
- m_cfg->PcieRpEnableMask = mask;
+// m_cfg->PcieRpEnableMask = mask;
cpu_flex_override(m_cfg);
if (!config->ignore_vtd) {
- m_cfg->PchHpetBdfValid = 1;
- m_cfg->PchHpetBusNumber = 250;
- m_cfg->PchHpetDeviceNumber = 15;
- m_cfg->PchHpetFunctionNumber = 0;
+// m_cfg->PchHpetBdfValid = 1;
+// m_cfg->PchHpetBusNumber = 250;
+// m_cfg->PchHpetDeviceNumber = 15;
+// m_cfg->PchHpetFunctionNumber = 0;
}
}
@@ -247,8 +248,8 @@
{
const struct device *dev;
const struct soc_intel_skylake_config *config;
- FSP_M_CONFIG *m_cfg = &mupd->FspmConfig;
- FSP_M_TEST_CONFIG *m_t_cfg = &mupd->FspmTestConfig;
+ FSPM_CONFIG *m_cfg = &mupd->FspmConfig;
+// FSPM_TEST_CONFIG *m_t_cfg = &mupd->FspmTestConfig;
dev = dev_find_slot(0, PCI_DEVFN(PCH_DEV_SLOT_LPC, 0));
config = dev->chip_info;
@@ -256,43 +257,43 @@
soc_memory_init_params(m_cfg, config);
/* Skip creating Management Engine MBP HOB */
- m_t_cfg->SkipMbpHob = 0x01;
+// m_t_cfg->SkipMbpHob = 0x01;
/* Enable DMI Virtual Channel for ME */
- m_t_cfg->DmiVcm = 0x01;
+// m_t_cfg->DmiVcm = 0x01;
/* Enable Sending DID to ME */
- m_t_cfg->SendDidMsg = 0x01;
- m_t_cfg->DidInitStat = 0x01;
+// m_t_cfg->SendDidMsg = 0x01;
+// m_t_cfg->DidInitStat = 0x01;
/* DCI and TraceHub configs */
- m_t_cfg->PchDciEn = config->PchDciEn;
- m_cfg->EnableTraceHub = config->EnableTraceHub;
- m_cfg->TraceHubMemReg0Size = config->TraceHubMemReg0Size;
- m_cfg->TraceHubMemReg1Size = config->TraceHubMemReg1Size;
+// m_t_cfg->PchDciEn = config->PchDciEn;
+// m_cfg->EnableTraceHub = config->EnableTraceHub;
+// m_cfg->TraceHubMemReg0Size = config->TraceHubMemReg0Size;
+// m_cfg->TraceHubMemReg1Size = config->TraceHubMemReg1Size;
/* Enable SMBus controller based on config */
- m_cfg->SmbusEnable = config->SmbusEnable;
+// m_cfg->SmbusEnable = config->SmbusEnable;
mainboard_memory_init_params(mupd);
}
-void soc_update_memory_params_for_mma(FSP_M_CONFIG *memory_cfg,
+void soc_update_memory_params_for_mma(FSPM_CONFIG *memory_cfg,
struct mma_config_param *mma_cfg)
{
/* Boot media is memory mapped for Skylake and Kabylake (SPI). */
assert(IS_ENABLED(CONFIG_BOOT_DEVICE_MEMORY_MAPPED));
- memory_cfg->MmaTestContentPtr =
- (uintptr_t) rdev_mmap_full(&mma_cfg->test_content);
- memory_cfg->MmaTestContentSize =
- region_device_sz(&mma_cfg->test_content);
- memory_cfg->MmaTestConfigPtr =
- (uintptr_t) rdev_mmap_full(&mma_cfg->test_param);
- memory_cfg->MmaTestConfigSize =
- region_device_sz(&mma_cfg->test_param);
- memory_cfg->MrcFastBoot = 0x00;
- memory_cfg->SaGv = 0x02;
+// memory_cfg->MmaTestContentPtr =
+// (uintptr_t) rdev_mmap_full(&mma_cfg->test_content);
+// memory_cfg->MmaTestContentSize =
+// region_device_sz(&mma_cfg->test_content);
+// memory_cfg->MmaTestConfigPtr =
+// (uintptr_t) rdev_mmap_full(&mma_cfg->test_param);
+// memory_cfg->MmaTestConfigSize =
+// region_device_sz(&mma_cfg->test_param);
+// memory_cfg->MrcFastBoot = 0x00;
+// memory_cfg->SaGv = 0x02;
}
__weak void mainboard_memory_init_params(FSPM_UPD *mupd)
diff --git a/src/soc/intel/skylake/vr_config.c b/src/soc/intel/skylake/vr_config.c
index 4508fda..9266330 100644
--- a/src/soc/intel/skylake/vr_config.c
+++ b/src/soc/intel/skylake/vr_config.c
@@ -56,7 +56,7 @@
* | IccMax(AML-Y) | 4.1A | 28A | 24A | 24A |
* +----------------+-------------+---------------+------+-----+
*/
-
+#if 0
static const struct {
uint16_t icc_max[NUM_VR_DOMAINS];
}sku_icc_max_mapping[] = {
@@ -167,12 +167,13 @@
.voltage_limit = 1520,
},
};
+#endif
static uint16_t get_dev_id(struct device *dev)
{
return pci_read_config16(dev, PCI_DEVICE_ID);
}
-
+#if 0
static int get_kbl_sku(void)
{
static int sku = -1;
@@ -201,7 +202,6 @@
sku = -2;
return sku;
}
-
static uint16_t get_sku_icc_max(int domain, uint16_t board_icc_max)
{
/* If board provided non-zero value, use it. */
@@ -229,7 +229,7 @@
cfg = chip_cfg;
else
cfg = &default_configs[domain];
-
+/*
vr_params->VrConfigEnable[domain] = cfg->vr_config_enable;
vr_params->Psi1Threshold[domain] = cfg->psi1threshold;
vr_params->Psi2Threshold[domain] = cfg->psi2threshold;
@@ -240,9 +240,10 @@
vr_params->ImonOffset[domain] = cfg->imon_offset;
vr_params->IccMax[domain] = get_sku_icc_max(domain, cfg->icc_max);
vr_params->VrVoltageLimit[domain] = cfg->voltage_limit;
-
+*/
#if IS_ENABLED(CONFIG_PLATFORM_USES_FSP2_0)
- vr_params->AcLoadline[domain] = cfg->ac_loadline;
- vr_params->DcLoadline[domain] = cfg->dc_loadline;
+// vr_params->AcLoadline[domain] = cfg->ac_loadline;
+// vr_params->DcLoadline[domain] = cfg->dc_loadline;
#endif
}
+#endif
diff --git a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/DebugSupport.h b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/DebugSupport.h
index 6983469..af0950f 100644
--- a/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/DebugSupport.h
+++ b/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/DebugSupport.h
@@ -605,7 +605,7 @@
UINT64 ELR; // Exception Link Register
UINT64 SPSR; // Saved Processor Status Register
UINT64 FPSR; // Floating Point Status Register
- UINT64 ESR; // Exception syndrome register
+// UINT64 ESR; // Exception syndrome register
UINT64 FAR; // Fault Address Register
} EFI_SYSTEM_CONTEXT_AARCH64;
diff --git a/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FirmwareVersionInfoHob.h b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FirmwareVersionInfoHob.h
new file mode 100644
index 0000000..fca01e9
--- /dev/null
+++ b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FirmwareVersionInfoHob.h
@@ -0,0 +1,67 @@
+/** @file
+ Header file for Firmware Version Information
+
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials are licensed and made available under
+ the terms and conditions of the BSD License which accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _FIRMWARE_VERSION_INFO_HOB_H_
+#define _FIRMWARE_VERSION_INFO_HOB_H_
+
+#include <Uefi/UefiMultiPhase.h>
+#include <Pi/PiBootMode.h>
+#include <Pi/PiHob.h>
+
+#pragma pack(1)
+///
+/// Firmware Version Structure
+///
+typedef struct {
+ UINT8 MajorVersion;
+ UINT8 MinorVersion;
+ UINT8 Revision;
+ UINT16 BuildNumber;
+} FIRMWARE_VERSION;
+
+///
+/// Firmware Version Information Structure
+///
+typedef struct {
+ UINT8 ComponentNameIndex; ///< Offset 0 Index of Component Name
+ UINT8 VersionStringIndex; ///< Offset 1 Index of Version String
+ FIRMWARE_VERSION Version; ///< Offset 2-6 Firmware version
+} FIRMWARE_VERSION_INFO;
+
+#ifndef __SMBIOS_STANDARD_H__
+///
+/// The Smbios structure header.
+///
+typedef struct {
+ UINT8 Type;
+ UINT8 Length;
+ UINT16 Handle;
+} SMBIOS_STRUCTURE;
+#endif
+
+///
+/// Firmware Version Information HOB Structure
+///
+typedef struct {
+ EFI_HOB_GUID_TYPE Header; ///< Offset 0-23 The header of FVI HOB
+ SMBIOS_STRUCTURE SmbiosData; ///< Offset 24-27 The SMBIOS header of FVI HOB
+ UINT8 Count; ///< Offset 28 Number of FVI elements included.
+///
+/// FIRMWARE_VERSION_INFO structures followed by the null terminated string buffer
+///
+} FIRMWARE_VERSION_INFO_HOB;
+#pragma pack()
+
+#endif // _FIRMWARE_VERSION_INFO_HOB_H_
diff --git a/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspUpd.h b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspUpd.h
new file mode 100644
index 0000000..cf543fe
--- /dev/null
+++ b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspUpd.h
@@ -0,0 +1,48 @@
+/** @file
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+ This file is automatically generated. Please do NOT modify !!!
+
+**/
+
+#ifndef __FSPUPD_H__
+#define __FSPUPD_H__
+
+#include <FspEas.h>
+
+#pragma pack(1)
+
+#define FSPT_UPD_SIGNATURE 0x545F445055434F53 /* 'SOCUPD_T' */
+
+#define FSPM_UPD_SIGNATURE 0x4D5F445055434F53 /* 'SOCUPD_M' */
+
+#define FSPS_UPD_SIGNATURE 0x535F445055434F53 /* 'SOCUPD_S' */
+
+#pragma pack()
+
+#endif
diff --git a/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspmUpd.h b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspmUpd.h
new file mode 100644
index 0000000..a66b3306
--- /dev/null
+++ b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspmUpd.h
@@ -0,0 +1,248 @@
+/** @file
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+ This file is automatically generated. Please do NOT modify !!!
+
+**/
+
+#ifndef __FSPMUPD_H__
+#define __FSPMUPD_H__
+
+#include <FspUpd.h>
+
+#pragma pack(1)
+
+
+/** FSP-M Configuration
+**/
+typedef struct {
+
+/** Offset 0x0040 - Tseg Size
+ Size of SMRAM memory reserved.
+ 2:2 MB, 4:4 MB, 8:8 MB, 16:16 MB
+**/
+ UINT8 PcdSmmTsegSize;
+
+/** Offset 0x0041 - FSP Debug Print Level
+ Select the FSP debug message print level.
+ 0:NO DEBUG, 1:MIN DEBUG, 2:MED DEBUG, 3:VERBOSE DEBUG
+**/
+ UINT8 PcdFspDebugPrintErrorLevel;
+
+/** Offset 0x0042 - Channel 0 DIMM 0 SPD SMBus Address
+ SPD SMBus Address of each DIMM slot.
+**/
+ UINT8 PcdSpdSmbusAddress_0_0;
+
+/** Offset 0x0043 - Channel 0 DIMM 1 SPD SMBus Address
+ SPD SMBus Address of each DIMM slot.
+**/
+ UINT8 PcdSpdSmbusAddress_0_1;
+
+/** Offset 0x0044 - Channel 1 DIMM 0 SPD SMBus Address
+ SPD SMBus Address of each DIMM slot.
+**/
+ UINT8 PcdSpdSmbusAddress_1_0;
+
+/** Offset 0x0045 - Channel 1 DIMM 1 SPD SMBus Address
+ SPD SMBus Address of each DIMM slot.
+**/
+ UINT8 PcdSpdSmbusAddress_1_1;
+
+/** Offset 0x0046 - Enable Rank Margin Tool
+ Enable/disable Rank Margin Tool.
+ $EN_DIS
+**/
+ UINT8 PcdMrcRmtSupport;
+
+/** Offset 0x0047 - RMT CPGC exp_loop_cnt
+ Set the CPGC exp_loop_cnt field for RMT execution 2^(exp_loop_cnt -1).
+ 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10, 11:11, 12:12, 13:13, 14:14, 15:15
+**/
+ UINT8 PcdMrcRmtCpgcExpLoopCntValue;
+
+/** Offset 0x0048 - RMT CPGC num_bursts
+ Set the CPGC num_bursts field for RMT execution 2^(num_bursts -1).
+ 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10, 11:11, 12:12, 13:13, 14:14, 15:15
+**/
+ UINT8 PcdMrcRmtCpgcNumBursts;
+
+/** Offset 0x0049 - Preserve Memory Across Reset
+ Enable/disable memory preservation across reset.
+ $EN_DIS
+**/
+ UINT8 PcdMemoryPreservation;
+
+/** Offset 0x004A - Fast Boot
+ Enable/disable Fast Boot function. Once enabled, all following boots will use the
+ presaved MRC data to improve the boot performance.
+ $EN_DIS
+**/
+ UINT8 PcdFastBoot;
+
+/** Offset 0x004B - ECC Support
+ Enable/disable ECC Support.
+ $EN_DIS
+**/
+ UINT8 PcdEccSupport;
+
+/** Offset 0x004C - HSUART Device
+ Select the PCI High Speed UART Device for Serial Port.
+ 0:HSUART0, 1:HSUART1, 2:HSUART2
+**/
+ UINT8 PcdHsuartDevice;
+
+/** Offset 0x004D - Memory Down
+ Enable/disable Memory Down function.
+ $EN_DIS
+**/
+ UINT8 PcdMemoryDown;
+
+/** Offset 0x004E
+**/
+ UINT32 PcdMemoryDownConfigPtr;
+
+/** Offset 0x0052 - SATA Controller 0
+ Enable/disable SATA Controller 0.
+ $EN_DIS
+**/
+ UINT8 PcdEnableSATA0;
+
+/** Offset 0x0053 - SATA Controller 1
+ Enable/disable SATA Controller 1.
+ $EN_DIS
+**/
+ UINT8 PcdEnableSATA1;
+
+/** Offset 0x0054 - Intel Quick Assist Technology
+ Enable/disable Intel Quick Assist Technology.
+ $EN_DIS
+**/
+ UINT8 PcdEnableIQAT;
+
+/** Offset 0x0055 - SPD Write Disable
+ Select SMBus SPD Write Enable State (Default: 0 = [FORCE_ENABLE], 1 = [FORCE_DISABLE])
+ 0:Force Enable, 1:Force Disable
+**/
+ UINT8 PcdSmbusSpdWriteDisable;
+
+/** Offset 0x0056 - ME_SHUTDOWN Message
+ Enable/Disable sending ME_SHUTDOWN message to ME, refer to FSP Integration Guide
+ for details.
+ $EN_DIS
+**/
+ UINT8 PcdEnableMeShutdown;
+
+/** Offset 0x0057 - XHCI Controller
+ Enable / Disable XHCI controller
+ $EN_DIS
+**/
+ UINT8 PcdEnableXhci;
+
+/** Offset 0x0058 - Memory Frequency
+ Set DDR Memory Frequency, refer to FSP Integration Guide for details..
+ 15:Auto, 3:1600, 4:1866, 5:2133, 6:2400
+**/
+ UINT8 PcdDdrFreq;
+
+/** Offset 0x0059 - MMIO Size
+ Set memory mapped IO space size
+ 0:2048M, 1:1024M, 2:3072M
+**/
+ UINT8 PcdMmioSize;
+
+/** Offset 0x005A
+**/
+ UINT8 UnusedUpdSpace0[6];
+
+/** Offset 0x0060 - Customer Revision
+ The Customer can set this revision string for their own purpose.
+**/
+ UINT8 PcdCustomerRevision[32];
+
+/** Offset 0x0080 - 32-Bit bus mode
+ Enable/Disable 32-Bit bus memory mode.
+ $EN_DIS
+**/
+ UINT8 PcdHalfWidthEnable;
+
+/** Offset 0x0081 - TCL Performance
+ Enable/Disable Tcl timing for performance.
+ $EN_DIS
+**/
+ UINT8 PcdTclIdle;
+
+/** Offset 0x0082 - Interleave Mode
+ Select Interleave Mode
+ 0:DISABLED, 1:MODE0, 2:MODE1, 3:MODE2
+**/
+ UINT8 PcdInterleaveMode;
+
+/** Offset 0x0083 - Memory Thermal Throttling
+ Enable/disable Memory Thermal Throttling management mode
+ $EN_DIS
+**/
+ UINT8 PcdMemoryThermalThrottling;
+
+/** Offset 0x0084
+**/
+ UINT8 UnusedUpdSpace1[348];
+
+/** Offset 0x01E0
+**/
+ UINT8 ReservedMemoryInitUpd[16];
+} FSPM_CONFIG;
+
+/** Fsp M UPD Configuration
+**/
+typedef struct {
+
+/** Offset 0x0000
+**/
+ FSP_UPD_HEADER FspUpdHeader;
+
+/** Offset 0x0020
+**/
+ FSPM_ARCH_UPD FspmArchUpd;
+
+/** Offset 0x0040
+**/
+ FSPM_CONFIG FspmConfig;
+
+/** Offset 0x01F0
+**/
+ UINT8 UnusedUpdSpace2[14];
+
+/** Offset 0x01FE
+**/
+ UINT16 UpdTerminator;
+} FSPM_UPD;
+
+#pragma pack()
+
+#endif
diff --git a/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspsUpd.h b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspsUpd.h
new file mode 100644
index 0000000..5d0b793
--- /dev/null
+++ b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FspsUpd.h
@@ -0,0 +1,192 @@
+/** @file
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+ This file is automatically generated. Please do NOT modify !!!
+
+**/
+
+#ifndef __FSPSUPD_H__
+#define __FSPSUPD_H__
+
+#include <FspUpd.h>
+
+#pragma pack(1)
+
+
+/** FSP-S Configuration
+**/
+typedef struct {
+
+/** Offset 0x0020 - PCIe Controller 0 Bifurcation
+ Configure PCI Express controller 0 bifurcation.
+ 0:X2X2X2X2, 1:X2X2X4, 2:X4X2X2, 3:X4X4, 4:X8
+**/
+ UINT8 PcdBifurcationPcie0;
+
+/** Offset 0x0021 - PCIe Controller 1 Bifurcation
+ Configure PCI Express controller 1 bifurcation.
+ 0:X2X2X2X2, 1:X2X2X4, 2:X4X2X2, 3:X4X4, 4:X8
+**/
+ UINT8 PcdBifurcationPcie1;
+
+/** Offset 0x0022 - Active Core Count
+ Select # of Active Cores (Default: 0, 0:ALL, 1..15 = 1..15 Cores)
+ 0:ALL, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10, 11:11, 12:12, 13:13,
+ 14:14, 15:15
+**/
+ UINT8 PcdActiveCoreCount;
+
+/** Offset 0x0023
+**/
+ UINT32 PcdCpuMicrocodePatchBase;
+
+/** Offset 0x0027
+**/
+ UINT32 PcdCpuMicrocodePatchSize;
+
+/** Offset 0x002B - PCIe Controller 0
+ Enable / Disable PCI Express controller 0
+ $EN_DIS
+**/
+ UINT8 PcdEnablePcie0;
+
+/** Offset 0x002C - PCIe Controller 1
+ Enable / Disable PCI Express controller 1
+ $EN_DIS
+**/
+ UINT8 PcdEnablePcie1;
+
+/** Offset 0x002D - Embedded Multi-Media Controller (eMMC)
+ Enable / Disable Embedded Multi-Media controller
+ $EN_DIS
+**/
+ UINT8 PcdEnableEmmc;
+
+/** Offset 0x002E - LAN Controllers
+ Enable / Disable LAN controllers, refer to FSP Integration Guide for details.
+ 0:Disable LAN 0 & LAN 1, 1:Enable LAN 0 & LAN 1, 2:Disable LAN 1 only
+**/
+ UINT8 PcdEnableGbE;
+
+/** Offset 0x002F
+**/
+ UINT32 PcdFiaMuxConfigRequestPtr;
+
+/** Offset 0x0033
+**/
+ UINT8 UnusedUpdSpace0[4];
+
+/** Offset 0x0037 - PCIe Root Port 0 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort0DeEmphasis;
+
+/** Offset 0x0038 - PCIe Root Port 1 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort1DeEmphasis;
+
+/** Offset 0x0039 - PCIe Root Port 2 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort2DeEmphasis;
+
+/** Offset 0x003A - PCIe Root Port 3 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort3DeEmphasis;
+
+/** Offset 0x003B - PCIe Root Port 4 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort4DeEmphasis;
+
+/** Offset 0x003C - PCIe Root Port 5 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort5DeEmphasis;
+
+/** Offset 0x003D - PCIe Root Port 6 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort6DeEmphasis;
+
+/** Offset 0x003E - PCIe Root Port 7 DeEmphasis
+ Desired DeEmphasis level for PCIE root port
+ 0:6dB, 1:3.5dB
+**/
+ UINT8 PcdPcieRootPort7DeEmphasis;
+
+/** Offset 0x003F
+**/
+ UINT8 UnusedUpdSpace1;
+
+/** Offset 0x0040
+**/
+ UINT32 PcdEMMCDLLConfigPtr;
+
+/** Offset 0x0044
+**/
+ UINT8 UnusedUpdSpace2[156];
+
+/** Offset 0x00E0
+**/
+ UINT8 ReservedSiliconInitUpd[16];
+} FSPS_CONFIG;
+
+/** Fsp S UPD Configuration
+**/
+typedef struct {
+
+/** Offset 0x0000
+**/
+ FSP_UPD_HEADER FspUpdHeader;
+
+/** Offset 0x0020
+**/
+ FSPS_CONFIG FspsConfig;
+
+/** Offset 0x00F0
+**/
+ UINT8 UnusedUpdSpace3[14];
+
+/** Offset 0x00FE
+**/
+ UINT16 UpdTerminator;
+} FSPS_UPD;
+
+#pragma pack()
+
+#endif
diff --git a/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FsptUpd.h b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FsptUpd.h
new file mode 100644
index 0000000..340f144
--- /dev/null
+++ b/src/vendorcode/intel/fsp/fsp2_0/skykabylake/FsptUpd.h
@@ -0,0 +1,109 @@
+/** @file
+
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+ This file is automatically generated. Please do NOT modify !!!
+
+**/
+
+#ifndef __FSPTUPD_H__
+#define __FSPTUPD_H__
+
+#include <FspUpd.h>
+
+#pragma pack(1)
+
+
+/** FSP-T Core UPD
+**/
+typedef struct {
+
+/** Offset 0x0020
+**/
+ UINT32 MicrocodeRegionBase;
+
+/** Offset 0x0024
+**/
+ UINT32 MicrocodeRegionLength;
+
+/** Offset 0x0028
+**/
+ UINT32 CodeRegionBase;
+
+/** Offset 0x002C
+**/
+ UINT32 CodeRegionLength;
+
+/** Offset 0x0030
+**/
+ UINT8 Reserved1[16];
+} FSPT_CORE_UPD;
+
+/** FSP-T Configuration
+**/
+typedef struct {
+
+/** Offset 0x0040 - Disable Port80 output in FSP-T
+ Select Port80 Control in FSP-T (0:VPD-Style, 1:Enable Port80 Output, 2:Disable Port80
+ Output, refer to FSP Integration Guide for details
+ 0:VPD-Style, 1:Enable Port80 Output[Default], 2:Disable Port80 Output
+**/
+ UINT8 PcdFsptPort80RouteDisable;
+
+/** Offset 0x0041
+**/
+ UINT8 ReservedTempRamInitUpd[31];
+} FSPT_CONFIG;
+
+/** Fsp T UPD Configuration
+**/
+typedef struct {
+
+/** Offset 0x0000
+**/
+ FSP_UPD_HEADER FspUpdHeader;
+
+/** Offset 0x0020
+**/
+ FSPT_CORE_UPD FsptCoreUpd;
+
+/** Offset 0x0040
+**/
+ FSPT_CONFIG FsptConfig;
+
+/** Offset 0x0060
+**/
+ UINT8 UnusedUpdSpace0[30];
+
+/** Offset 0x007E
+**/
+ UINT16 UpdTerminator;
+} FSPT_UPD;
+
+#pragma pack()
+
+#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/31205
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I033a52bc3f0b86f0ec1db8325b7435d20d194fda
Gerrit-Change-Number: 31205
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002246
Gerrit-MessageType: newchange
1 week, 4 days
Change in ...coreboot[master]: src: Use 'include <stdlib.h>' when appropriate
by HAOUAS Elyes (Code Review)
HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32023
Change subject: src: Use 'include <stdlib.h>' when appropriate
......................................................................
src: Use 'include <stdlib.h>' when appropriate
Change-Id: Id89751c600bad2ddb4b5aa9822adc5c5097787aa
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/arch/arm/armv7/mmu.c
M src/arch/arm/cpu.c
M src/arch/arm64/armv8/mmu.c
M src/arch/arm64/fit_payload.c
M src/arch/mips/mmu.c
M src/arch/x86/acpi_device.c
M src/arch/x86/acpigen_dsm.c
M src/arch/x86/cbmem.c
M src/arch/x86/include/arch/acpigen.h
M src/arch/x86/include/arch/early_variables.h
M src/arch/x86/mmap_boot.c
M src/commonlib/fsp_relocate.c
M src/commonlib/include/commonlib/mem_pool.h
M src/commonlib/mem_pool.c
M src/commonlib/region.c
M src/commonlib/storage/bouncebuf.c
M src/commonlib/storage/bouncebuf.h
M src/commonlib/storage/sdhci.c
M src/commonlib/storage/sdhci_adma.c
M src/cpu/allwinner/a10/clock.c
M src/cpu/amd/family_10h-family_15h/fidvid.c
M src/cpu/amd/family_10h-family_15h/init_cpus.h
M src/cpu/amd/family_10h-family_15h/processor_name.c
M src/cpu/intel/haswell/finalize.c
M src/cpu/intel/model_2065x/finalize.c
M src/cpu/intel/model_206ax/finalize.c
M src/cpu/ti/am335x/gpio.c
M src/cpu/ti/am335x/uart.c
M src/cpu/x86/lapic/lapic_cpu_init.c
M src/cpu/x86/mirror_payload.c
M src/cpu/x86/mtrr/mtrr.c
M src/device/device_util.c
M src/device/i2c_bus.c
M src/device/oprom/realmode/x86.c
M src/device/oprom/yabel/vbe.c
M src/device/pci_class.c
M src/device/pnp_device.c
M src/drivers/aspeed/ast2050/ast2050.c
M src/drivers/emulation/qemu/bochs.c
M src/drivers/emulation/qemu/cirrus.c
M src/drivers/i2c/rtd2132/rtd2132.c
M src/drivers/intel/fsp1_1/stack.c
M src/drivers/intel/fsp2_0/include/fsp/info_header.h
M src/drivers/intel/gma/intel_ddi.c
M src/drivers/net/ne2k.c
M src/drivers/parade/ps8625/ps8625.c
M src/drivers/sil/3114/sil_sata.c
M src/drivers/spi/spi-generic.c
M src/drivers/spi/spi_flash.c
M src/drivers/uart/uart8250io.c
M src/drivers/vpd/vpd.c
M src/drivers/xgi/common/xgi_coreboot.c
M src/drivers/xgi/common/xgi_coreboot.h
M src/ec/compal/ene932/ec.c
M src/ec/google/chromeec/ec_lpc.c
M src/ec/google/chromeec/vstore.c
M src/ec/google/wilco/chip.c
M src/ec/google/wilco/mailbox.c
M src/ec/kontron/it8516e/ec.c
M src/ec/lenovo/h8/h8.c
M src/ec/lenovo/pmh7/pmh7.c
M src/ec/quanta/ene_kb3940q/ec.c
M src/ec/quanta/it8518/ec.c
M src/ec/roda/it8518/ec.c
M src/include/bootstate.h
M src/include/device/i2c_bus.h
M src/include/string.h
M src/lib/bootmem.c
M src/lib/cbfs.c
M src/lib/coreboot_table.c
M src/lib/fit.c
M src/lib/fit_payload.c
M src/lib/hardwaremain.c
M src/lib/imd.c
M src/lib/imd_cbmem.c
M src/lib/prog_loaders.c
M src/lib/rmodule.c
M src/lib/selfboot.c
M src/lib/thread.c
M src/mainboard/advansus/a785e-i/get_bus_conf.c
M src/mainboard/amd/bettong/BiosCallOuts.c
M src/mainboard/amd/bimini_fam10/get_bus_conf.c
M src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c
M src/mainboard/amd/gardenia/BiosCallOuts.c
M src/mainboard/amd/gardenia/gpio.c
M src/mainboard/amd/inagua/BiosCallOuts.c
M src/mainboard/amd/inagua/buildOpts.c
M src/mainboard/amd/lamar/BiosCallOuts.c
M src/mainboard/amd/mahogany_fam10/get_bus_conf.c
M src/mainboard/amd/olivehill/BiosCallOuts.c
M src/mainboard/amd/olivehill/buildOpts.c
M src/mainboard/amd/olivehillplus/BiosCallOuts.c
M src/mainboard/amd/parmer/BiosCallOuts.c
M src/mainboard/amd/parmer/buildOpts.c
M src/mainboard/amd/persimmon/BiosCallOuts.c
M src/mainboard/amd/persimmon/buildOpts.c
M src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c
M src/mainboard/amd/south_station/BiosCallOuts.c
M src/mainboard/amd/south_station/buildOpts.c
M src/mainboard/amd/thatcher/BiosCallOuts.c
M src/mainboard/amd/thatcher/buildOpts.c
M src/mainboard/amd/tilapia_fam10/get_bus_conf.c
M src/mainboard/amd/torpedo/BiosCallOuts.c
M src/mainboard/amd/torpedo/buildOpts.c
M src/mainboard/amd/union_station/BiosCallOuts.c
M src/mainboard/amd/union_station/buildOpts.c
M src/mainboard/asrock/e350m1/BiosCallOuts.c
M src/mainboard/asrock/e350m1/buildOpts.c
M src/mainboard/asrock/imb-a180/BiosCallOuts.c
M src/mainboard/asrock/imb-a180/buildOpts.c
M src/mainboard/asus/am1i-a/BiosCallOuts.c
M src/mainboard/asus/am1i-a/buildOpts.c
M src/mainboard/asus/f2a85-m/BiosCallOuts.c
M src/mainboard/asus/f2a85-m/buildOpts.c
M src/mainboard/asus/kcma-d8/get_bus_conf.c
M src/mainboard/asus/kfsn4-dre/get_bus_conf.c
M src/mainboard/asus/kgpe-d16/get_bus_conf.c
M src/mainboard/asus/m4a78-em/get_bus_conf.c
M src/mainboard/asus/m4a785-m/get_bus_conf.c
M src/mainboard/asus/m5a88-v/get_bus_conf.c
M src/mainboard/avalue/eax-785e/get_bus_conf.c
M src/mainboard/bap/ode_e20XX/BiosCallOuts.c
M src/mainboard/bap/ode_e20XX/buildOpts.c
M src/mainboard/bap/ode_e21XX/BiosCallOuts.c
M src/mainboard/biostar/a68n_5200/BiosCallOuts.c
M src/mainboard/biostar/a68n_5200/buildOpts.c
M src/mainboard/biostar/am1ml/BiosCallOuts.c
M src/mainboard/biostar/am1ml/buildOpts.c
M src/mainboard/cavium/cn8100_sff_evb/romstage.c
M src/mainboard/elmex/pcm205400/BiosCallOuts.c
M src/mainboard/elmex/pcm205400/buildOpts.c
M src/mainboard/emulation/qemu-i440fx/fw_cfg.c
M src/mainboard/esd/atom15/gpio.c
M src/mainboard/gigabyte/ma785gm/get_bus_conf.c
M src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
M src/mainboard/gigabyte/ma78gm/get_bus_conf.c
M src/mainboard/gizmosphere/gizmo/BiosCallOuts.c
M src/mainboard/gizmosphere/gizmo/buildOpts.c
M src/mainboard/gizmosphere/gizmo2/BiosCallOuts.c
M src/mainboard/gizmosphere/gizmo2/buildOpts.c
M src/mainboard/google/beltino/romstage.c
M src/mainboard/google/beltino/variants/mccloud/hda_verb.c
M src/mainboard/google/beltino/variants/monroe/hda_verb.c
M src/mainboard/google/beltino/variants/panther/hda_verb.c
M src/mainboard/google/beltino/variants/tricky/hda_verb.c
M src/mainboard/google/beltino/variants/zako/hda_verb.c
M src/mainboard/google/cyan/variants/banon/gpio.c
M src/mainboard/google/cyan/variants/celes/gpio.c
M src/mainboard/google/cyan/variants/cyan/gpio.c
M src/mainboard/google/cyan/variants/edgar/gpio.c
M src/mainboard/google/cyan/variants/kefka/gpio.c
M src/mainboard/google/cyan/variants/reks/gpio.c
M src/mainboard/google/cyan/variants/relm/gpio.c
M src/mainboard/google/cyan/variants/setzer/gpio.c
M src/mainboard/google/cyan/variants/terra/gpio.c
M src/mainboard/google/cyan/variants/ultima/gpio.c
M src/mainboard/google/cyan/variants/wizpig/gpio.c
M src/mainboard/google/daisy/memory.c
M src/mainboard/google/foster/pmic.c
M src/mainboard/google/gale/boardid.c
M src/mainboard/google/glados/mainboard.c
M src/mainboard/google/gru/boardid.c
M src/mainboard/google/kahlee/variants/baseboard/gpio.c
M src/mainboard/google/link/i915.c
M src/mainboard/google/link/i915io.c
M src/mainboard/google/nyan/pmic.c
M src/mainboard/google/nyan_big/boardid.c
M src/mainboard/google/nyan_big/pmic.c
M src/mainboard/google/nyan_blaze/boardid.c
M src/mainboard/google/nyan_blaze/pmic.c
M src/mainboard/google/oak/boardid.c
M src/mainboard/google/oak/sdram_configs.c
M src/mainboard/google/peach_pit/mainboard.c
M src/mainboard/google/peach_pit/memory.c
M src/mainboard/google/peach_pit/romstage.c
M src/mainboard/google/rambi/variants/banjo/gpio.c
M src/mainboard/google/rambi/variants/candy/gpio.c
M src/mainboard/google/rambi/variants/clapper/gpio.c
M src/mainboard/google/rambi/variants/enguarde/gpio.c
M src/mainboard/google/rambi/variants/glimmer/gpio.c
M src/mainboard/google/rambi/variants/gnawty/gpio.c
M src/mainboard/google/rambi/variants/heli/gpio.c
M src/mainboard/google/rambi/variants/kip/gpio.c
M src/mainboard/google/rambi/variants/ninja/gpio.c
M src/mainboard/google/rambi/variants/orco/gpio.c
M src/mainboard/google/rambi/variants/quawks/gpio.c
M src/mainboard/google/rambi/variants/rambi/gpio.c
M src/mainboard/google/rambi/variants/squawks/gpio.c
M src/mainboard/google/rambi/variants/sumo/gpio.c
M src/mainboard/google/rambi/variants/swanky/gpio.c
M src/mainboard/google/rambi/variants/winky/gpio.c
M src/mainboard/google/slippy/variants/falco/romstage.c
M src/mainboard/google/slippy/variants/leon/romstage.c
M src/mainboard/google/slippy/variants/peppy/romstage.c
M src/mainboard/google/slippy/variants/wolf/romstage.c
M src/mainboard/google/smaug/boardid.c
M src/mainboard/google/smaug/pmic.c
M src/mainboard/google/storm/boardid.c
M src/mainboard/google/urara/boardid.c
M src/mainboard/google/veyron/boardid.c
M src/mainboard/google/veyron/romstage.c
M src/mainboard/google/veyron_mickey/boardid.c
M src/mainboard/google/veyron_mickey/romstage.c
M src/mainboard/google/veyron_rialto/boardid.c
M src/mainboard/google/veyron_rialto/romstage.c
M src/mainboard/hp/abm/BiosCallOuts.c
M src/mainboard/hp/abm/buildOpts.c
M src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
M src/mainboard/hp/pavilion_m6_1035dx/BiosCallOuts.c
M src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c
M src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c
M src/mainboard/intel/bayleybay_fsp/gpio.c
M src/mainboard/intel/kblrvp/mainboard.c
M src/mainboard/intel/kunimitsu/mainboard.c
M src/mainboard/intel/minnowmax/gpio.c
M src/mainboard/intel/strago/gpio.c
M src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
M src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
M src/mainboard/jetway/pa78vm5/get_bus_conf.c
M src/mainboard/lenovo/g505s/BiosCallOuts.c
M src/mainboard/lenovo/g505s/buildOpts.c
M src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
M src/mainboard/lippert/frontrunner-af/buildOpts.c
M src/mainboard/lippert/frontrunner-af/mainboard.c
M src/mainboard/lippert/frontrunner-af/sema.c
M src/mainboard/lippert/toucan-af/BiosCallOuts.c
M src/mainboard/lippert/toucan-af/buildOpts.c
M src/mainboard/lippert/toucan-af/mainboard.c
M src/mainboard/msi/ms7721/BiosCallOuts.c
M src/mainboard/msi/ms7721/buildOpts.c
M src/mainboard/msi/ms9652_fam10/get_bus_conf.c
M src/mainboard/opencellular/elgon/romstage.c
M src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c
M src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c
M src/mainboard/pcengines/apu1/BiosCallOuts.c
M src/mainboard/pcengines/apu1/buildOpts.c
M src/mainboard/pcengines/apu2/BiosCallOuts.c
M src/mainboard/roda/rk886ex/m3885.c
M src/mainboard/roda/rk9/mainboard.c
M src/mainboard/scaleway/tagada/bmcinfo.c
M src/mainboard/siemens/mc_tcu3/gpio.c
M src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
M src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c
M src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c
M src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c
M src/mainboard/ti/beaglebone/leds.c
M src/mainboard/tyan/s2912_fam10/get_bus_conf.c
M src/northbridge/amd/agesa/family12/dimmSpd.c
M src/northbridge/amd/agesa/family12/northbridge.c
M src/northbridge/amd/agesa/family14/dimmSpd.c
M src/northbridge/amd/agesa/family14/northbridge.c
M src/northbridge/amd/agesa/family15tn/dimmSpd.c
M src/northbridge/amd/agesa/family16kb/dimmSpd.c
M src/northbridge/amd/amdht/comlib.h
M src/northbridge/amd/amdmct/mct_ddr3/s3utils.c
M src/northbridge/amd/amdmct/wrappers/mcti.h
M src/northbridge/amd/pi/00660F01/dimmSpd.c
M src/northbridge/intel/e7505/debug.c
M src/northbridge/intel/e7505/northbridge.c
M src/northbridge/intel/e7505/raminit.c
M src/northbridge/intel/fsp_rangeley/northbridge.c
M src/northbridge/intel/gm45/northbridge.c
M src/northbridge/intel/haswell/early_init.c
M src/northbridge/intel/haswell/finalize.c
M src/northbridge/intel/haswell/gma.c
M src/northbridge/intel/haswell/minihd.c
M src/northbridge/intel/haswell/northbridge.c
M src/northbridge/intel/i440bx/northbridge.c
M src/northbridge/intel/i440bx/raminit.c
M src/northbridge/intel/i945/early_init.c
M src/northbridge/intel/i945/northbridge.c
M src/northbridge/intel/nehalem/early_init.c
M src/northbridge/intel/nehalem/finalize.c
M src/northbridge/intel/nehalem/northbridge.c
M src/northbridge/intel/pineview/early_init.c
M src/northbridge/intel/pineview/northbridge.c
M src/northbridge/intel/sandybridge/early_init.c
M src/northbridge/intel/sandybridge/finalize.c
M src/northbridge/intel/sandybridge/northbridge.c
M src/northbridge/intel/x4x/northbridge.c
M src/northbridge/via/vx900/chrome9hd.c
M src/security/tpm/tspi/tspi.c
M src/security/tpm/tss/tcg-2.0/tss_marshaling.c
M src/security/vboot/secdata_mock.c
M src/security/vboot/secdata_tpm.c
M src/security/vboot/vboot_handoff.c
M src/soc/amd/stoneyridge/BiosCallOuts.c
M src/soc/amd/stoneyridge/northbridge.c
M src/soc/amd/stoneyridge/sm.c
M src/soc/amd/stoneyridge/spi.c
M src/soc/cavium/cn81xx/cbmem.c
M src/soc/cavium/cn81xx/spi.c
M src/soc/imgtec/pistachio/cbmem.c
M src/soc/imgtec/pistachio/spi.c
M src/soc/intel/baytrail/cpu.c
M src/soc/intel/baytrail/gfx.c
M src/soc/intel/baytrail/ramstage.c
M src/soc/intel/baytrail/smihandler.c
M src/soc/intel/braswell/cpu.c
M src/soc/intel/braswell/ramstage.c
M src/soc/intel/braswell/smihandler.c
M src/soc/intel/broadwell/finalize.c
M src/soc/intel/broadwell/igd.c
M src/soc/intel/broadwell/me.c
M src/soc/intel/broadwell/me_status.c
M src/soc/intel/broadwell/minihd.c
M src/soc/intel/broadwell/pei_data.c
M src/soc/intel/broadwell/ramstage.c
M src/soc/intel/broadwell/romstage/cpu.c
M src/soc/intel/broadwell/romstage/power_state.c
M src/soc/intel/broadwell/romstage/systemagent.c
M src/soc/intel/broadwell/serialio.c
M src/soc/intel/broadwell/systemagent.c
M src/soc/intel/cannonlake/finalize.c
M src/soc/intel/cannonlake/memmap.c
M src/soc/intel/cannonlake/pmutil.c
M src/soc/intel/common/acpi_wake_source.c
M src/soc/intel/common/block/fast_spi/fast_spi.c
M src/soc/intel/common/block/smm/smihandler.c
M src/soc/intel/denverton_ns/csme_ie_kt.c
M src/soc/intel/denverton_ns/smihandler.c
M src/soc/intel/denverton_ns/systemagent.c
M src/soc/intel/fsp_baytrail/cpu.c
M src/soc/intel/fsp_baytrail/gfx.c
M src/soc/intel/fsp_baytrail/include/soc/i2c.h
M src/soc/intel/fsp_baytrail/ramstage.c
M src/soc/intel/fsp_baytrail/smihandler.c
M src/soc/intel/fsp_broadwell_de/cpu.c
M src/soc/intel/fsp_broadwell_de/ramstage.c
M src/soc/intel/icelake/finalize.c
M src/soc/intel/icelake/memmap.c
M src/soc/intel/icelake/pmutil.c
M src/soc/intel/skylake/finalize.c
M src/soc/intel/skylake/me.c
M src/soc/intel/skylake/memmap.c
M src/soc/intel/skylake/pei_data.c
M src/soc/intel/skylake/pmutil.c
M src/soc/mediatek/common/spi.c
M src/soc/mediatek/mt8173/ddp.c
M src/soc/mediatek/mt8173/flash_controller.c
M src/soc/mediatek/mt8173/include/soc/gpio.h
M src/soc/nvidia/tegra/i2c.c
M src/soc/nvidia/tegra124/clock.c
M src/soc/nvidia/tegra124/display.c
M src/soc/nvidia/tegra124/dma.c
M src/soc/nvidia/tegra124/dp.c
M src/soc/nvidia/tegra124/include/soc/clock.h
M src/soc/nvidia/tegra124/sdram.c
M src/soc/nvidia/tegra124/sdram_lp0.c
M src/soc/nvidia/tegra124/sor.c
M src/soc/nvidia/tegra124/spi.c
M src/soc/nvidia/tegra124/verstage.c
M src/soc/nvidia/tegra210/addressmap.c
M src/soc/nvidia/tegra210/arm_tf.c
M src/soc/nvidia/tegra210/clock.c
M src/soc/nvidia/tegra210/dc.c
M src/soc/nvidia/tegra210/dma.c
M src/soc/nvidia/tegra210/dp.c
M src/soc/nvidia/tegra210/dsi.c
M src/soc/nvidia/tegra210/include/soc/clock.h
M src/soc/nvidia/tegra210/include/soc/mipi-phy.h
M src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c
M src/soc/nvidia/tegra210/mipi-phy.c
M src/soc/nvidia/tegra210/mipi.c
M src/soc/nvidia/tegra210/mipi_dsi.c
M src/soc/nvidia/tegra210/mmu_operations.c
M src/soc/nvidia/tegra210/sdram.c
M src/soc/nvidia/tegra210/sdram_lp0.c
M src/soc/nvidia/tegra210/sor.c
M src/soc/nvidia/tegra210/spi.c
M src/soc/qualcomm/ipq40xx/i2c.c
M src/soc/qualcomm/ipq40xx/qup.c
M src/soc/qualcomm/ipq40xx/spi.c
M src/soc/qualcomm/ipq40xx/uart.c
M src/soc/qualcomm/ipq806x/i2c.c
M src/soc/qualcomm/ipq806x/qup.c
M src/soc/qualcomm/ipq806x/spi.c
M src/soc/qualcomm/ipq806x/uart.c
M src/soc/rockchip/common/edp.c
M src/soc/rockchip/common/gpio.c
M src/soc/rockchip/common/i2c.c
M src/soc/rockchip/common/include/soc/edp.h
M src/soc/rockchip/common/pwm.c
M src/soc/rockchip/common/rk808.c
M src/soc/rockchip/common/spi.c
M src/soc/rockchip/common/vop.c
M src/soc/rockchip/rk3288/clock.c
M src/soc/rockchip/rk3288/display.c
M src/soc/rockchip/rk3288/gpio.c
M src/soc/rockchip/rk3288/hdmi.c
M src/soc/rockchip/rk3288/include/soc/hdmi.h
M src/soc/rockchip/rk3288/soc.c
M src/soc/rockchip/rk3288/tsadc.c
M src/soc/rockchip/rk3399/clock.c
M src/soc/rockchip/rk3399/display.c
M src/soc/rockchip/rk3399/gpio.c
M src/soc/rockchip/rk3399/include/soc/mipi.h
M src/soc/rockchip/rk3399/mipi.c
M src/soc/rockchip/rk3399/saradc.c
M src/soc/rockchip/rk3399/soc.c
M src/soc/rockchip/rk3399/tsadc.c
M src/soc/samsung/exynos5250/alternate_cbfs.c
M src/soc/samsung/exynos5250/clock.c
M src/soc/samsung/exynos5250/cpu.c
M src/soc/samsung/exynos5250/fb.c
M src/soc/samsung/exynos5250/spi.c
M src/soc/samsung/exynos5420/alternate_cbfs.c
M src/soc/samsung/exynos5420/clock.c
M src/soc/samsung/exynos5420/cpu.c
M src/soc/samsung/exynos5420/dp.c
M src/soc/samsung/exynos5420/dp_lowlevel.c
M src/soc/samsung/exynos5420/pinmux.c
M src/soc/samsung/exynos5420/smp.c
M src/soc/samsung/exynos5420/spi.c
M src/soc/sifive/fu540/clock.c
M src/southbridge/amd/agesa/hudson/sm.c
M src/southbridge/amd/agesa/hudson/spi.c
M src/southbridge/amd/amd8111/lpc.c
M src/southbridge/amd/cimx/sb800/smbus_spd.c
M src/southbridge/amd/cimx/sb800/spi.c
M src/southbridge/amd/pi/hudson/sm.c
M src/southbridge/amd/sb700/sm.c
M src/southbridge/amd/sb700/spi.c
M src/southbridge/amd/sb800/sm.c
M src/southbridge/intel/bd82x6x/me_status.c
M src/southbridge/intel/common/smbus.c
M src/southbridge/intel/fsp_rangeley/early_init.c
M src/southbridge/intel/i82801ix/i82801ix.c
M src/southbridge/intel/i82801jx/i82801jx.c
M src/southbridge/intel/lynxpoint/me_9.x.c
M src/southbridge/intel/lynxpoint/me_status.c
M src/southbridge/intel/lynxpoint/serialio.c
M src/southbridge/nvidia/ck804/lpc.c
M src/southbridge/nvidia/mcp55/lpc.c
M src/superio/fintek/f71805f/superio.c
M src/superio/fintek/f71808a/superio.c
M src/superio/fintek/f71859/superio.c
M src/superio/fintek/f71863fg/superio.c
M src/superio/fintek/f71869ad/superio.c
M src/superio/fintek/f71872/superio.c
M src/superio/fintek/f81216h/superio.c
M src/superio/fintek/f81865f/superio.c
M src/superio/fintek/f81866d/superio.c
M src/superio/intel/i8900/superio.c
M src/superio/ite/common/env_ctrl.c
M src/superio/ite/it8528e/superio.c
M src/superio/ite/it8623e/superio.c
M src/superio/ite/it8671f/superio.c
M src/superio/ite/it8712f/superio.c
M src/superio/ite/it8716f/superio.c
M src/superio/ite/it8718f/superio.c
M src/superio/ite/it8721f/superio.c
M src/superio/ite/it8728f/superio.c
M src/superio/ite/it8772f/superio.c
M src/superio/nsc/pc87309/superio.c
M src/superio/nsc/pc87360/superio.c
M src/superio/nsc/pc87366/superio.c
M src/superio/nsc/pc87382/superio.c
M src/superio/nsc/pc87384/superio.c
M src/superio/nsc/pc87392/superio.c
M src/superio/nsc/pc87417/superio.c
M src/superio/nsc/pc97317/superio.c
M src/superio/nuvoton/nct5104d/superio.c
M src/superio/nuvoton/nct5572d/superio.c
M src/superio/nuvoton/nct6776/superio.c
M src/superio/nuvoton/nct6779d/superio.c
M src/superio/nuvoton/nct6791d/superio.c
M src/superio/nuvoton/npcd378/superio.c
M src/superio/nuvoton/wpcm450/superio.c
M src/superio/renesas/m3885x/superio.c
M src/superio/smsc/dme1737/superio.c
M src/superio/smsc/fdc37n972/superio.c
M src/superio/smsc/kbc1100/superio.c
M src/superio/smsc/lpc47b272/superio.c
M src/superio/smsc/lpc47b397/superio.c
M src/superio/smsc/lpc47m10x/superio.c
M src/superio/smsc/lpc47m15x/superio.c
M src/superio/smsc/lpc47n207/early_serial.c
M src/superio/smsc/lpc47n217/superio.c
M src/superio/smsc/lpc47n227/superio.c
M src/superio/smsc/mec1308/superio.c
M src/superio/smsc/sch4037/superio.c
M src/superio/smsc/sio1036/superio.c
M src/superio/smsc/sio10n268/superio.c
M src/superio/smsc/smscsuperio/superio.c
M src/superio/via/vt1211/superio.c
M src/superio/winbond/w83627dhg/superio.c
M src/superio/winbond/w83627ehg/superio.c
M src/superio/winbond/w83627hf/superio.c
M src/superio/winbond/w83627uhg/superio.c
M src/superio/winbond/w83667hg-a/superio.c
M src/superio/winbond/w83697hf/superio.c
M src/superio/winbond/w83977tf/superio.c
M src/superio/winbond/wpcd376i/superio.c
494 files changed, 27 insertions(+), 485 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/32023/1
diff --git a/src/arch/arm/armv7/mmu.c b/src/arch/arm/armv7/mmu.c
index 14f5f7a..284b222 100644
--- a/src/arch/arm/armv7/mmu.c
+++ b/src/arch/arm/armv7/mmu.c
@@ -29,12 +29,9 @@
*/
#include <assert.h>
-#include <stdlib.h>
#include <stdint.h>
#include <symbols.h>
-
#include <console/console.h>
-
#include <arch/cache.h>
#if CONFIG(ARM_LPAE)
diff --git a/src/arch/arm/cpu.c b/src/arch/arm/cpu.c
index fae1a37..0637bf6 100644
--- a/src/arch/arm/cpu.c
+++ b/src/arch/arm/cpu.c
@@ -27,7 +27,6 @@
* SUCH DAMAGE.
*
*/
-#include <stdlib.h>
#include <arch/cpu.h>
/* Return the CPU struct which is at the high memory address of the stack.
diff --git a/src/arch/arm64/armv8/mmu.c b/src/arch/arm64/armv8/mmu.c
index 67dca48..bdec55c 100644
--- a/src/arch/arm64/armv8/mmu.c
+++ b/src/arch/arm64/armv8/mmu.c
@@ -28,7 +28,6 @@
*/
#include <assert.h>
-#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <symbols.h>
diff --git a/src/arch/arm64/fit_payload.c b/src/arch/arm64/fit_payload.c
index c4bbcee..14f429b 100644
--- a/src/arch/arm64/fit_payload.c
+++ b/src/arch/arm64/fit_payload.c
@@ -15,7 +15,6 @@
#include <console/console.h>
#include <bootmem.h>
-#include <stdlib.h>
#include <program_loading.h>
#include <string.h>
#include <commonlib/compression.h>
diff --git a/src/arch/mips/mmu.c b/src/arch/mips/mmu.c
index b144fd3..2ceb2a7 100644
--- a/src/arch/mips/mmu.c
+++ b/src/arch/mips/mmu.c
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#define MIN_PAGE_SIZE (4 * KiB)
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index c57ba48..31b6038 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -22,6 +22,7 @@
#if CONFIG(GENERIC_GPIO_LIB)
#include <gpio.h>
#endif
+#include <stdlib.h>
#define ACPI_DP_UUID "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"
#define ACPI_DP_CHILD_UUID "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
diff --git a/src/arch/x86/acpigen_dsm.c b/src/arch/x86/acpigen_dsm.c
index 1aab90b..8c9cd350 100644
--- a/src/arch/x86/acpigen_dsm.c
+++ b/src/arch/x86/acpigen_dsm.c
@@ -15,7 +15,6 @@
#include <arch/acpigen.h>
#include <arch/acpigen_dsm.h>
-#include <stdlib.h>
/* ------------------- I2C HID DSM ---------------------------- */
diff --git a/src/arch/x86/cbmem.c b/src/arch/x86/cbmem.c
index 648633f..abd163d 100644
--- a/src/arch/x86/cbmem.c
+++ b/src/arch/x86/cbmem.c
@@ -11,7 +11,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <cbmem.h>
#include <arch/acpi.h>
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h
index d9379eb..84034d5 100644
--- a/src/arch/x86/include/arch/acpigen.h
+++ b/src/arch/x86/include/arch/acpigen.h
@@ -19,7 +19,6 @@
#define LIBACPI_H
#include <assert.h>
-#include <stdlib.h>
#include <stdint.h>
#include <arch/acpi.h>
#include <arch/acpi_device.h>
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h
index 9ea1537..1a678cd 100644
--- a/src/arch/x86/include/arch/early_variables.h
+++ b/src/arch/x86/include/arch/early_variables.h
@@ -17,7 +17,6 @@
#define ARCH_EARLY_VARIABLES_H
#include <arch/symbols.h>
-#include <stdlib.h>
#if ENV_CACHE_AS_RAM && !CONFIG(NO_CAR_GLOBAL_MIGRATION)
asm(".section .car.global_data,\"w\",@nobits");
diff --git a/src/arch/x86/mmap_boot.c b/src/arch/x86/mmap_boot.c
index abfa024..98b5643 100644
--- a/src/arch/x86/mmap_boot.c
+++ b/src/arch/x86/mmap_boot.c
@@ -15,7 +15,6 @@
#include <boot_device.h>
#include <endian.h>
-#include <stdlib.h>
/* The ROM is memory mapped just below 4GiB. Form a pointer for the base. */
#define rom_base ((void *)(uintptr_t)(0x100000000ULL-CONFIG_ROM_SIZE))
diff --git a/src/commonlib/fsp_relocate.c b/src/commonlib/fsp_relocate.c
index 32e6b6d..21e1c00 100644
--- a/src/commonlib/fsp_relocate.c
+++ b/src/commonlib/fsp_relocate.c
@@ -31,7 +31,6 @@
#pragma pack(pop)
#include <commonlib/helpers.h>
-#include <stdlib.h>
#include <stdint.h>
#include <string.h>
diff --git a/src/commonlib/include/commonlib/mem_pool.h b/src/commonlib/include/commonlib/mem_pool.h
index c21fa0e..acfcaea 100644
--- a/src/commonlib/include/commonlib/mem_pool.h
+++ b/src/commonlib/include/commonlib/mem_pool.h
@@ -18,6 +18,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <stdlib.h>
/*
* The memory pool allows one to allocate memory from a fixed size buffer
diff --git a/src/commonlib/mem_pool.c b/src/commonlib/mem_pool.c
index cb3e726..c97cb9a 100644
--- a/src/commonlib/mem_pool.c
+++ b/src/commonlib/mem_pool.c
@@ -15,6 +15,7 @@
#include <commonlib/helpers.h>
#include <commonlib/mem_pool.h>
+#include <stdlib.h>
void *mem_pool_alloc(struct mem_pool *mp, size_t sz)
{
diff --git a/src/commonlib/region.c b/src/commonlib/region.c
index 541a125..e993ecd 100644
--- a/src/commonlib/region.c
+++ b/src/commonlib/region.c
@@ -16,6 +16,7 @@
#include <commonlib/helpers.h>
#include <commonlib/region.h>
#include <string.h>
+#include <stdlib.h>
static inline size_t region_end(const struct region *r)
{
diff --git a/src/commonlib/storage/bouncebuf.c b/src/commonlib/storage/bouncebuf.c
index 5d98c74..42eb01d 100644
--- a/src/commonlib/storage/bouncebuf.c
+++ b/src/commonlib/storage/bouncebuf.c
@@ -16,10 +16,12 @@
*/
#include <arch/cache.h>
+#include <commonlib/stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+
#include "bouncebuf.h"
#include "storage.h"
-#include <string.h>
-#include <commonlib/stdlib.h>
static int addr_aligned(struct bounce_buffer *state)
{
diff --git a/src/commonlib/storage/bouncebuf.h b/src/commonlib/storage/bouncebuf.h
index 27d92e8..88dcced 100644
--- a/src/commonlib/storage/bouncebuf.h
+++ b/src/commonlib/storage/bouncebuf.h
@@ -20,7 +20,6 @@
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
/*
* GEN_BB_READ -- Data are read from the buffer eg. by DMA hardware.
diff --git a/src/commonlib/storage/sdhci.c b/src/commonlib/storage/sdhci.c
index 1370a91..737aeed 100644
--- a/src/commonlib/storage/sdhci.c
+++ b/src/commonlib/storage/sdhci.c
@@ -18,17 +18,19 @@
*/
#include <assert.h>
-#include "bouncebuf.h"
#include <commonlib/sd_mmc_ctrlr.h>
#include <commonlib/sdhci.h>
#include <commonlib/storage.h>
#include <delay.h>
#include <endian.h>
+#include <timer.h>
+#include <commonlib/stdlib.h>
+#include <stdlib.h>
+
+#include "bouncebuf.h"
#include "sdhci.h"
#include "sd_mmc.h"
#include "storage.h"
-#include <timer.h>
-#include <commonlib/stdlib.h>
#define DMA_AVAILABLE ((CONFIG_SDHCI_ADMA_IN_BOOTBLOCK && ENV_BOOTBLOCK) \
|| (CONFIG_SDHCI_ADMA_IN_VERSTAGE && ENV_VERSTAGE) \
diff --git a/src/commonlib/storage/sdhci_adma.c b/src/commonlib/storage/sdhci_adma.c
index 1bae3fb..06e9532 100644
--- a/src/commonlib/storage/sdhci_adma.c
+++ b/src/commonlib/storage/sdhci_adma.c
@@ -23,6 +23,7 @@
#include <delay.h>
#include <endian.h>
#include <string.h>
+#include <stdlib.h>
#include "sdhci.h"
#include "sd_mmc.h"
diff --git a/src/cpu/allwinner/a10/clock.c b/src/cpu/allwinner/a10/clock.c
index 76198b7..9e4e93d 100644
--- a/src/cpu/allwinner/a10/clock.c
+++ b/src/cpu/allwinner/a10/clock.c
@@ -22,7 +22,6 @@
#include <console/console.h>
#include <delay.h>
#include <lib.h>
-#include <stdlib.h>
static struct a10_ccm *const ccm = (void *)A1X_CCM_BASE;
diff --git a/src/cpu/amd/family_10h-family_15h/fidvid.c b/src/cpu/amd/family_10h-family_15h/fidvid.c
index db58f5d..0e19353 100644
--- a/src/cpu/amd/family_10h-family_15h/fidvid.c
+++ b/src/cpu/amd/family_10h-family_15h/fidvid.c
@@ -92,6 +92,7 @@
#include <cpu/amd/msr.h>
#include <inttypes.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/init_cpus.h b/src/cpu/amd/family_10h-family_15h/init_cpus.h
index d09fc82..3459178 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.h
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.h
@@ -16,7 +16,6 @@
#ifndef INIT_CPUS_H
#define INIT_CPUS_H
-#include <stdlib.h>
#include <console/console.h>
#include <cpu/x86/lapic.h>
#include <cpu/x86/mtrr.h>
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 5672efd..3a5e2e2 100644
--- a/src/cpu/amd/family_10h-family_15h/processor_name.c
+++ b/src/cpu/amd/family_10h-family_15h/processor_name.c
@@ -32,6 +32,7 @@
#include <device/pci.h>
#include <device/pnp.h>
#include <device/pci_ops.h>
+#include <stdlib.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/intel/haswell/finalize.c b/src/cpu/intel/haswell/finalize.c
index cc2d1a4..16e54d7 100644
--- a/src/cpu/intel/haswell/finalize.c
+++ b/src/cpu/intel/haswell/finalize.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/cpu.h>
#include <cpu/x86/msr.h>
#include "haswell.h"
diff --git a/src/cpu/intel/model_2065x/finalize.c b/src/cpu/intel/model_2065x/finalize.c
index 5b85601..724e09c 100644
--- a/src/cpu/intel/model_2065x/finalize.c
+++ b/src/cpu/intel/model_2065x/finalize.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/cpu.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/speedstep.h>
diff --git a/src/cpu/intel/model_206ax/finalize.c b/src/cpu/intel/model_206ax/finalize.c
index 30b00bb..98ce555 100644
--- a/src/cpu/intel/model_206ax/finalize.c
+++ b/src/cpu/intel/model_206ax/finalize.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/cpu.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/speedstep.h>
diff --git a/src/cpu/ti/am335x/gpio.c b/src/cpu/ti/am335x/gpio.c
index e1c6967..6262651 100644
--- a/src/cpu/ti/am335x/gpio.c
+++ b/src/cpu/ti/am335x/gpio.c
@@ -16,7 +16,6 @@
#include <console/console.h>
#include <cpu/ti/am335x/gpio.h>
#include <stdint.h>
-#include <stdlib.h>
static struct am335x_gpio_regs *gpio_regs_and_bit(unsigned gpio, uint32_t *bit)
{
diff --git a/src/cpu/ti/am335x/uart.c b/src/cpu/ti/am335x/uart.c
index c482a85..4e9d012 100644
--- a/src/cpu/ti/am335x/uart.c
+++ b/src/cpu/ti/am335x/uart.c
@@ -12,7 +12,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <types.h>
#include <console/uart.h>
#include <device/mmio.h>
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 3ad1f0a..3abf396 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -35,6 +35,7 @@
#include <cpu/cpu.h>
#include <cpu/intel/speedstep.h>
#include <thread.h>
+#include <stdlib.h>
/* This is a lot more paranoid now, since Linux can NOT handle
* being told there is a CPU when none exists. So any errors
diff --git a/src/cpu/x86/mirror_payload.c b/src/cpu/x86/mirror_payload.c
index 5f0493a..3207baf 100644
--- a/src/cpu/x86/mirror_payload.c
+++ b/src/cpu/x86/mirror_payload.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <console/console.h>
#include <bootmem.h>
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c
index d87c3d4..91ff14a 100644
--- a/src/cpu/x86/mtrr/mtrr.c
+++ b/src/cpu/x86/mtrr/mtrr.c
@@ -22,7 +22,6 @@
*/
#include <stddef.h>
-#include <stdlib.h>
#include <string.h>
#include <bootstate.h>
#include <console/console.h>
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 5c4f911..03f147f 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -24,6 +24,7 @@
#include <device/pci_def.h>
#include <device/resource.h>
#include <string.h>
+#include <stdlib.h>
/**
* Given a Local APIC ID, find the device structure.
diff --git a/src/device/i2c_bus.c b/src/device/i2c_bus.c
index 30bb80c..ebc021d 100644
--- a/src/device/i2c_bus.c
+++ b/src/device/i2c_bus.c
@@ -11,7 +11,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <stdint.h>
#include <console/console.h>
#include <device/smbus.h>
diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c
index a7631a1..e002c47 100644
--- a/src/device/oprom/realmode/x86.c
+++ b/src/device/oprom/realmode/x86.c
@@ -28,6 +28,7 @@
#include <lib/jpeg.h>
#include <pc80/i8259.h>
#include <pc80/i8254.h>
+#include <stdlib.h>
#include <string.h>
#include <vbe.h>
diff --git a/src/device/oprom/yabel/vbe.c b/src/device/oprom/yabel/vbe.c
index 682bf00..9cfea73 100644
--- a/src/device/oprom/yabel/vbe.c
+++ b/src/device/oprom/yabel/vbe.c
@@ -33,6 +33,7 @@
*****************************************************************************/
#include <string.h>
+#include <stdlib.h>
#include <types.h>
#if CONFIG(FRAMEBUFFER_SET_VESA_MODE)
#include <boot/coreboot_tables.h>
diff --git a/src/device/pci_class.c b/src/device/pci_class.c
index d9c3a4f..6ab1ddc 100644
--- a/src/device/pci_class.c
+++ b/src/device/pci_class.c
@@ -18,7 +18,6 @@
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
typedef struct {
const unsigned char subclass_id;
diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c
index 402e5d1..eeaf106 100644
--- a/src/device/pnp_device.c
+++ b/src/device/pnp_device.c
@@ -20,7 +20,6 @@
*/
#include <console/console.h>
-#include <stdlib.h>
#include <stdint.h>
#include <arch/io.h>
#include <device/device.h>
diff --git a/src/drivers/aspeed/ast2050/ast2050.c b/src/drivers/aspeed/ast2050/ast2050.c
index 631372d..58cea42 100644
--- a/src/drivers/aspeed/ast2050/ast2050.c
+++ b/src/drivers/aspeed/ast2050/ast2050.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/io.h>
#include <edid.h>
#include <console/console.h>
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index 22095ef..a26fc60 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -13,7 +13,6 @@
#include <stdint.h>
#include <edid.h>
-#include <stdlib.h>
#include <arch/io.h>
#include <boot/coreboot_tables.h>
#include <console/console.h>
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index ed5a4f4..42b8869 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -16,7 +16,6 @@
#include <stdint.h>
#include <edid.h>
-#include <stdlib.h>
#include <boot/coreboot_tables.h>
#include <console/console.h>
#include <device/device.h>
diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c
index 2aaa234..64796b7 100644
--- a/src/drivers/i2c/rtd2132/rtd2132.c
+++ b/src/drivers/i2c/rtd2132/rtd2132.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
diff --git a/src/drivers/intel/fsp1_1/stack.c b/src/drivers/intel/fsp1_1/stack.c
index 88ff36a..7e1e81f 100644
--- a/src/drivers/intel/fsp1_1/stack.c
+++ b/src/drivers/intel/fsp1_1/stack.c
@@ -21,7 +21,6 @@
#include <fsp/memmap.h>
#include <fsp/romstage.h>
#include <fsp/stack.h>
-#include <stdlib.h>
#include <program_loading.h>
/*
diff --git a/src/drivers/intel/fsp2_0/include/fsp/info_header.h b/src/drivers/intel/fsp2_0/include/fsp/info_header.h
index e065924..6739310 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/info_header.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/info_header.h
@@ -14,7 +14,6 @@
#define _FSP2_0_INFO_HEADER_H_
#include <stdint.h>
-#include <stdlib.h>
#include <types.h>
#define FSP_HDR_OFFSET 0x94
diff --git a/src/drivers/intel/gma/intel_ddi.c b/src/drivers/intel/gma/intel_ddi.c
index 471a5d2..4220209 100644
--- a/src/drivers/intel/gma/intel_ddi.c
+++ b/src/drivers/intel/gma/intel_ddi.c
@@ -27,7 +27,6 @@
*/
#include <types.h>
-#include <stdlib.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c
index e3dd948..e60896c 100644
--- a/src/drivers/net/ne2k.c
+++ b/src/drivers/net/ne2k.c
@@ -33,7 +33,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include <stdlib.h>
#include <ip_checksum.h>
#include "ns8390.h"
diff --git a/src/drivers/parade/ps8625/ps8625.c b/src/drivers/parade/ps8625/ps8625.c
index 3e90cbb..7369d48 100644
--- a/src/drivers/parade/ps8625/ps8625.c
+++ b/src/drivers/parade/ps8625/ps8625.c
@@ -15,7 +15,6 @@
#include <device/i2c_simple.h>
#include <stdint.h>
-#include <stdlib.h>
#include "ps8625.h"
diff --git a/src/drivers/sil/3114/sil_sata.c b/src/drivers/sil/3114/sil_sata.c
index dd6481a..3e49a2b 100644
--- a/src/drivers/sil/3114/sil_sata.c
+++ b/src/drivers/sil/3114/sil_sata.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/drivers/spi/spi-generic.c b/src/drivers/spi/spi-generic.c
index 84a42d1..3f0fa6a 100644
--- a/src/drivers/spi/spi-generic.c
+++ b/src/drivers/spi/spi-generic.c
@@ -17,6 +17,7 @@
#include <assert.h>
#include <spi-generic.h>
#include <string.h>
+#include <stdlib.h>
int spi_claim_bus(const struct spi_slave *slave)
{
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 82398dd..244e499 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -11,7 +11,6 @@
#include <assert.h>
#include <boot_device.h>
#include <cpu/x86/smm.h>
-#include <stdlib.h>
#include <string.h>
#include <spi-generic.h>
#include <spi_flash.h>
diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c
index 62671e2..be93e1a 100644
--- a/src/drivers/uart/uart8250io.c
+++ b/src/drivers/uart/uart8250io.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/io.h>
#include <boot/coreboot_tables.h>
#include <console/uart.h>
diff --git a/src/drivers/vpd/vpd.c b/src/drivers/vpd/vpd.c
index e620b58..9924bb2 100644
--- a/src/drivers/vpd/vpd.c
+++ b/src/drivers/vpd/vpd.c
@@ -7,7 +7,6 @@
#include <console/console.h>
#include <cbmem.h>
#include <fmap.h>
-#include <stdlib.h>
#include <string.h>
#include <timestamp.h>
diff --git a/src/drivers/xgi/common/xgi_coreboot.c b/src/drivers/xgi/common/xgi_coreboot.c
index 5aba472..46b3e52 100644
--- a/src/drivers/xgi/common/xgi_coreboot.c
+++ b/src/drivers/xgi/common/xgi_coreboot.c
@@ -16,7 +16,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <vbe.h>
#include <console/console.h>
#include <device/device.h>
diff --git a/src/drivers/xgi/common/xgi_coreboot.h b/src/drivers/xgi/common/xgi_coreboot.h
index 41952d6..65e6cac 100644
--- a/src/drivers/xgi/common/xgi_coreboot.h
+++ b/src/drivers/xgi/common/xgi_coreboot.h
@@ -19,7 +19,6 @@
#ifndef _XGI_COREBOOT_
#define _XGI_COREBOOT_
-#include <stdlib.h>
#include <stdint.h>
#include <arch/io.h>
#include <device/mmio.h>
diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c
index 7d8880c..cfabd8d 100644
--- a/src/ec/compal/ene932/ec.c
+++ b/src/ec/compal/ene932/ec.c
@@ -19,7 +19,6 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include <arch/io.h>
#include <delay.h>
#include <pc80/keyboard.h>
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 7293cff..8e18654 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -20,7 +20,6 @@
#include <device/pnp.h>
#include <ec/google/common/mec.h>
#include <stdint.h>
-#include <stdlib.h>
#include "chip.h"
#include "ec.h"
diff --git a/src/ec/google/chromeec/vstore.c b/src/ec/google/chromeec/vstore.c
index 28c2603..50e964f 100644
--- a/src/ec/google/chromeec/vstore.c
+++ b/src/ec/google/chromeec/vstore.c
@@ -15,7 +15,6 @@
#include <stdint.h>
#include <string.h>
-#include <stdlib.h>
#include "ec.h"
#include "ec_commands.h"
diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c
index 0858e1c..380507b 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -19,7 +19,6 @@
#include <ec/acpi/ec.h>
#include <pc80/keyboard.h>
#include <stdint.h>
-#include <stdlib.h>
#include "commands.h"
#include "ec.h"
diff --git a/src/ec/google/wilco/mailbox.c b/src/ec/google/wilco/mailbox.c
index d47290c..3414c4a 100644
--- a/src/ec/google/wilco/mailbox.c
+++ b/src/ec/google/wilco/mailbox.c
@@ -18,7 +18,6 @@
#include <delay.h>
#include <ec/google/common/mec.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <timer.h>
#include <types.h>
diff --git a/src/ec/kontron/it8516e/ec.c b/src/ec/kontron/it8516e/ec.c
index 5565382..c0042fc 100644
--- a/src/ec/kontron/it8516e/ec.c
+++ b/src/ec/kontron/it8516e/ec.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index de4f2c2..d2f2a80 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <ec/acpi/ec.h>
-#include <stdlib.h>
#include <string.h>
#include <smbios.h>
#include <pc80/mc146818rtc.h>
diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c
index 986abb5..1f2ad95 100644
--- a/src/ec/lenovo/pmh7/pmh7.c
+++ b/src/ec/lenovo/pmh7/pmh7.c
@@ -17,7 +17,6 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include <pc80/mc146818rtc.h>
#include <delay.h>
diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c
index af2d378..1f8e36c 100644
--- a/src/ec/quanta/ene_kb3940q/ec.c
+++ b/src/ec/quanta/ene_kb3940q/ec.c
@@ -22,7 +22,6 @@
#include <device/pnp.h>
#include <delay.h>
#include <elog.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "ec.h"
diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c
index e293f7c..5b9ba9f 100644
--- a/src/ec/quanta/it8518/ec.c
+++ b/src/ec/quanta/it8518/ec.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "ec.h"
#include "chip.h"
diff --git a/src/ec/roda/it8518/ec.c b/src/ec/roda/it8518/ec.c
index 4e69d11..09ff480 100644
--- a/src/ec/roda/it8518/ec.c
+++ b/src/ec/roda/it8518/ec.c
@@ -18,7 +18,6 @@
#include <device/pnp.h>
#include <pc80/keyboard.h>
#include <ec/acpi/ec.h>
-#include <stdlib.h>
#include <delay.h>
#include "chip.h"
diff --git a/src/include/bootstate.h b/src/include/bootstate.h
index 26038c6..c53884e 100644
--- a/src/include/bootstate.h
+++ b/src/include/bootstate.h
@@ -16,7 +16,6 @@
#define BOOTSTATE_H
#include <string.h>
-#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
/* Only declare main() when in ramstage. */
diff --git a/src/include/device/i2c_bus.h b/src/include/device/i2c_bus.h
index 6aa4f9b..022f71e 100644
--- a/src/include/device/i2c_bus.h
+++ b/src/include/device/i2c_bus.h
@@ -14,7 +14,6 @@
#ifndef _DEVICE_I2C_BUS_H_
#define _DEVICE_I2C_BUS_H_
-#include <stdlib.h>
#include <stdint.h>
#include <device/i2c.h>
#include <device/device.h>
diff --git a/src/include/string.h b/src/include/string.h
index 4a2f5e9..81afcf0 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -2,7 +2,6 @@
#define STRING_H
#include <stddef.h>
-#include <stdlib.h>
#if !defined(__ROMCC__)
#include <console/vtxprintf.h>
diff --git a/src/lib/bootmem.c b/src/lib/bootmem.c
index 01ad3e8..7eff46d 100644
--- a/src/lib/bootmem.c
+++ b/src/lib/bootmem.c
@@ -19,7 +19,6 @@
#include <bootmem.h>
#include <cbmem.h>
#include <device/resource.h>
-#include <stdlib.h>
#include <symbols.h>
#include <assert.h>
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 728674f..61d90c6 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -16,7 +16,6 @@
#include <assert.h>
#include <string.h>
-#include <stdlib.h>
#include <boot_device.h>
#include <cbfs.h>
#include <commonlib/compression.h>
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 6e44f5d..fa7b793 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -27,7 +27,6 @@
#include <boardid.h>
#include <device/device.h>
#include <fmap.h>
-#include <stdlib.h>
#include <cbfs.h>
#include <cbmem.h>
#include <bootmem.h>
diff --git a/src/lib/fit.c b/src/lib/fit.c
index 4e2b75c..dc17c59 100644
--- a/src/lib/fit.c
+++ b/src/lib/fit.c
@@ -19,14 +19,12 @@
#include <endian.h>
#include <stdint.h>
#include <bootmem.h>
-#include <stdlib.h>
#include <string.h>
#include <program_loading.h>
#include <memrange.h>
#include <fit.h>
#include <boardid.h>
#include <commonlib/cbfs_serialized.h>
-#include <commonlib/include/commonlib/stdlib.h>
static struct list_node image_nodes;
static struct list_node config_nodes;
diff --git a/src/lib/fit_payload.c b/src/lib/fit_payload.c
index e0158f2..97d8723 100644
--- a/src/lib/fit_payload.c
+++ b/src/lib/fit_payload.c
@@ -19,7 +19,6 @@
#include <bootmem.h>
#include <cbmem.h>
#include <device/resource.h>
-#include <stdlib.h>
#include <commonlib/region.h>
#include <fit.h>
#include <program_loading.h>
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 2881162..608b683 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -28,7 +28,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <delay.h>
-#include <stdlib.h>
#include <boot/tables.h>
#include <program_loading.h>
#if CONFIG(HAVE_ACPI_RESUME)
diff --git a/src/lib/imd.c b/src/lib/imd.c
index 17ec2d9..a50aa79 100644
--- a/src/lib/imd.c
+++ b/src/lib/imd.c
@@ -17,7 +17,6 @@
#include <cbmem.h>
#include <console/console.h>
#include <imd.h>
-#include <stdlib.h>
#include <string.h>
/* For more details on implementation and usage please see the imd.h header. */
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c
index c458e5e..0b97cb5 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <cbmem.h>
#include <imd.h>
-#include <stdlib.h>
#include <arch/early_variables.h>
/*
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 3b77712..a9539c9 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -14,7 +14,6 @@
*/
-#include <stdlib.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c
index 56529d2..e33df81 100644
--- a/src/lib/rmodule.c
+++ b/src/lib/rmodule.c
@@ -16,7 +16,6 @@
#include <cbmem.h>
#include <cbfs.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <console/console.h>
#include <program_loading.h>
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index 9aa4741..8d5bb13 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -19,7 +19,6 @@
#include <commonlib/endian.h>
#include <console/console.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <symbols.h>
#include <cbfs.h>
diff --git a/src/lib/thread.c b/src/lib/thread.c
index 281885f..a786b9f 100644
--- a/src/lib/thread.c
+++ b/src/lib/thread.c
@@ -15,7 +15,6 @@
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <arch/cpu.h>
#include <bootstate.h>
#include <console/console.h>
diff --git a/src/mainboard/advansus/a785e-i/get_bus_conf.c b/src/mainboard/advansus/a785e-i/get_bus_conf.c
index 6b5ae68..7aca540 100644
--- a/src/mainboard/advansus/a785e-i/get_bus_conf.c
+++ b/src/mainboard/advansus/a785e-i/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/amd/bettong/BiosCallOuts.c b/src/mainboard/amd/bettong/BiosCallOuts.c
index 040de9b..f4ecbd1 100644
--- a/src/mainboard/amd/bettong/BiosCallOuts.c
+++ b/src/mainboard/amd/bettong/BiosCallOuts.c
@@ -19,7 +19,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/pi/00660F01/chip.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include <string.h>
#include <northbridge/amd/pi/dimmSpd.h>
#include <northbridge/amd/pi/agesawrapper.h>
diff --git a/src/mainboard/amd/bimini_fam10/get_bus_conf.c b/src/mainboard/amd/bimini_fam10/get_bus_conf.c
index 4021c51..a9db67a 100644
--- a/src/mainboard/amd/bimini_fam10/get_bus_conf.c
+++ b/src/mainboard/amd/bimini_fam10/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c b/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c
index c6e575d..b7ef7e3 100644
--- a/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c
+++ b/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <device/azalia.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
#include "hudson.h"
diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c
index d4fb55a..ee92326 100644
--- a/src/mainboard/amd/gardenia/BiosCallOuts.c
+++ b/src/mainboard/amd/gardenia/BiosCallOuts.c
@@ -16,7 +16,6 @@
#include <amdblocks/agesawrapper.h>
#include <amdblocks/BiosCallOuts.h>
#include <soc/southbridge.h>
-#include <stdlib.h>
void platform_FchParams_env(FCH_DATA_BLOCK *FchParams_env)
{
diff --git a/src/mainboard/amd/gardenia/gpio.c b/src/mainboard/amd/gardenia/gpio.c
index 7c5f47b..837d031 100644
--- a/src/mainboard/amd/gardenia/gpio.c
+++ b/src/mainboard/amd/gardenia/gpio.c
@@ -14,7 +14,6 @@
*/
#include <soc/southbridge.h>
-#include <stdlib.h>
#include <soc/gpio.h>
#include "gpio.h"
diff --git a/src/mainboard/amd/inagua/BiosCallOuts.c b/src/mainboard/amd/inagua/BiosCallOuts.c
index b6267a6..0a24def 100644
--- a/src/mainboard/amd/inagua/BiosCallOuts.c
+++ b/src/mainboard/amd/inagua/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
static AGESA_STATUS board_GnbPcieSlotReset (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/amd/inagua/buildOpts.c b/src/mainboard/amd/inagua/buildOpts.c
index fe6fac0..f1e46c9 100644
--- a/src/mainboard/amd/inagua/buildOpts.c
+++ b/src/mainboard/amd/inagua/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
/* Select the CPU family. */
diff --git a/src/mainboard/amd/lamar/BiosCallOuts.c b/src/mainboard/amd/lamar/BiosCallOuts.c
index 8891abb..a226cf5 100644
--- a/src/mainboard/amd/lamar/BiosCallOuts.c
+++ b/src/mainboard/amd/lamar/BiosCallOuts.c
@@ -16,7 +16,6 @@
#include <AGESA.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include <device/azalia.h>
#include "imc.h"
diff --git a/src/mainboard/amd/mahogany_fam10/get_bus_conf.c b/src/mainboard/amd/mahogany_fam10/get_bus_conf.c
index ee2a6ca..24e44e6 100644
--- a/src/mainboard/amd/mahogany_fam10/get_bus_conf.c
+++ b/src/mainboard/amd/mahogany_fam10/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/amd/olivehill/BiosCallOuts.c b/src/mainboard/amd/olivehill/BiosCallOuts.c
index b6a8a3a..1865034 100644
--- a/src/mainboard/amd/olivehill/BiosCallOuts.c
+++ b/src/mainboard/amd/olivehill/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
diff --git a/src/mainboard/amd/olivehill/buildOpts.c b/src/mainboard/amd/olivehill/buildOpts.c
index 65b86b8..bb8527d 100644
--- a/src/mainboard/amd/olivehill/buildOpts.c
+++ b/src/mainboard/amd/olivehill/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/amd/olivehillplus/BiosCallOuts.c b/src/mainboard/amd/olivehillplus/BiosCallOuts.c
index a6f4267..fa74188 100644
--- a/src/mainboard/amd/olivehillplus/BiosCallOuts.c
+++ b/src/mainboard/amd/olivehillplus/BiosCallOuts.c
@@ -16,7 +16,6 @@
#include <AGESA.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
#include "hudson.h"
diff --git a/src/mainboard/amd/parmer/BiosCallOuts.c b/src/mainboard/amd/parmer/BiosCallOuts.c
index 0c54211..89062b6 100644
--- a/src/mainboard/amd/parmer/BiosCallOuts.c
+++ b/src/mainboard/amd/parmer/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
diff --git a/src/mainboard/amd/parmer/buildOpts.c b/src/mainboard/amd/parmer/buildOpts.c
index 7ff6caa..93fcd35 100644
--- a/src/mainboard/amd/parmer/buildOpts.c
+++ b/src/mainboard/amd/parmer/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
/* Select the CPU family. */
diff --git a/src/mainboard/amd/persimmon/BiosCallOuts.c b/src/mainboard/amd/persimmon/BiosCallOuts.c
index 60ce3ee..b1403ec 100644
--- a/src/mainboard/amd/persimmon/BiosCallOuts.c
+++ b/src/mainboard/amd/persimmon/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <amdlib.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
static AGESA_STATUS board_GnbPcieSlotReset (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/amd/persimmon/buildOpts.c b/src/mainboard/amd/persimmon/buildOpts.c
index d99cc81..9212ec1 100644
--- a/src/mainboard/amd/persimmon/buildOpts.c
+++ b/src/mainboard/amd/persimmon/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
/* Select the CPU family. */
diff --git a/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c b/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c
index e1f2409..04d0500 100644
--- a/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c
+++ b/src/mainboard/amd/serengeti_cheetah_fam10/get_bus_conf.c
@@ -21,7 +21,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-#include <stdlib.h>
#include "mb_sysconf.h"
/* Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables */
diff --git a/src/mainboard/amd/south_station/BiosCallOuts.c b/src/mainboard/amd/south_station/BiosCallOuts.c
index ecb7e1c..9cfb646 100644
--- a/src/mainboard/amd/south_station/BiosCallOuts.c
+++ b/src/mainboard/amd/south_station/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
static AGESA_STATUS board_GnbPcieSlotReset (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/amd/south_station/buildOpts.c b/src/mainboard/amd/south_station/buildOpts.c
index 244229d..929408f 100644
--- a/src/mainboard/amd/south_station/buildOpts.c
+++ b/src/mainboard/amd/south_station/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
/* Select the CPU family. */
diff --git a/src/mainboard/amd/thatcher/BiosCallOuts.c b/src/mainboard/amd/thatcher/BiosCallOuts.c
index f23161d..cc56a9a 100644
--- a/src/mainboard/amd/thatcher/BiosCallOuts.c
+++ b/src/mainboard/amd/thatcher/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
diff --git a/src/mainboard/amd/thatcher/buildOpts.c b/src/mainboard/amd/thatcher/buildOpts.c
index 96847a7..cc1069d 100644
--- a/src/mainboard/amd/thatcher/buildOpts.c
+++ b/src/mainboard/amd/thatcher/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
/* Select the CPU family. */
diff --git a/src/mainboard/amd/tilapia_fam10/get_bus_conf.c b/src/mainboard/amd/tilapia_fam10/get_bus_conf.c
index 37a3774..382834b 100644
--- a/src/mainboard/amd/tilapia_fam10/get_bus_conf.c
+++ b/src/mainboard/amd/tilapia_fam10/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/amd/torpedo/BiosCallOuts.c b/src/mainboard/amd/torpedo/BiosCallOuts.c
index e7b0e29..5002354 100644
--- a/src/mainboard/amd/torpedo/BiosCallOuts.c
+++ b/src/mainboard/amd/torpedo/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <amdlib.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "Hudson-2.h"
-#include <stdlib.h>
#include <southbridge/amd/cimx/sb900/gpio_oem.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/amd/torpedo/buildOpts.c b/src/mainboard/amd/torpedo/buildOpts.c
index fbeee9a..89b3810 100644
--- a/src/mainboard/amd/torpedo/buildOpts.c
+++ b/src/mainboard/amd/torpedo/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
diff --git a/src/mainboard/amd/union_station/BiosCallOuts.c b/src/mainboard/amd/union_station/BiosCallOuts.c
index ecb7e1c..9cfb646 100644
--- a/src/mainboard/amd/union_station/BiosCallOuts.c
+++ b/src/mainboard/amd/union_station/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
static AGESA_STATUS board_GnbPcieSlotReset (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/amd/union_station/buildOpts.c b/src/mainboard/amd/union_station/buildOpts.c
index 244229d..929408f 100644
--- a/src/mainboard/amd/union_station/buildOpts.c
+++ b/src/mainboard/amd/union_station/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
/* Select the CPU family. */
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.c b/src/mainboard/asrock/e350m1/BiosCallOuts.c
index 491027a..5d7211c 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.c
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <amdlib.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/asrock/e350m1/buildOpts.c b/src/mainboard/asrock/e350m1/buildOpts.c
index 14621e0..0125b56 100644
--- a/src/mainboard/asrock/e350m1/buildOpts.c
+++ b/src/mainboard/asrock/e350m1/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
diff --git a/src/mainboard/asrock/imb-a180/BiosCallOuts.c b/src/mainboard/asrock/imb-a180/BiosCallOuts.c
index e05d5c0..983f9a8 100644
--- a/src/mainboard/asrock/imb-a180/BiosCallOuts.c
+++ b/src/mainboard/asrock/imb-a180/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/asrock/imb-a180/buildOpts.c b/src/mainboard/asrock/imb-a180/buildOpts.c
index d9d62e2..caa5e3b 100644
--- a/src/mainboard/asrock/imb-a180/buildOpts.c
+++ b/src/mainboard/asrock/imb-a180/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/asus/am1i-a/BiosCallOuts.c b/src/mainboard/asus/am1i-a/BiosCallOuts.c
index a1018b3..55897bf 100644
--- a/src/mainboard/asus/am1i-a/BiosCallOuts.c
+++ b/src/mainboard/asus/am1i-a/BiosCallOuts.c
@@ -20,7 +20,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include <pc80/mc146818rtc.h>
#include <types.h>
diff --git a/src/mainboard/asus/am1i-a/buildOpts.c b/src/mainboard/asus/am1i-a/buildOpts.c
index 30c0699..74216f0 100644
--- a/src/mainboard/asus/am1i-a/buildOpts.c
+++ b/src/mainboard/asus/am1i-a/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/asus/f2a85-m/BiosCallOuts.c b/src/mainboard/asus/f2a85-m/BiosCallOuts.c
index 9e60ca7..15ce47e 100644
--- a/src/mainboard/asus/f2a85-m/BiosCallOuts.c
+++ b/src/mainboard/asus/f2a85-m/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/state_machine.h>
#include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/asus/f2a85-m/buildOpts.c b/src/mainboard/asus/f2a85-m/buildOpts.c
index dc20dc7..8a1391d 100644
--- a/src/mainboard/asus/f2a85-m/buildOpts.c
+++ b/src/mainboard/asus/f2a85-m/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <vendorcode/amd/agesa/f15tn/AGESA.h>
diff --git a/src/mainboard/asus/kcma-d8/get_bus_conf.c b/src/mainboard/asus/kcma-d8/get_bus_conf.c
index cc64dea..8fd10a1 100644
--- a/src/mainboard/asus/kcma-d8/get_bus_conf.c
+++ b/src/mainboard/asus/kcma-d8/get_bus_conf.c
@@ -16,7 +16,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/asus/kfsn4-dre/get_bus_conf.c b/src/mainboard/asus/kfsn4-dre/get_bus_conf.c
index dd7ebc9..ea32741 100644
--- a/src/mainboard/asus/kfsn4-dre/get_bus_conf.c
+++ b/src/mainboard/asus/kfsn4-dre/get_bus_conf.c
@@ -22,7 +22,6 @@
#include <device/pci.h>
#include <device/pci_ops.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/asus/kgpe-d16/get_bus_conf.c b/src/mainboard/asus/kgpe-d16/get_bus_conf.c
index 81d0fc1..e1e07df 100644
--- a/src/mainboard/asus/kgpe-d16/get_bus_conf.c
+++ b/src/mainboard/asus/kgpe-d16/get_bus_conf.c
@@ -16,7 +16,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/asus/m4a78-em/get_bus_conf.c b/src/mainboard/asus/m4a78-em/get_bus_conf.c
index ee2a6ca..24e44e6 100644
--- a/src/mainboard/asus/m4a78-em/get_bus_conf.c
+++ b/src/mainboard/asus/m4a78-em/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/asus/m4a785-m/get_bus_conf.c b/src/mainboard/asus/m4a785-m/get_bus_conf.c
index ee2a6ca..24e44e6 100644
--- a/src/mainboard/asus/m4a785-m/get_bus_conf.c
+++ b/src/mainboard/asus/m4a785-m/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/asus/m5a88-v/get_bus_conf.c b/src/mainboard/asus/m5a88-v/get_bus_conf.c
index 6b5ae68..7aca540 100644
--- a/src/mainboard/asus/m5a88-v/get_bus_conf.c
+++ b/src/mainboard/asus/m5a88-v/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/avalue/eax-785e/get_bus_conf.c b/src/mainboard/avalue/eax-785e/get_bus_conf.c
index 6b5ae68..7aca540 100644
--- a/src/mainboard/avalue/eax-785e/get_bus_conf.c
+++ b/src/mainboard/avalue/eax-785e/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/bap/ode_e20XX/BiosCallOuts.c b/src/mainboard/bap/ode_e20XX/BiosCallOuts.c
index 9f7fbf8..f6077c6 100644
--- a/src/mainboard/bap/ode_e20XX/BiosCallOuts.c
+++ b/src/mainboard/bap/ode_e20XX/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include <spd_bin.h>
#include "imc.h"
diff --git a/src/mainboard/bap/ode_e20XX/buildOpts.c b/src/mainboard/bap/ode_e20XX/buildOpts.c
index 6c405cc..daf13b6 100644
--- a/src/mainboard/bap/ode_e20XX/buildOpts.c
+++ b/src/mainboard/bap/ode_e20XX/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c
index 362b5ba..6bc21ad 100644
--- a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c
+++ b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c
@@ -16,7 +16,6 @@
#include <AGESA.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include <spd_bin.h>
#include "imc.h"
diff --git a/src/mainboard/biostar/a68n_5200/BiosCallOuts.c b/src/mainboard/biostar/a68n_5200/BiosCallOuts.c
index 8f55fb6..cc5081b 100644
--- a/src/mainboard/biostar/a68n_5200/BiosCallOuts.c
+++ b/src/mainboard/biostar/a68n_5200/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
diff --git a/src/mainboard/biostar/a68n_5200/buildOpts.c b/src/mainboard/biostar/a68n_5200/buildOpts.c
index 65b86b8..bb8527d 100644
--- a/src/mainboard/biostar/a68n_5200/buildOpts.c
+++ b/src/mainboard/biostar/a68n_5200/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/biostar/am1ml/BiosCallOuts.c b/src/mainboard/biostar/am1ml/BiosCallOuts.c
index 43db0d7..0ebd4a9 100644
--- a/src/mainboard/biostar/am1ml/BiosCallOuts.c
+++ b/src/mainboard/biostar/am1ml/BiosCallOuts.c
@@ -19,7 +19,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/biostar/am1ml/buildOpts.c b/src/mainboard/biostar/am1ml/buildOpts.c
index 30c0699..74216f0 100644
--- a/src/mainboard/biostar/am1ml/buildOpts.c
+++ b/src/mainboard/biostar/am1ml/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/cavium/cn8100_sff_evb/romstage.c b/src/mainboard/cavium/cn8100_sff_evb/romstage.c
index b60b9cd..81a4100 100644
--- a/src/mainboard/cavium/cn8100_sff_evb/romstage.c
+++ b/src/mainboard/cavium/cn8100_sff_evb/romstage.c
@@ -18,7 +18,6 @@
#include <soc/sdram.h>
#include <soc/timer.h>
#include <soc/mmu.h>
-#include <stdlib.h>
#include <libbdk-hal/bdk-config.h>
extern const struct bdk_devicetree_key_value devtree[];
diff --git a/src/mainboard/elmex/pcm205400/BiosCallOuts.c b/src/mainboard/elmex/pcm205400/BiosCallOuts.c
index 6e2eaed..ee0b4f2 100644
--- a/src/mainboard/elmex/pcm205400/BiosCallOuts.c
+++ b/src/mainboard/elmex/pcm205400/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <amdlib.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
static AGESA_STATUS board_GnbPcieSlotReset (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/elmex/pcm205400/buildOpts.c b/src/mainboard/elmex/pcm205400/buildOpts.c
index 863a552..9ed90be 100644
--- a/src/mainboard/elmex/pcm205400/buildOpts.c
+++ b/src/mainboard/elmex/pcm205400/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
/* Select the cpu family. */
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
index 3acb11e..474cf5d 100644
--- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
+++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
@@ -13,6 +13,7 @@
#include <endian.h>
#include <string.h>
+#include <stdlib.h>
#include <smbios.h>
#include <console/console.h>
#include <arch/io.h>
diff --git a/src/mainboard/esd/atom15/gpio.c b/src/mainboard/esd/atom15/gpio.c
index b9c7829..08d4e22 100644
--- a/src/mainboard/esd/atom15/gpio.c
+++ b/src/mainboard/esd/atom15/gpio.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include "irqroute.h"
diff --git a/src/mainboard/gigabyte/ma785gm/get_bus_conf.c b/src/mainboard/gigabyte/ma785gm/get_bus_conf.c
index ee2a6ca..24e44e6 100644
--- a/src/mainboard/gigabyte/ma785gm/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ma785gm/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c b/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
index 5c53476..16fdca1 100644
--- a/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ma785gmt/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/gigabyte/ma78gm/get_bus_conf.c b/src/mainboard/gigabyte/ma78gm/get_bus_conf.c
index ee2a6ca..24e44e6 100644
--- a/src/mainboard/gigabyte/ma78gm/get_bus_conf.c
+++ b/src/mainboard/gigabyte/ma78gm/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/gizmosphere/gizmo/BiosCallOuts.c b/src/mainboard/gizmosphere/gizmo/BiosCallOuts.c
index 5fc1718..233c40f 100644
--- a/src/mainboard/gizmosphere/gizmo/BiosCallOuts.c
+++ b/src/mainboard/gizmosphere/gizmo/BiosCallOuts.c
@@ -16,7 +16,6 @@
#include <AGESA.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
-#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/gizmosphere/gizmo/buildOpts.c b/src/mainboard/gizmosphere/gizmo/buildOpts.c
index b934808..1c72f7c 100644
--- a/src/mainboard/gizmosphere/gizmo/buildOpts.c
+++ b/src/mainboard/gizmosphere/gizmo/buildOpts.c
@@ -26,7 +26,6 @@
*
*/
-#include <stdlib.h>
diff --git a/src/mainboard/gizmosphere/gizmo2/BiosCallOuts.c b/src/mainboard/gizmosphere/gizmo2/BiosCallOuts.c
index 99162d8..c9e27d8 100644
--- a/src/mainboard/gizmosphere/gizmo2/BiosCallOuts.c
+++ b/src/mainboard/gizmosphere/gizmo2/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "imc.h"
diff --git a/src/mainboard/gizmosphere/gizmo2/buildOpts.c b/src/mainboard/gizmosphere/gizmo2/buildOpts.c
index 6c405cc..daf13b6 100644
--- a/src/mainboard/gizmosphere/gizmo2/buildOpts.c
+++ b/src/mainboard/gizmosphere/gizmo2/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/google/beltino/romstage.c b/src/mainboard/google/beltino/romstage.c
index 70a8c19..ac6cdb5 100644
--- a/src/mainboard/google/beltino/romstage.c
+++ b/src/mainboard/google/beltino/romstage.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/intel/romstage.h>
#include <cpu/intel/haswell/haswell.h>
#include <northbridge/intel/haswell/haswell.h>
diff --git a/src/mainboard/google/beltino/variants/mccloud/hda_verb.c b/src/mainboard/google/beltino/variants/mccloud/hda_verb.c
index 4d65f36..83bcb46 100644
--- a/src/mainboard/google/beltino/variants/mccloud/hda_verb.c
+++ b/src/mainboard/google/beltino/variants/mccloud/hda_verb.c
@@ -16,7 +16,6 @@
#ifndef HDA_VERB_H
#define HDA_VERB_H
-#include <stdlib.h>
#include <device/azalia_device.h>
diff --git a/src/mainboard/google/beltino/variants/monroe/hda_verb.c b/src/mainboard/google/beltino/variants/monroe/hda_verb.c
index 8482ec3..8657263 100644
--- a/src/mainboard/google/beltino/variants/monroe/hda_verb.c
+++ b/src/mainboard/google/beltino/variants/monroe/hda_verb.c
@@ -16,7 +16,6 @@
#ifndef HDA_VERB_H
#define HDA_VERB_H
-#include <stdlib.h>
#include <device/azalia_device.h>
diff --git a/src/mainboard/google/beltino/variants/panther/hda_verb.c b/src/mainboard/google/beltino/variants/panther/hda_verb.c
index 4d65f36..83bcb46 100644
--- a/src/mainboard/google/beltino/variants/panther/hda_verb.c
+++ b/src/mainboard/google/beltino/variants/panther/hda_verb.c
@@ -16,7 +16,6 @@
#ifndef HDA_VERB_H
#define HDA_VERB_H
-#include <stdlib.h>
#include <device/azalia_device.h>
diff --git a/src/mainboard/google/beltino/variants/tricky/hda_verb.c b/src/mainboard/google/beltino/variants/tricky/hda_verb.c
index 4d65f36..83bcb46 100644
--- a/src/mainboard/google/beltino/variants/tricky/hda_verb.c
+++ b/src/mainboard/google/beltino/variants/tricky/hda_verb.c
@@ -16,7 +16,6 @@
#ifndef HDA_VERB_H
#define HDA_VERB_H
-#include <stdlib.h>
#include <device/azalia_device.h>
diff --git a/src/mainboard/google/beltino/variants/zako/hda_verb.c b/src/mainboard/google/beltino/variants/zako/hda_verb.c
index 4d65f36..83bcb46 100644
--- a/src/mainboard/google/beltino/variants/zako/hda_verb.c
+++ b/src/mainboard/google/beltino/variants/zako/hda_verb.c
@@ -16,7 +16,6 @@
#ifndef HDA_VERB_H
#define HDA_VERB_H
-#include <stdlib.h>
#include <device/azalia_device.h>
diff --git a/src/mainboard/google/cyan/variants/banon/gpio.c b/src/mainboard/google/cyan/variants/banon/gpio.c
index 6983d91..2a3e8fc 100644
--- a/src/mainboard/google/cyan/variants/banon/gpio.c
+++ b/src/mainboard/google/cyan/variants/banon/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/celes/gpio.c b/src/mainboard/google/cyan/variants/celes/gpio.c
index c416053..6f53f2e 100644
--- a/src/mainboard/google/cyan/variants/celes/gpio.c
+++ b/src/mainboard/google/cyan/variants/celes/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/cyan/gpio.c b/src/mainboard/google/cyan/variants/cyan/gpio.c
index c26e7b6..05ba93e 100644
--- a/src/mainboard/google/cyan/variants/cyan/gpio.c
+++ b/src/mainboard/google/cyan/variants/cyan/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/edgar/gpio.c b/src/mainboard/google/cyan/variants/edgar/gpio.c
index 2010ac5..59486af 100644
--- a/src/mainboard/google/cyan/variants/edgar/gpio.c
+++ b/src/mainboard/google/cyan/variants/edgar/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/kefka/gpio.c b/src/mainboard/google/cyan/variants/kefka/gpio.c
index 0ef2842..30c5680 100644
--- a/src/mainboard/google/cyan/variants/kefka/gpio.c
+++ b/src/mainboard/google/cyan/variants/kefka/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
diff --git a/src/mainboard/google/cyan/variants/reks/gpio.c b/src/mainboard/google/cyan/variants/reks/gpio.c
index e0d82cf..955dc51 100644
--- a/src/mainboard/google/cyan/variants/reks/gpio.c
+++ b/src/mainboard/google/cyan/variants/reks/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/relm/gpio.c b/src/mainboard/google/cyan/variants/relm/gpio.c
index 9cb80e6..dd51eb3 100644
--- a/src/mainboard/google/cyan/variants/relm/gpio.c
+++ b/src/mainboard/google/cyan/variants/relm/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
diff --git a/src/mainboard/google/cyan/variants/setzer/gpio.c b/src/mainboard/google/cyan/variants/setzer/gpio.c
index 83f742e..64a0a83 100644
--- a/src/mainboard/google/cyan/variants/setzer/gpio.c
+++ b/src/mainboard/google/cyan/variants/setzer/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
diff --git a/src/mainboard/google/cyan/variants/terra/gpio.c b/src/mainboard/google/cyan/variants/terra/gpio.c
index b4feebf..dc10cef 100644
--- a/src/mainboard/google/cyan/variants/terra/gpio.c
+++ b/src/mainboard/google/cyan/variants/terra/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/ultima/gpio.c b/src/mainboard/google/cyan/variants/ultima/gpio.c
index fe8c934..3cae313 100644
--- a/src/mainboard/google/cyan/variants/ultima/gpio.c
+++ b/src/mainboard/google/cyan/variants/ultima/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/cyan/variants/wizpig/gpio.c b/src/mainboard/google/cyan/variants/wizpig/gpio.c
index affe893..ecd74ef 100644
--- a/src/mainboard/google/cyan/variants/wizpig/gpio.c
+++ b/src/mainboard/google/cyan/variants/wizpig/gpio.c
@@ -16,7 +16,6 @@
#include <mainboard/google/cyan/irqroute.h>
#include <soc/gpio.h>
-#include <stdlib.h>
/* South East Community */
static const struct soc_gpio_map gpse_gpio_map[] = {
diff --git a/src/mainboard/google/daisy/memory.c b/src/mainboard/google/daisy/memory.c
index 009604b..c5b752c 100644
--- a/src/mainboard/google/daisy/memory.c
+++ b/src/mainboard/google/daisy/memory.c
@@ -20,7 +20,6 @@
#include <soc/dmc.h>
#include <soc/clk.h>
#include <stddef.h>
-#include <stdlib.h>
const struct mem_timings mem_timings[] = {
{
diff --git a/src/mainboard/google/foster/pmic.c b/src/mainboard/google/foster/pmic.c
index d8b1fa0..5918d49 100644
--- a/src/mainboard/google/foster/pmic.c
+++ b/src/mainboard/google/foster/pmic.c
@@ -19,7 +19,6 @@
#include <delay.h>
#include <device/i2c_simple.h>
#include <stdint.h>
-#include <stdlib.h>
#include <reset.h>
#include "pmic.h"
diff --git a/src/mainboard/google/gale/boardid.c b/src/mainboard/google/gale/boardid.c
index 96fc936..082cc26 100644
--- a/src/mainboard/google/gale/boardid.c
+++ b/src/mainboard/google/gale/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <gpio.h>
#include <console/console.h>
-#include <stdlib.h>
/*
* Gale boards dedicate to the board ID three GPIOs in ternary mode: 64, 65
diff --git a/src/mainboard/google/glados/mainboard.c b/src/mainboard/google/glados/mainboard.c
index 8b04a65..19dd316 100644
--- a/src/mainboard/google/glados/mainboard.c
+++ b/src/mainboard/google/glados/mainboard.c
@@ -20,7 +20,6 @@
#include <console/console.h>
#include <device/device.h>
#include <gpio.h>
-#include <stdlib.h>
#include <soc/nhlt.h>
#include <variant/gpio.h>
#include <vendorcode/google/chromeos/chromeos.h>
diff --git a/src/mainboard/google/gru/boardid.c b/src/mainboard/google/gru/boardid.c
index 4630a91..efba922 100644
--- a/src/mainboard/google/gru/boardid.c
+++ b/src/mainboard/google/gru/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <gpio.h>
-#include <stdlib.h>
#include <soc/saradc.h>
static const int id_readings[] = {
diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
index 9db26c7..4c2483f 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
@@ -16,7 +16,6 @@
#include <baseboard/variants.h>
#include <soc/gpio.h>
#include <soc/southbridge.h>
-#include <stdlib.h>
#include <boardid.h>
#include <variant/gpio.h>
diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c
index e09785d..42637e7 100644
--- a/src/mainboard/google/link/i915.c
+++ b/src/mainboard/google/link/i915.c
@@ -15,7 +15,6 @@
#include <types.h>
#include <string.h>
-#include <stdlib.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
diff --git a/src/mainboard/google/link/i915io.c b/src/mainboard/google/link/i915io.c
index 5ebb42d..b669d58 100644
--- a/src/mainboard/google/link/i915io.c
+++ b/src/mainboard/google/link/i915io.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include "i915io.h"
struct iodef iodefs[] = {
diff --git a/src/mainboard/google/nyan/pmic.c b/src/mainboard/google/nyan/pmic.c
index d226459..cfe0a8c 100644
--- a/src/mainboard/google/nyan/pmic.c
+++ b/src/mainboard/google/nyan/pmic.c
@@ -19,7 +19,6 @@
#include <delay.h>
#include <device/i2c_simple.h>
#include <stdint.h>
-#include <stdlib.h>
#include <reset.h>
#include "pmic.h"
diff --git a/src/mainboard/google/nyan_big/boardid.c b/src/mainboard/google/nyan_big/boardid.c
index 2a2911c..49a9938 100644
--- a/src/mainboard/google/nyan_big/boardid.c
+++ b/src/mainboard/google/nyan_big/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <gpio.h>
-#include <stdlib.h>
uint32_t board_id(void)
{
diff --git a/src/mainboard/google/nyan_big/pmic.c b/src/mainboard/google/nyan_big/pmic.c
index 948d867..9e44f54 100644
--- a/src/mainboard/google/nyan_big/pmic.c
+++ b/src/mainboard/google/nyan_big/pmic.c
@@ -19,7 +19,6 @@
#include <delay.h>
#include <device/i2c_simple.h>
#include <stdint.h>
-#include <stdlib.h>
#include <reset.h>
#include "pmic.h"
diff --git a/src/mainboard/google/nyan_blaze/boardid.c b/src/mainboard/google/nyan_blaze/boardid.c
index 2a2911c..49a9938 100644
--- a/src/mainboard/google/nyan_blaze/boardid.c
+++ b/src/mainboard/google/nyan_blaze/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <gpio.h>
-#include <stdlib.h>
uint32_t board_id(void)
{
diff --git a/src/mainboard/google/nyan_blaze/pmic.c b/src/mainboard/google/nyan_blaze/pmic.c
index 948d867..9e44f54 100644
--- a/src/mainboard/google/nyan_blaze/pmic.c
+++ b/src/mainboard/google/nyan_blaze/pmic.c
@@ -19,7 +19,6 @@
#include <delay.h>
#include <device/i2c_simple.h>
#include <stdint.h>
-#include <stdlib.h>
#include <reset.h>
#include "pmic.h"
diff --git a/src/mainboard/google/oak/boardid.c b/src/mainboard/google/oak/boardid.c
index 91e2df3..ada2de5 100644
--- a/src/mainboard/google/oak/boardid.c
+++ b/src/mainboard/google/oak/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <gpio.h>
#include <console/console.h>
-#include <stdlib.h>
#include "gpio.h"
static int board_id_value = -1;
diff --git a/src/mainboard/google/oak/sdram_configs.c b/src/mainboard/google/oak/sdram_configs.c
index 65b12ce..3419108 100644
--- a/src/mainboard/google/oak/sdram_configs.c
+++ b/src/mainboard/google/oak/sdram_configs.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <soc/emi.h>
-#include <stdlib.h>
static const struct mt8173_sdram_params sdram_configs[] = {
#include "sdram_inf/sdram-lpddr3-H9CCNNN8GTMLAR-2GB.inc" /* ram_code = 0000 */
diff --git a/src/mainboard/google/peach_pit/mainboard.c b/src/mainboard/google/peach_pit/mainboard.c
index 0441e52..da958c08 100644
--- a/src/mainboard/google/peach_pit/mainboard.c
+++ b/src/mainboard/google/peach_pit/mainboard.c
@@ -33,7 +33,6 @@
#include <soc/dp.h>
#include <soc/fimd.h>
#include <soc/usb.h>
-#include <stdlib.h>
#include <string.h>
#include <symbols.h>
#include <vbe.h>
diff --git a/src/mainboard/google/peach_pit/memory.c b/src/mainboard/google/peach_pit/memory.c
index a5e3d9e..541e3b0 100644
--- a/src/mainboard/google/peach_pit/memory.c
+++ b/src/mainboard/google/peach_pit/memory.c
@@ -19,7 +19,6 @@
#include <soc/gpio.h>
#include <soc/setup.h>
#include <stddef.h>
-#include <stdlib.h>
const struct mem_timings mem_timings = {
.mem_manuf = MEM_MANUF_SAMSUNG,
diff --git a/src/mainboard/google/peach_pit/romstage.c b/src/mainboard/google/peach_pit/romstage.c
index fdbe534..0c2cb3e 100644
--- a/src/mainboard/google/peach_pit/romstage.c
+++ b/src/mainboard/google/peach_pit/romstage.c
@@ -33,7 +33,6 @@
#include <soc/setup.h>
#include <soc/trustzone.h>
#include <soc/wakeup.h>
-#include <stdlib.h>
#include <timestamp.h>
#include <types.h>
diff --git a/src/mainboard/google/rambi/variants/banjo/gpio.c b/src/mainboard/google/rambi/variants/banjo/gpio.c
index bfb2c9a..e22c8db 100644
--- a/src/mainboard/google/rambi/variants/banjo/gpio.c
+++ b/src/mainboard/google/rambi/variants/banjo/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/candy/gpio.c b/src/mainboard/google/rambi/variants/candy/gpio.c
index 3cbfbaf..61050e5 100644
--- a/src/mainboard/google/rambi/variants/candy/gpio.c
+++ b/src/mainboard/google/rambi/variants/candy/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/clapper/gpio.c b/src/mainboard/google/rambi/variants/clapper/gpio.c
index 385b406..17303c3 100644
--- a/src/mainboard/google/rambi/variants/clapper/gpio.c
+++ b/src/mainboard/google/rambi/variants/clapper/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/enguarde/gpio.c b/src/mainboard/google/rambi/variants/enguarde/gpio.c
index 2802aa6..784ed23 100644
--- a/src/mainboard/google/rambi/variants/enguarde/gpio.c
+++ b/src/mainboard/google/rambi/variants/enguarde/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/glimmer/gpio.c b/src/mainboard/google/rambi/variants/glimmer/gpio.c
index 8cfe90e..504d64a 100644
--- a/src/mainboard/google/rambi/variants/glimmer/gpio.c
+++ b/src/mainboard/google/rambi/variants/glimmer/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/gnawty/gpio.c b/src/mainboard/google/rambi/variants/gnawty/gpio.c
index e79dc5a..7e2361c 100644
--- a/src/mainboard/google/rambi/variants/gnawty/gpio.c
+++ b/src/mainboard/google/rambi/variants/gnawty/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/heli/gpio.c b/src/mainboard/google/rambi/variants/heli/gpio.c
index 2a61c55..bcb1430 100644
--- a/src/mainboard/google/rambi/variants/heli/gpio.c
+++ b/src/mainboard/google/rambi/variants/heli/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/kip/gpio.c b/src/mainboard/google/rambi/variants/kip/gpio.c
index 3d79d37..56942bd 100644
--- a/src/mainboard/google/rambi/variants/kip/gpio.c
+++ b/src/mainboard/google/rambi/variants/kip/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/ninja/gpio.c b/src/mainboard/google/rambi/variants/ninja/gpio.c
index 85d565e..2d8285c 100644
--- a/src/mainboard/google/rambi/variants/ninja/gpio.c
+++ b/src/mainboard/google/rambi/variants/ninja/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/orco/gpio.c b/src/mainboard/google/rambi/variants/orco/gpio.c
index f2bbe8a..afa50cf 100644
--- a/src/mainboard/google/rambi/variants/orco/gpio.c
+++ b/src/mainboard/google/rambi/variants/orco/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/quawks/gpio.c b/src/mainboard/google/rambi/variants/quawks/gpio.c
index 3d79d37..56942bd 100644
--- a/src/mainboard/google/rambi/variants/quawks/gpio.c
+++ b/src/mainboard/google/rambi/variants/quawks/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/rambi/gpio.c b/src/mainboard/google/rambi/variants/rambi/gpio.c
index 3d79d37..56942bd 100644
--- a/src/mainboard/google/rambi/variants/rambi/gpio.c
+++ b/src/mainboard/google/rambi/variants/rambi/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/squawks/gpio.c b/src/mainboard/google/rambi/variants/squawks/gpio.c
index 3d79d37..56942bd 100644
--- a/src/mainboard/google/rambi/variants/squawks/gpio.c
+++ b/src/mainboard/google/rambi/variants/squawks/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/sumo/gpio.c b/src/mainboard/google/rambi/variants/sumo/gpio.c
index 0856c29..c4cc40a 100644
--- a/src/mainboard/google/rambi/variants/sumo/gpio.c
+++ b/src/mainboard/google/rambi/variants/sumo/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/swanky/gpio.c b/src/mainboard/google/rambi/variants/swanky/gpio.c
index a713549..3b62880 100644
--- a/src/mainboard/google/rambi/variants/swanky/gpio.c
+++ b/src/mainboard/google/rambi/variants/swanky/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/rambi/variants/winky/gpio.c b/src/mainboard/google/rambi/variants/winky/gpio.c
index dcdf6f5..9c3a338 100644
--- a/src/mainboard/google/rambi/variants/winky/gpio.c
+++ b/src/mainboard/google/rambi/variants/winky/gpio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include <mainboard/google/rambi/irqroute.h>
diff --git a/src/mainboard/google/slippy/variants/falco/romstage.c b/src/mainboard/google/slippy/variants/falco/romstage.c
index 25f8d27..2ccdb05 100644
--- a/src/mainboard/google/slippy/variants/falco/romstage.c
+++ b/src/mainboard/google/slippy/variants/falco/romstage.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <cbfs.h>
#include <console/console.h>
diff --git a/src/mainboard/google/slippy/variants/leon/romstage.c b/src/mainboard/google/slippy/variants/leon/romstage.c
index b95c6e1..47f45c7 100644
--- a/src/mainboard/google/slippy/variants/leon/romstage.c
+++ b/src/mainboard/google/slippy/variants/leon/romstage.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <cbfs.h>
#include <console/console.h>
diff --git a/src/mainboard/google/slippy/variants/peppy/romstage.c b/src/mainboard/google/slippy/variants/peppy/romstage.c
index 37c7853..d121227 100644
--- a/src/mainboard/google/slippy/variants/peppy/romstage.c
+++ b/src/mainboard/google/slippy/variants/peppy/romstage.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <cbfs.h>
#include <console/console.h>
diff --git a/src/mainboard/google/slippy/variants/wolf/romstage.c b/src/mainboard/google/slippy/variants/wolf/romstage.c
index 731b357..2d468c0 100644
--- a/src/mainboard/google/slippy/variants/wolf/romstage.c
+++ b/src/mainboard/google/slippy/variants/wolf/romstage.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <cbfs.h>
#include <console/console.h>
diff --git a/src/mainboard/google/smaug/boardid.c b/src/mainboard/google/smaug/boardid.c
index 2512f83..74f6f11 100644
--- a/src/mainboard/google/smaug/boardid.c
+++ b/src/mainboard/google/smaug/boardid.c
@@ -15,7 +15,6 @@
#include <boardid.h>
#include <soc/sdram.h>
-#include <stdlib.h>
#include "gpio.h"
diff --git a/src/mainboard/google/smaug/pmic.c b/src/mainboard/google/smaug/pmic.c
index a6e4574..bb4d25a 100644
--- a/src/mainboard/google/smaug/pmic.c
+++ b/src/mainboard/google/smaug/pmic.c
@@ -19,7 +19,6 @@
#include <delay.h>
#include <device/i2c_simple.h>
#include <stdint.h>
-#include <stdlib.h>
#include <reset.h>
#include "pmic.h"
diff --git a/src/mainboard/google/storm/boardid.c b/src/mainboard/google/storm/boardid.c
index 87f6d2a..d952155 100644
--- a/src/mainboard/google/storm/boardid.c
+++ b/src/mainboard/google/storm/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <gpio.h>
#include <console/console.h>
-#include <stdlib.h>
/*
* Storm boards dedicate to the board ID three GPIOs in tertiary mode: 29, 30
diff --git a/src/mainboard/google/urara/boardid.c b/src/mainboard/google/urara/boardid.c
index 9a6b64e..ef5d401 100644
--- a/src/mainboard/google/urara/boardid.c
+++ b/src/mainboard/google/urara/boardid.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <string.h>
#include <boardid.h>
diff --git a/src/mainboard/google/veyron/boardid.c b/src/mainboard/google/veyron/boardid.c
index c9c68cc..bf311cf 100644
--- a/src/mainboard/google/veyron/boardid.c
+++ b/src/mainboard/google/veyron/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <gpio.h>
-#include <stdlib.h>
uint32_t board_id(void)
{
diff --git a/src/mainboard/google/veyron/romstage.c b/src/mainboard/google/veyron/romstage.c
index 3870b63..eba96c4 100644
--- a/src/mainboard/google/veyron/romstage.c
+++ b/src/mainboard/google/veyron/romstage.c
@@ -27,7 +27,6 @@
#include <soc/grf.h>
#include <soc/rk808.h>
#include <soc/tsadc.h>
-#include <stdlib.h>
#include <symbols.h>
#include <timestamp.h>
#include <types.h>
diff --git a/src/mainboard/google/veyron_mickey/boardid.c b/src/mainboard/google/veyron_mickey/boardid.c
index 3833dbe..9c53e37 100644
--- a/src/mainboard/google/veyron_mickey/boardid.c
+++ b/src/mainboard/google/veyron_mickey/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <gpio.h>
-#include <stdlib.h>
uint32_t board_id(void)
{
diff --git a/src/mainboard/google/veyron_mickey/romstage.c b/src/mainboard/google/veyron_mickey/romstage.c
index c8a9842..d20bdb4 100644
--- a/src/mainboard/google/veyron_mickey/romstage.c
+++ b/src/mainboard/google/veyron_mickey/romstage.c
@@ -27,7 +27,6 @@
#include <soc/grf.h>
#include <soc/rk808.h>
#include <soc/tsadc.h>
-#include <stdlib.h>
#include <symbols.h>
#include <timestamp.h>
#include <types.h>
diff --git a/src/mainboard/google/veyron_rialto/boardid.c b/src/mainboard/google/veyron_rialto/boardid.c
index 3833dbe..9c53e37 100644
--- a/src/mainboard/google/veyron_rialto/boardid.c
+++ b/src/mainboard/google/veyron_rialto/boardid.c
@@ -16,7 +16,6 @@
#include <boardid.h>
#include <console/console.h>
#include <gpio.h>
-#include <stdlib.h>
uint32_t board_id(void)
{
diff --git a/src/mainboard/google/veyron_rialto/romstage.c b/src/mainboard/google/veyron_rialto/romstage.c
index d9fc42b..ac651ef 100644
--- a/src/mainboard/google/veyron_rialto/romstage.c
+++ b/src/mainboard/google/veyron_rialto/romstage.c
@@ -27,7 +27,6 @@
#include <soc/grf.h>
#include <soc/rk808.h>
#include <soc/tsadc.h>
-#include <stdlib.h>
#include <symbols.h>
#include <timestamp.h>
#include <types.h>
diff --git a/src/mainboard/hp/abm/BiosCallOuts.c b/src/mainboard/hp/abm/BiosCallOuts.c
index 4728c59..df0cb34 100644
--- a/src/mainboard/hp/abm/BiosCallOuts.c
+++ b/src/mainboard/hp/abm/BiosCallOuts.c
@@ -18,7 +18,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/hp/abm/buildOpts.c b/src/mainboard/hp/abm/buildOpts.c
index bc1b172..f965d0d 100644
--- a/src/mainboard/hp/abm/buildOpts.c
+++ b/src/mainboard/hp/abm/buildOpts.c
@@ -30,7 +30,6 @@
* @e \$Revision: 23714 $ @e \$Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $
*/
-#include <stdlib.h>
#include <AGESA.h>
#define INSTALL_FT3_SOCKET_SUPPORT TRUE
diff --git a/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c b/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
index e217aa7..c1afed7 100644
--- a/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
+++ b/src/mainboard/hp/dl165_g6_fam10/get_bus_conf.c
@@ -24,7 +24,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-#include <stdlib.h>
#include "mb_sysconf.h"
// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/BiosCallOuts.c b/src/mainboard/hp/pavilion_m6_1035dx/BiosCallOuts.c
index 2b1ac04..f36e11e 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/BiosCallOuts.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/BiosCallOuts.c
@@ -19,7 +19,6 @@
#include <southbridge/amd/agesa/hudson/imc.h>
#include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c b/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c
index c6d62ed..e56d513 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c
@@ -27,7 +27,6 @@
#include "mainboard.h"
-#include <stdlib.h>
#include <vendorcode/amd/agesa/f15tn/AGESA.h>
diff --git a/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c b/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c
index 237ef2a..89ac836 100644
--- a/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c
+++ b/src/mainboard/iei/kino-780am2-fam10/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/intel/bayleybay_fsp/gpio.c b/src/mainboard/intel/bayleybay_fsp/gpio.c
index 27b22c5..5517139 100644
--- a/src/mainboard/intel/bayleybay_fsp/gpio.c
+++ b/src/mainboard/intel/bayleybay_fsp/gpio.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include "irqroute.h"
diff --git a/src/mainboard/intel/kblrvp/mainboard.c b/src/mainboard/intel/kblrvp/mainboard.c
index 78c7ae4..d2e8719 100644
--- a/src/mainboard/intel/kblrvp/mainboard.c
+++ b/src/mainboard/intel/kblrvp/mainboard.c
@@ -18,7 +18,6 @@
#include <arch/acpi.h>
#include <device/device.h>
#include <gpio.h>
-#include <stdlib.h>
#include <soc/nhlt.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include "ec.h"
diff --git a/src/mainboard/intel/kunimitsu/mainboard.c b/src/mainboard/intel/kunimitsu/mainboard.c
index 4c93051..be2f262 100644
--- a/src/mainboard/intel/kunimitsu/mainboard.c
+++ b/src/mainboard/intel/kunimitsu/mainboard.c
@@ -19,7 +19,6 @@
#include <console/console.h>
#include <device/device.h>
#include <gpio.h>
-#include <stdlib.h>
#include <soc/nhlt.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include "ec.h"
diff --git a/src/mainboard/intel/minnowmax/gpio.c b/src/mainboard/intel/minnowmax/gpio.c
index b0f78c8..34d36a0 100644
--- a/src/mainboard/intel/minnowmax/gpio.c
+++ b/src/mainboard/intel/minnowmax/gpio.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include "irqroute.h"
diff --git a/src/mainboard/intel/strago/gpio.c b/src/mainboard/intel/strago/gpio.c
index ed9ae4b..9acc8a0 100644
--- a/src/mainboard/intel/strago/gpio.c
+++ b/src/mainboard/intel/strago/gpio.c
@@ -16,7 +16,6 @@
#include "irqroute.h"
#include <soc/gpio.h>
-#include <stdlib.h>
#include <boardid.h>
#include "onboard.h"
#include "gpio.h"
diff --git a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
index 86999fb..2c99bd0 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
@@ -19,7 +19,6 @@
#include <amdlib.h>
#include <vendorcode/amd/cimx/sb800/SB800.h>
#include <stdint.h>
-#include <stdlib.h>
static AGESA_STATUS board_GnbPcieSlotReset (UINT32 Func, UINTN Data, VOID *ConfigPtr);
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
index 65986e2..7a797cb 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <vendorcode/amd/agesa/f14/AGESA.h>
diff --git a/src/mainboard/jetway/pa78vm5/get_bus_conf.c b/src/mainboard/jetway/pa78vm5/get_bus_conf.c
index ee2a6ca..24e44e6 100644
--- a/src/mainboard/jetway/pa78vm5/get_bus_conf.c
+++ b/src/mainboard/jetway/pa78vm5/get_bus_conf.c
@@ -15,7 +15,6 @@
#include <device/pci.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/lenovo/g505s/BiosCallOuts.c b/src/mainboard/lenovo/g505s/BiosCallOuts.c
index 2b1ac04..f36e11e 100644
--- a/src/mainboard/lenovo/g505s/BiosCallOuts.c
+++ b/src/mainboard/lenovo/g505s/BiosCallOuts.c
@@ -19,7 +19,6 @@
#include <southbridge/amd/agesa/hudson/imc.h>
#include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/lenovo/g505s/buildOpts.c b/src/mainboard/lenovo/g505s/buildOpts.c
index c3e40ce..3adf20d9 100644
--- a/src/mainboard/lenovo/g505s/buildOpts.c
+++ b/src/mainboard/lenovo/g505s/buildOpts.c
@@ -27,7 +27,6 @@
#include "mainboard.h"
-#include <stdlib.h>
#include <vendorcode/amd/agesa/f15tn/AGESA.h>
diff --git a/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c b/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
index eca687c..404e18d 100644
--- a/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
+++ b/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
-#include <stdlib.h>
/* Should AGESA_GNB_PCIE_SLOT_RESET use agesa_NoopSuccess?
*
diff --git a/src/mainboard/lippert/frontrunner-af/buildOpts.c b/src/mainboard/lippert/frontrunner-af/buildOpts.c
index 0563243..89d9872 100644
--- a/src/mainboard/lippert/frontrunner-af/buildOpts.c
+++ b/src/mainboard/lippert/frontrunner-af/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
diff --git a/src/mainboard/lippert/frontrunner-af/mainboard.c b/src/mainboard/lippert/frontrunner-af/mainboard.c
index 6530276..74f3aba 100644
--- a/src/mainboard/lippert/frontrunner-af/mainboard.c
+++ b/src/mainboard/lippert/frontrunner-af/mainboard.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/mainboard/lippert/frontrunner-af/sema.c b/src/mainboard/lippert/frontrunner-af/sema.c
index 757d8da..02b4544 100644
--- a/src/mainboard/lippert/frontrunner-af/sema.c
+++ b/src/mainboard/lippert/frontrunner-af/sema.c
@@ -11,7 +11,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
diff --git a/src/mainboard/lippert/toucan-af/BiosCallOuts.c b/src/mainboard/lippert/toucan-af/BiosCallOuts.c
index 4841008..963a377 100644
--- a/src/mainboard/lippert/toucan-af/BiosCallOuts.c
+++ b/src/mainboard/lippert/toucan-af/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
-#include <stdlib.h>
/* Should AGESA_GNB_PCIE_SLOT_RESET use agesa_NoopSuccess?
*
diff --git a/src/mainboard/lippert/toucan-af/buildOpts.c b/src/mainboard/lippert/toucan-af/buildOpts.c
index 0563243..89d9872 100644
--- a/src/mainboard/lippert/toucan-af/buildOpts.c
+++ b/src/mainboard/lippert/toucan-af/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
diff --git a/src/mainboard/lippert/toucan-af/mainboard.c b/src/mainboard/lippert/toucan-af/mainboard.c
index b7126ea..59f140b 100644
--- a/src/mainboard/lippert/toucan-af/mainboard.c
+++ b/src/mainboard/lippert/toucan-af/mainboard.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
diff --git a/src/mainboard/msi/ms7721/BiosCallOuts.c b/src/mainboard/msi/ms7721/BiosCallOuts.c
index b3cac1d..eb3c43c 100644
--- a/src/mainboard/msi/ms7721/BiosCallOuts.c
+++ b/src/mainboard/msi/ms7721/BiosCallOuts.c
@@ -19,7 +19,6 @@
#include <northbridge/amd/agesa/state_machine.h>
#include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h>
-#include <stdlib.h>
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
diff --git a/src/mainboard/msi/ms7721/buildOpts.c b/src/mainboard/msi/ms7721/buildOpts.c
index 9e57e39..2dd223d 100644
--- a/src/mainboard/msi/ms7721/buildOpts.c
+++ b/src/mainboard/msi/ms7721/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
#include <vendorcode/amd/agesa/f15tn/AGESA.h>
diff --git a/src/mainboard/msi/ms9652_fam10/get_bus_conf.c b/src/mainboard/msi/ms9652_fam10/get_bus_conf.c
index 74b14b4..02e191d 100644
--- a/src/mainboard/msi/ms9652_fam10/get_bus_conf.c
+++ b/src/mainboard/msi/ms9652_fam10/get_bus_conf.c
@@ -24,7 +24,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-#include <stdlib.h>
#include "mb_sysconf.h"
// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
diff --git a/src/mainboard/opencellular/elgon/romstage.c b/src/mainboard/opencellular/elgon/romstage.c
index 94c09ec..d907351 100644
--- a/src/mainboard/opencellular/elgon/romstage.c
+++ b/src/mainboard/opencellular/elgon/romstage.c
@@ -19,7 +19,6 @@
#include <soc/sdram.h>
#include <soc/timer.h>
#include <soc/mmu.h>
-#include <stdlib.h>
#include <console/console.h>
#include <program_loading.h>
#include <libbdk-hal/bdk-config.h>
diff --git a/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c b/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c
index 78d1ad6..4751c00 100644
--- a/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c
+++ b/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c
@@ -15,7 +15,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include "../../irqroute.h"
diff --git a/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c b/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c
index c9d5426..9dc3f2c 100644
--- a/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c
+++ b/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c
@@ -15,7 +15,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include "../../irqroute.h"
diff --git a/src/mainboard/pcengines/apu1/BiosCallOuts.c b/src/mainboard/pcengines/apu1/BiosCallOuts.c
index 906ecb6..561ecf3 100644
--- a/src/mainboard/pcengines/apu1/BiosCallOuts.c
+++ b/src/mainboard/pcengines/apu1/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <spd_bin.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <SB800.h>
-#include <stdlib.h>
#include "gpio_ftns.h"
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
diff --git a/src/mainboard/pcengines/apu1/buildOpts.c b/src/mainboard/pcengines/apu1/buildOpts.c
index 1f73eee..3c037e5 100644
--- a/src/mainboard/pcengines/apu1/buildOpts.c
+++ b/src/mainboard/pcengines/apu1/buildOpts.c
@@ -25,7 +25,6 @@
*
*/
-#include <stdlib.h>
/* Select the CPU family. */
diff --git a/src/mainboard/pcengines/apu2/BiosCallOuts.c b/src/mainboard/pcengines/apu2/BiosCallOuts.c
index 8fc3d5a..f1a4984 100644
--- a/src/mainboard/pcengines/apu2/BiosCallOuts.c
+++ b/src/mainboard/pcengines/apu2/BiosCallOuts.c
@@ -17,7 +17,6 @@
#include <spd_bin.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <FchPlatform.h>
-#include <stdlib.h>
#include "gpio_ftns.h"
#include "imc.h"
diff --git a/src/mainboard/roda/rk886ex/m3885.c b/src/mainboard/roda/rk886ex/m3885.c
index 60a4f48..d4e90b8 100644
--- a/src/mainboard/roda/rk886ex/m3885.c
+++ b/src/mainboard/roda/rk886ex/m3885.c
@@ -15,7 +15,6 @@
*/
#include <types.h>
-#include <stdlib.h>
#include <console/console.h>
#include <arch/io.h>
#include <delay.h>
diff --git a/src/mainboard/roda/rk9/mainboard.c b/src/mainboard/roda/rk9/mainboard.c
index 3f72398..6057901 100644
--- a/src/mainboard/roda/rk9/mainboard.c
+++ b/src/mainboard/roda/rk9/mainboard.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/io.h>
#include <device/device.h>
#include <drivers/intel/gma/int15.h>
diff --git a/src/mainboard/scaleway/tagada/bmcinfo.c b/src/mainboard/scaleway/tagada/bmcinfo.c
index 237d551..cafde0c 100644
--- a/src/mainboard/scaleway/tagada/bmcinfo.c
+++ b/src/mainboard/scaleway/tagada/bmcinfo.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/early_variables.h>
#include <console/console.h>
#include <console/uart.h>
diff --git a/src/mainboard/siemens/mc_tcu3/gpio.c b/src/mainboard/siemens/mc_tcu3/gpio.c
index 23c6f96..bc952f4 100644
--- a/src/mainboard/siemens/mc_tcu3/gpio.c
+++ b/src/mainboard/siemens/mc_tcu3/gpio.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <soc/gpio.h>
#include "irqroute.h"
diff --git a/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c b/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
index ea58e02..f5895b1 100644
--- a/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
+++ b/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
@@ -14,6 +14,7 @@
*/
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include <soc/otp.h>
#include <soc/sdram.h>
diff --git a/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c
index 6279d9c..26af74b 100644
--- a/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c
+++ b/src/mainboard/supermicro/h8dmr_fam10/get_bus_conf.c
@@ -24,7 +24,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-#include <stdlib.h>
#include "mb_sysconf.h"
// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
diff --git a/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c
index f32312d..2d5d999 100644
--- a/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c
+++ b/src/mainboard/supermicro/h8qme_fam10/get_bus_conf.c
@@ -24,7 +24,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-#include <stdlib.h>
#include "mb_sysconf.h"
// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
diff --git a/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c b/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c
index 8bc96c2..504434b 100644
--- a/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c
+++ b/src/mainboard/supermicro/h8scm_fam10/get_bus_conf.c
@@ -16,7 +16,6 @@
#include <device/pci.h>
#include <device/pci_ops.h>
#include <stdint.h>
-#include <stdlib.h>
#include <cpu/amd/multicore.h>
#include <cpu/amd/amdfam10_sysconf.h>
diff --git a/src/mainboard/ti/beaglebone/leds.c b/src/mainboard/ti/beaglebone/leds.c
index a4889b9..dd1471d 100644
--- a/src/mainboard/ti/beaglebone/leds.c
+++ b/src/mainboard/ti/beaglebone/leds.c
@@ -14,7 +14,6 @@
#include <assert.h>
#include <cpu/ti/am335x/gpio.h>
-#include <stdlib.h>
#include "leds.h"
diff --git a/src/mainboard/tyan/s2912_fam10/get_bus_conf.c b/src/mainboard/tyan/s2912_fam10/get_bus_conf.c
index f589ef6..6e7cc9e 100644
--- a/src/mainboard/tyan/s2912_fam10/get_bus_conf.c
+++ b/src/mainboard/tyan/s2912_fam10/get_bus_conf.c
@@ -24,7 +24,6 @@
#include <cpu/amd/amdfam10_sysconf.h>
-#include <stdlib.h>
#include "mb_sysconf.h"
// Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
diff --git a/src/northbridge/amd/agesa/family12/dimmSpd.c b/src/northbridge/amd/agesa/family12/dimmSpd.c
index 822c577..a709679 100644
--- a/src/northbridge/amd/agesa/family12/dimmSpd.c
+++ b/src/northbridge/amd/agesa/family12/dimmSpd.c
@@ -27,7 +27,6 @@
*
*/
-#include <stdlib.h>
#include <Porting.h>
#include <AGESA.h>
diff --git a/src/northbridge/amd/agesa/family12/northbridge.c b/src/northbridge/amd/agesa/family12/northbridge.c
index 290ab16..d1ddf12 100644
--- a/src/northbridge/amd/agesa/family12/northbridge.c
+++ b/src/northbridge/amd/agesa/family12/northbridge.c
@@ -22,7 +22,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/hypertransport.h>
-#include <stdlib.h>
#include <string.h>
#include <lib.h>
#include <cpu/cpu.h>
diff --git a/src/northbridge/amd/agesa/family14/dimmSpd.c b/src/northbridge/amd/agesa/family14/dimmSpd.c
index 9877650..6525552 100644
--- a/src/northbridge/amd/agesa/family14/dimmSpd.c
+++ b/src/northbridge/amd/agesa/family14/dimmSpd.c
@@ -15,7 +15,6 @@
#include <device/pci_def.h>
#include <device/device.h>
-#include <stdlib.h>
#include <OEM.h> /* SMBUS0_BASE_ADDRESS */
/* warning: Porting.h includes an open #pragma pack(1) */
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c
index a52f7ec..e4f26f6 100644
--- a/src/northbridge/amd/agesa/family14/northbridge.c
+++ b/src/northbridge/amd/agesa/family14/northbridge.c
@@ -22,7 +22,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/hypertransport.h>
-#include <stdlib.h>
#include <string.h>
#include <lib.h>
#include <cpu/cpu.h>
diff --git a/src/northbridge/amd/agesa/family15tn/dimmSpd.c b/src/northbridge/amd/agesa/family15tn/dimmSpd.c
index 7ca4709..30fd74b 100644
--- a/src/northbridge/amd/agesa/family15tn/dimmSpd.c
+++ b/src/northbridge/amd/agesa/family15tn/dimmSpd.c
@@ -15,7 +15,6 @@
#include <device/pci_def.h>
#include <device/device.h>
-#include <stdlib.h>
/* warning: Porting.h includes an open #pragma pack(1) */
#include <Porting.h>
diff --git a/src/northbridge/amd/agesa/family16kb/dimmSpd.c b/src/northbridge/amd/agesa/family16kb/dimmSpd.c
index 8c453bb..78dc128 100644
--- a/src/northbridge/amd/agesa/family16kb/dimmSpd.c
+++ b/src/northbridge/amd/agesa/family16kb/dimmSpd.c
@@ -15,7 +15,6 @@
#include <device/pci_def.h>
#include <device/device.h>
-#include <stdlib.h>
/* warning: Porting.h includes an open #pragma pack(1) */
#include <Porting.h>
diff --git a/src/northbridge/amd/amdht/comlib.h b/src/northbridge/amd/amdht/comlib.h
index d497fd2..d7b53c3 100644
--- a/src/northbridge/amd/amdht/comlib.h
+++ b/src/northbridge/amd/amdht/comlib.h
@@ -20,7 +20,6 @@
#define FILECODE 0xF001
#include <inttypes.h>
-#include <stdlib.h>
#include "porting.h"
#ifdef AMD_DEBUG
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/s3utils.c b/src/northbridge/amd/amdmct/mct_ddr3/s3utils.c
index a78a752..7f72388 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/s3utils.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/s3utils.c
@@ -30,9 +30,10 @@
#include <spi_flash.h>
#include <pc80/mc146818rtc.h>
#include <inttypes.h>
+#include <stdlib.h>
+
#include "mct_d.h"
#include "mct_d_gcc.h"
-
#include "s3utils.h"
#define S3NV_FILE_NAME "s3nv"
diff --git a/src/northbridge/amd/amdmct/wrappers/mcti.h b/src/northbridge/amd/amdmct/wrappers/mcti.h
index 92dc0b8..baab526 100644
--- a/src/northbridge/amd/amdmct/wrappers/mcti.h
+++ b/src/northbridge/amd/amdmct/wrappers/mcti.h
@@ -19,7 +19,6 @@
#define MCTI_H
#include <inttypes.h>
-#include <stdlib.h>
#include <pc80/mc146818rtc.h>
struct DCTStatStruc;
diff --git a/src/northbridge/amd/pi/00660F01/dimmSpd.c b/src/northbridge/amd/pi/00660F01/dimmSpd.c
index 0de7654..91b276c 100644
--- a/src/northbridge/amd/pi/00660F01/dimmSpd.c
+++ b/src/northbridge/amd/pi/00660F01/dimmSpd.c
@@ -15,7 +15,6 @@
#include <device/pci_def.h>
#include <device/device.h>
-#include <stdlib.h>
/* warning: Porting.h includes an open #pragma pack(1) */
#include <Porting.h>
diff --git a/src/northbridge/intel/e7505/debug.c b/src/northbridge/intel/e7505/debug.c
index 357a963..baa0bf1 100644
--- a/src/northbridge/intel/e7505/debug.c
+++ b/src/northbridge/intel/e7505/debug.c
@@ -13,7 +13,6 @@
#include <device/pci_def.h>
#include <console/console.h>
-#include <stdlib.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <spd.h>
diff --git a/src/northbridge/intel/e7505/northbridge.c b/src/northbridge/intel/e7505/northbridge.c
index e3d3faf..40c94fd 100644
--- a/src/northbridge/intel/e7505/northbridge.c
+++ b/src/northbridge/intel/e7505/northbridge.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <cpu/cpu.h>
-#include <stdlib.h>
#include "e7505.h"
diff --git a/src/northbridge/intel/e7505/raminit.c b/src/northbridge/intel/e7505/raminit.c
index 3bb1f67..18d3abe 100644
--- a/src/northbridge/intel/e7505/raminit.c
+++ b/src/northbridge/intel/e7505/raminit.c
@@ -30,7 +30,6 @@
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <lib.h>
-#include <stdlib.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <cpu/x86/mtrr.h>
diff --git a/src/northbridge/intel/fsp_rangeley/northbridge.c b/src/northbridge/intel/fsp_rangeley/northbridge.c
index 0c08197..a6aafa9 100644
--- a/src/northbridge/intel/fsp_rangeley/northbridge.c
+++ b/src/northbridge/intel/fsp_rangeley/northbridge.c
@@ -23,7 +23,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include <drivers/intel/fsp1_0/fsp_util.h>
#include <cpu/x86/lapic.h>
diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c
index f011cce..261fef5 100644
--- a/src/northbridge/intel/gm45/northbridge.c
+++ b/src/northbridge/intel/gm45/northbridge.c
@@ -19,7 +19,6 @@
#include <stdint.h>
#include <device/device.h>
#include <device/pci.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include <boot/tables.h>
#include <arch/acpi.h>
diff --git a/src/northbridge/intel/haswell/early_init.c b/src/northbridge/intel/haswell/early_init.c
index 6fef0da..80d827b 100644
--- a/src/northbridge/intel/haswell/early_init.c
+++ b/src/northbridge/intel/haswell/early_init.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <console/console.h>
#include <device/mmio.h>
#include <device/pci_def.h>
diff --git a/src/northbridge/intel/haswell/finalize.c b/src/northbridge/intel/haswell/finalize.c
index 1777006..ca36634 100644
--- a/src/northbridge/intel/haswell/finalize.c
+++ b/src/northbridge/intel/haswell/finalize.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <device/pci_ops.h>
#include "haswell.h"
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 0fd0228..7482747 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -29,7 +29,6 @@
#include <cpu/intel/haswell/haswell.h>
#include <drivers/intel/gma/opregion.h>
#include <southbridge/intel/lynxpoint/nvs.h>
-#include <stdlib.h>
#include <string.h>
#include "chip.h"
diff --git a/src/northbridge/intel/haswell/minihd.c b/src/northbridge/intel/haswell/minihd.c
index a646071..b8d98a7 100644
--- a/src/northbridge/intel/haswell/minihd.c
+++ b/src/northbridge/intel/haswell/minihd.c
@@ -21,7 +21,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <stdlib.h>
#include <southbridge/intel/lynxpoint/hda_verb.h>
static const u32 minihd_verb_table[] = {
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c
index 2b7afa8..067d5c1 100644
--- a/src/northbridge/intel/haswell/northbridge.c
+++ b/src/northbridge/intel/haswell/northbridge.c
@@ -25,7 +25,6 @@
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
-#include <stdlib.h>
#include <cpu/x86/smm.h>
#include <boot/tables.h>
diff --git a/src/northbridge/intel/i440bx/northbridge.c b/src/northbridge/intel/i440bx/northbridge.c
index ef6329c..d23a843 100644
--- a/src/northbridge/intel/i440bx/northbridge.c
+++ b/src/northbridge/intel/i440bx/northbridge.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include "northbridge.h"
#include "i440bx.h"
diff --git a/src/northbridge/intel/i440bx/raminit.c b/src/northbridge/intel/i440bx/raminit.c
index 91959c7..0f9f2f6 100644
--- a/src/northbridge/intel/i440bx/raminit.c
+++ b/src/northbridge/intel/i440bx/raminit.c
@@ -18,7 +18,6 @@
#include <spd.h>
#include <delay.h>
#include <stdint.h>
-#include <stdlib.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
diff --git a/src/northbridge/intel/i945/early_init.c b/src/northbridge/intel/i945/early_init.c
index d3ed277..344015f 100644
--- a/src/northbridge/intel/i945/early_init.c
+++ b/src/northbridge/intel/i945/early_init.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <console/console.h>
#include <arch/io.h>
#include <device/pci_ops.h>
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c
index 82392f4..576343d 100644
--- a/src/northbridge/intel/i945/northbridge.c
+++ b/src/northbridge/intel/i945/northbridge.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include <arch/acpi.h>
#include <cpu/intel/smm/gen1/smi.h>
diff --git a/src/northbridge/intel/nehalem/early_init.c b/src/northbridge/intel/nehalem/early_init.c
index a5cac7b..f12416e 100644
--- a/src/northbridge/intel/nehalem/early_init.c
+++ b/src/northbridge/intel/nehalem/early_init.c
@@ -16,7 +16,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <console/console.h>
#include <arch/io.h>
#include <device/pci_ops.h>
diff --git a/src/northbridge/intel/nehalem/finalize.c b/src/northbridge/intel/nehalem/finalize.c
index 97f6011..f57f21a 100644
--- a/src/northbridge/intel/nehalem/finalize.c
+++ b/src/northbridge/intel/nehalem/finalize.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <device/pci_ops.h>
#include "nehalem.h"
diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c
index 575c600..7e56a12 100644
--- a/src/northbridge/intel/nehalem/northbridge.c
+++ b/src/northbridge/intel/nehalem/northbridge.c
@@ -25,7 +25,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include "chip.h"
#include "nehalem.h"
diff --git a/src/northbridge/intel/pineview/early_init.c b/src/northbridge/intel/pineview/early_init.c
index a0d5305..bd2d19c 100644
--- a/src/northbridge/intel/pineview/early_init.c
+++ b/src/northbridge/intel/pineview/early_init.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <console/console.h>
#include <arch/io.h>
#include <device/pci_ops.h>
diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c
index 4b67cfd..01d930b 100644
--- a/src/northbridge/intel/pineview/northbridge.c
+++ b/src/northbridge/intel/pineview/northbridge.c
@@ -20,7 +20,6 @@
#include <stdint.h>
#include <device/device.h>
#include <device/pci.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include <boot/tables.h>
#include <arch/acpi.h>
diff --git a/src/northbridge/intel/sandybridge/early_init.c b/src/northbridge/intel/sandybridge/early_init.c
index ad579c6..08e873a 100644
--- a/src/northbridge/intel/sandybridge/early_init.c
+++ b/src/northbridge/intel/sandybridge/early_init.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <console/console.h>
#include <arch/io.h>
#include <device/pci_ops.h>
diff --git a/src/northbridge/intel/sandybridge/finalize.c b/src/northbridge/intel/sandybridge/finalize.c
index 7051b24..a8f8603 100644
--- a/src/northbridge/intel/sandybridge/finalize.c
+++ b/src/northbridge/intel/sandybridge/finalize.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <device/pci_ops.h>
#include "sandybridge.h"
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c
index 477c26e..d44c343 100644
--- a/src/northbridge/intel/sandybridge/northbridge.c
+++ b/src/northbridge/intel/sandybridge/northbridge.c
@@ -24,7 +24,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include "chip.h"
#include "sandybridge.h"
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c
index b6616e1..f6e6671 100644
--- a/src/northbridge/intel/x4x/northbridge.c
+++ b/src/northbridge/intel/x4x/northbridge.c
@@ -20,7 +20,6 @@
#include <stdint.h>
#include <device/device.h>
#include <device/pci.h>
-#include <stdlib.h>
#include <cpu/cpu.h>
#include <boot/tables.h>
#include <arch/acpi.h>
diff --git a/src/northbridge/via/vx900/chrome9hd.c b/src/northbridge/via/vx900/chrome9hd.c
index 163f6b1..bba8071 100644
--- a/src/northbridge/via/vx900/chrome9hd.c
+++ b/src/northbridge/via/vx900/chrome9hd.c
@@ -19,7 +19,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <pc80/vga_io.h>
-#include <stdlib.h>
#include "vx900.h"
diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c
index e466eb8..d0d1b0b 100644
--- a/src/security/tpm/tspi/tspi.c
+++ b/src/security/tpm/tspi/tspi.c
@@ -19,7 +19,6 @@
#include <console/console.h>
#include <security/tpm/tspi.h>
#include <security/tpm/tss.h>
-#include <stdlib.h>
#if CONFIG(VBOOT)
#include <vb2_api.h>
#include <assert.h>
diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
index 62bc6a9..f06cbca 100644
--- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
+++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
@@ -7,7 +7,6 @@
#include <arch/early_variables.h>
#include <commonlib/iobuf.h>
#include <console/console.h>
-#include <stdlib.h>
#include <string.h>
#include "tss_marshaling.h"
diff --git a/src/security/vboot/secdata_mock.c b/src/security/vboot/secdata_mock.c
index 3075d33..53265c1 100644
--- a/src/security/vboot/secdata_mock.c
+++ b/src/security/vboot/secdata_mock.c
@@ -32,7 +32,6 @@
* stored in the TPM NVRAM.
*/
-#include <stdlib.h>
#include <security/tpm/tspi.h>
#include <vb2_api.h>
diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c
index 39cd614..58c2fbf 100644
--- a/src/security/vboot/secdata_tpm.c
+++ b/src/security/vboot/secdata_tpm.c
@@ -33,7 +33,6 @@
*/
#include <security/vboot/antirollback.h>
-#include <stdlib.h>
#include <string.h>
#include <security/tpm/tspi.h>
#include <vb2_api.h>
diff --git a/src/security/vboot/vboot_handoff.c b/src/security/vboot/vboot_handoff.c
index e64775e..7871e46 100644
--- a/src/security/vboot/vboot_handoff.c
+++ b/src/security/vboot/vboot_handoff.c
@@ -30,7 +30,6 @@
#include <console/console.h>
#include <console/vtxprintf.h>
#include <fmap.h>
-#include <stdlib.h>
#include <vboot_struct.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/misc.h>
diff --git a/src/soc/amd/stoneyridge/BiosCallOuts.c b/src/soc/amd/stoneyridge/BiosCallOuts.c
index 1027ae0..657e413 100644
--- a/src/soc/amd/stoneyridge/BiosCallOuts.c
+++ b/src/soc/amd/stoneyridge/BiosCallOuts.c
@@ -20,7 +20,6 @@
#include <amdblocks/BiosCallOuts.h>
#include <soc/southbridge.h>
#include <soc/pci_devs.h>
-#include <stdlib.h>
#include <amdblocks/agesawrapper.h>
#include <amdblocks/dimm_spd.h>
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 927cce0..6d64c00 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -38,7 +38,6 @@
#include <soc/pci_devs.h>
#include <soc/iomap.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <arch/bert_storage.h>
diff --git a/src/soc/amd/stoneyridge/sm.c b/src/soc/amd/stoneyridge/sm.c
index 9344b2f..dc5adf0 100644
--- a/src/soc/amd/stoneyridge/sm.c
+++ b/src/soc/amd/stoneyridge/sm.c
@@ -20,7 +20,6 @@
#include <device/smbus.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>
-#include <stdlib.h>
#include <soc/southbridge.h>
#include <soc/smbus.h>
diff --git a/src/soc/amd/stoneyridge/spi.c b/src/soc/amd/stoneyridge/spi.c
index c682d98..cc3d6e9 100644
--- a/src/soc/amd/stoneyridge/spi.c
+++ b/src/soc/amd/stoneyridge/spi.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <device/mmio.h>
#include <lib.h>
#include <timer.h>
diff --git a/src/soc/cavium/cn81xx/cbmem.c b/src/soc/cavium/cn81xx/cbmem.c
index bb6fa18..5a4ad19 100644
--- a/src/soc/cavium/cn81xx/cbmem.c
+++ b/src/soc/cavium/cn81xx/cbmem.c
@@ -17,7 +17,6 @@
#include <cbmem.h>
#include <soc/addressmap.h>
#include <soc/sdram.h>
-#include <stdlib.h>
#include <symbols.h>
void *cbmem_top(void)
diff --git a/src/soc/cavium/cn81xx/spi.c b/src/soc/cavium/cn81xx/spi.c
index 2ba25a2..6a5abb1 100644
--- a/src/soc/cavium/cn81xx/spi.c
+++ b/src/soc/cavium/cn81xx/spi.c
@@ -25,7 +25,6 @@
#include <soc/clock.h>
#include <spi-generic.h>
#include <spi_flash.h>
-#include <stdlib.h>
#include <timer.h>
union cavium_spi_cfg {
diff --git a/src/soc/imgtec/pistachio/cbmem.c b/src/soc/imgtec/pistachio/cbmem.c
index 112df7c..964300e 100644
--- a/src/soc/imgtec/pistachio/cbmem.c
+++ b/src/soc/imgtec/pistachio/cbmem.c
@@ -15,7 +15,6 @@
*/
#include <cbmem.h>
-#include <stdlib.h>
#include <symbols.h>
void *cbmem_top(void)
diff --git a/src/soc/imgtec/pistachio/spi.c b/src/soc/imgtec/pistachio/spi.c
index cd27ce1..13a404d 100644
--- a/src/soc/imgtec/pistachio/spi.c
+++ b/src/soc/imgtec/pistachio/spi.c
@@ -19,7 +19,6 @@
#include <soc/spi.h>
#include <spi_flash.h>
#include <spi-generic.h>
-#include <stdlib.h>
#include <string.h>
#include <timer.h>
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c
index 9526932..5b55d2e 100644
--- a/src/soc/intel/baytrail/cpu.c
+++ b/src/soc/intel/baytrail/cpu.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <cpu/cpu.h>
#include <cpu/intel/common/common.h>
diff --git a/src/soc/intel/baytrail/gfx.c b/src/soc/intel/baytrail/gfx.c
index 5d6d504..1933167 100644
--- a/src/soc/intel/baytrail/gfx.c
+++ b/src/soc/intel/baytrail/gfx.c
@@ -21,7 +21,6 @@
#include <device/pci_ids.h>
#include <drivers/intel/gma/opregion.h>
#include <reg_script.h>
-#include <stdlib.h>
#include <soc/gfx.h>
#include <soc/iosf.h>
#include <soc/nvs.h>
diff --git a/src/soc/intel/baytrail/ramstage.c b/src/soc/intel/baytrail/ramstage.c
index 1715198..769e7ff 100644
--- a/src/soc/intel/baytrail/ramstage.c
+++ b/src/soc/intel/baytrail/ramstage.c
@@ -23,7 +23,6 @@
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/gpio.h>
diff --git a/src/soc/intel/baytrail/smihandler.c b/src/soc/intel/baytrail/smihandler.c
index 1bc9ed1..3679b55 100644
--- a/src/soc/intel/baytrail/smihandler.c
+++ b/src/soc/intel/baytrail/smihandler.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <console/console.h>
diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c
index 5f86a11..feab0c7 100644
--- a/src/soc/intel/braswell/cpu.c
+++ b/src/soc/intel/braswell/cpu.c
@@ -33,7 +33,6 @@
#include <soc/pattrs.h>
#include <soc/ramstage.h>
#include <soc/smm.h>
-#include <stdlib.h>
/* Core level MSRs */
static const struct reg_script core_msr_script[] = {
diff --git a/src/soc/intel/braswell/ramstage.c b/src/soc/intel/braswell/ramstage.c
index d6a1cda..f8011fd 100644
--- a/src/soc/intel/braswell/ramstage.c
+++ b/src/soc/intel/braswell/ramstage.c
@@ -37,7 +37,6 @@
#include <soc/ramstage.h>
#include <soc/intel/common/acpi.h>
#include <boardid.h>
-#include <stdlib.h>
#include <string.h>
#define SHOW_PATTRS 1
diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c
index a723309..f9d931e 100644
--- a/src/soc/intel/braswell/smihandler.c
+++ b/src/soc/intel/braswell/smihandler.c
@@ -28,7 +28,6 @@
#include <soc/pm.h>
#include <spi-generic.h>
#include <stdint.h>
-#include <stdlib.h>
#include <soc/gpio.h>
/* GNVS needs to be set by coreboot initiating a software SMI. */
diff --git a/src/soc/intel/broadwell/finalize.c b/src/soc/intel/broadwell/finalize.c
index 1adbbc8..f270f9b 100644
--- a/src/soc/intel/broadwell/finalize.c
+++ b/src/soc/intel/broadwell/finalize.c
@@ -20,7 +20,6 @@
#include <cpu/x86/smm.h>
#include <reg_script.h>
#include <spi-generic.h>
-#include <stdlib.h>
#include <soc/pci_devs.h>
#include <soc/lpc.h>
#include <soc/me.h>
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
index 319549d..9b0ee70 100644
--- a/src/soc/intel/broadwell/igd.c
+++ b/src/soc/intel/broadwell/igd.c
@@ -22,7 +22,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <string.h>
#include <reg_script.h>
#include <cbmem.h>
diff --git a/src/soc/intel/broadwell/me.c b/src/soc/intel/broadwell/me.c
index dd5e5b8..05f69b5 100644
--- a/src/soc/intel/broadwell/me.c
+++ b/src/soc/intel/broadwell/me.c
@@ -39,7 +39,7 @@
#include <soc/ramstage.h>
#include <soc/rcba.h>
#include <soc/intel/broadwell/chip.h>
-
+#include <stdlib.h>
#if CONFIG(CHROMEOS)
#include <vendorcode/google/chromeos/chromeos.h>
#include <vendorcode/google/chromeos/gnvs.h>
diff --git a/src/soc/intel/broadwell/me_status.c b/src/soc/intel/broadwell/me_status.c
index 08fd48f..3b2c680 100644
--- a/src/soc/intel/broadwell/me_status.c
+++ b/src/soc/intel/broadwell/me_status.c
@@ -16,7 +16,6 @@
#include <device/pci_ops.h>
#include <console/console.h>
#include <device/pci.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/pci_devs.h>
#include <soc/me.h>
diff --git a/src/soc/intel/broadwell/minihd.c b/src/soc/intel/broadwell/minihd.c
index d44e153..ff12ac5 100644
--- a/src/soc/intel/broadwell/minihd.c
+++ b/src/soc/intel/broadwell/minihd.c
@@ -21,7 +21,6 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/mmio.h>
-#include <stdlib.h>
#include <soc/intel/common/hda_verb.h>
#include <soc/ramstage.h>
#include <soc/igd.h>
diff --git a/src/soc/intel/broadwell/pei_data.c b/src/soc/intel/broadwell/pei_data.c
index dfaf025..a3c8746 100644
--- a/src/soc/intel/broadwell/pei_data.c
+++ b/src/soc/intel/broadwell/pei_data.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <stdint.h>
#include <console/streams.h>
#include <soc/iomap.h>
diff --git a/src/soc/intel/broadwell/ramstage.c b/src/soc/intel/broadwell/ramstage.c
index e1883f2..f380079 100644
--- a/src/soc/intel/broadwell/ramstage.c
+++ b/src/soc/intel/broadwell/ramstage.c
@@ -16,7 +16,6 @@
#include <arch/acpi.h>
#include <cbmem.h>
#include <device/device.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/nvs.h>
#include <soc/pm.h>
diff --git a/src/soc/intel/broadwell/romstage/cpu.c b/src/soc/intel/broadwell/romstage/cpu.c
index f251652..5a45697 100644
--- a/src/soc/intel/broadwell/romstage/cpu.c
+++ b/src/soc/intel/broadwell/romstage/cpu.c
@@ -14,7 +14,6 @@
*/
#include <arch/cpu.h>
-#include <stdlib.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <soc/cpu.h>
diff --git a/src/soc/intel/broadwell/romstage/power_state.c b/src/soc/intel/broadwell/romstage/power_state.c
index ca22b4e..1970c31 100644
--- a/src/soc/intel/broadwell/romstage/power_state.c
+++ b/src/soc/intel/broadwell/romstage/power_state.c
@@ -22,7 +22,6 @@
#include <device/pci_def.h>
#include <reg_script.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/iomap.h>
#include <soc/lpc.h>
diff --git a/src/soc/intel/broadwell/romstage/systemagent.c b/src/soc/intel/broadwell/romstage/systemagent.c
index 8be5b82..5c0224a 100644
--- a/src/soc/intel/broadwell/romstage/systemagent.c
+++ b/src/soc/intel/broadwell/romstage/systemagent.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
diff --git a/src/soc/intel/broadwell/serialio.c b/src/soc/intel/broadwell/serialio.c
index 12e458c..58a0444 100644
--- a/src/soc/intel/broadwell/serialio.c
+++ b/src/soc/intel/broadwell/serialio.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <soc/iobp.h>
#include <soc/nvs.h>
#include <soc/pci_devs.h>
diff --git a/src/soc/intel/broadwell/systemagent.c b/src/soc/intel/broadwell/systemagent.c
index c6444b1..9af55c9 100644
--- a/src/soc/intel/broadwell/systemagent.c
+++ b/src/soc/intel/broadwell/systemagent.c
@@ -22,7 +22,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include <soc/cpu.h>
#include <soc/iomap.h>
diff --git a/src/soc/intel/cannonlake/finalize.c b/src/soc/intel/cannonlake/finalize.c
index bc4ae02..6c02418 100644
--- a/src/soc/intel/cannonlake/finalize.c
+++ b/src/soc/intel/cannonlake/finalize.c
@@ -33,7 +33,6 @@
#include <soc/pm.h>
#include <soc/smbus.h>
#include <soc/systemagent.h>
-#include <stdlib.h>
#define CAMERA1_CLK 0x8000 /* Camera 1 Clock */
#define CAMERA2_CLK 0x8080 /* Camera 2 Clock */
diff --git a/src/soc/intel/cannonlake/memmap.c b/src/soc/intel/cannonlake/memmap.c
index b2dd26d..e42b68f 100644
--- a/src/soc/intel/cannonlake/memmap.c
+++ b/src/soc/intel/cannonlake/memmap.c
@@ -26,7 +26,6 @@
#include <soc/pci_devs.h>
#include <soc/smm.h>
#include <soc/systemagent.h>
-#include <stdlib.h>
void smm_region(void **start, size_t *size)
{
diff --git a/src/soc/intel/cannonlake/pmutil.c b/src/soc/intel/cannonlake/pmutil.c
index fadd35d..ffa446b 100644
--- a/src/soc/intel/cannonlake/pmutil.c
+++ b/src/soc/intel/cannonlake/pmutil.c
@@ -30,7 +30,6 @@
#include <intelblocks/pmclib.h>
#include <intelblocks/rtc.h>
#include <intelblocks/tco.h>
-#include <stdlib.h>
#include <soc/gpe.h>
#include <soc/gpio.h>
#include <soc/iomap.h>
diff --git a/src/soc/intel/common/acpi_wake_source.c b/src/soc/intel/common/acpi_wake_source.c
index f66706c..389807e 100644
--- a/src/soc/intel/common/acpi_wake_source.c
+++ b/src/soc/intel/common/acpi_wake_source.c
@@ -19,7 +19,6 @@
#include <console/console.h>
#include <soc/nvs.h>
#include <stdint.h>
-#include <stdlib.h>
#include "acpi.h"
__weak int soc_fill_acpi_wake(uint32_t *pm1, uint32_t **gpe0)
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c
index 455b13c..4143866 100644
--- a/src/soc/intel/common/block/fast_spi/fast_spi.c
+++ b/src/soc/intel/common/block/fast_spi/fast_spi.c
@@ -25,7 +25,6 @@
#include <soc/pci_devs.h>
#include <spi_flash.h>
#include <spi-generic.h>
-#include <stdlib.h>
/*
* Get the FAST_SPIBAR.
diff --git a/src/soc/intel/common/block/smm/smihandler.c b/src/soc/intel/common/block/smm/smihandler.c
index 7aa69c5..39be081 100644
--- a/src/soc/intel/common/block/smm/smihandler.c
+++ b/src/soc/intel/common/block/smm/smihandler.c
@@ -35,7 +35,6 @@
#include <soc/smbus.h>
#include <spi-generic.h>
#include <stdint.h>
-#include <stdlib.h>
/* GNVS needs to be set by coreboot initiating a software SMI. */
static struct global_nvs_t *gnvs;
diff --git a/src/soc/intel/denverton_ns/csme_ie_kt.c b/src/soc/intel/denverton_ns/csme_ie_kt.c
index 5967840..143e7b6 100644
--- a/src/soc/intel/denverton_ns/csme_ie_kt.c
+++ b/src/soc/intel/denverton_ns/csme_ie_kt.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <console/console.h>
diff --git a/src/soc/intel/denverton_ns/smihandler.c b/src/soc/intel/denverton_ns/smihandler.c
index 4d748b2..d8e967f 100644
--- a/src/soc/intel/denverton_ns/smihandler.c
+++ b/src/soc/intel/denverton_ns/smihandler.c
@@ -16,7 +16,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/hlt.h>
#include <arch/io.h>
#include <device/pci_ops.h>
diff --git a/src/soc/intel/denverton_ns/systemagent.c b/src/soc/intel/denverton_ns/systemagent.c
index cc1d696..215dfdc 100644
--- a/src/soc/intel/denverton_ns/systemagent.c
+++ b/src/soc/intel/denverton_ns/systemagent.c
@@ -23,7 +23,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include <timer.h>
#include <soc/iomap.h>
diff --git a/src/soc/intel/fsp_baytrail/cpu.c b/src/soc/intel/fsp_baytrail/cpu.c
index 15dc851..82a528c 100644
--- a/src/soc/intel/fsp_baytrail/cpu.c
+++ b/src/soc/intel/fsp_baytrail/cpu.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <cpu/cpu.h>
#include <cpu/intel/microcode.h>
diff --git a/src/soc/intel/fsp_baytrail/gfx.c b/src/soc/intel/fsp_baytrail/gfx.c
index dab9972..7029067 100644
--- a/src/soc/intel/fsp_baytrail/gfx.c
+++ b/src/soc/intel/fsp_baytrail/gfx.c
@@ -19,7 +19,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <reg_script.h>
-#include <stdlib.h>
#include <soc/gfx.h>
#include <soc/iosf.h>
#include <soc/pci_devs.h>
diff --git a/src/soc/intel/fsp_baytrail/include/soc/i2c.h b/src/soc/intel/fsp_baytrail/include/soc/i2c.h
index 7b3a3c8..ebe6a69 100644
--- a/src/soc/intel/fsp_baytrail/include/soc/i2c.h
+++ b/src/soc/intel/fsp_baytrail/include/soc/i2c.h
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <device/pci_def.h>
-#include <stdlib.h>
/* SMBus controller settings in PCI configuration space */
#define I2C_PCI_VENDOR_ID 0x8086
diff --git a/src/soc/intel/fsp_baytrail/ramstage.c b/src/soc/intel/fsp_baytrail/ramstage.c
index 754c5f5..b895067 100644
--- a/src/soc/intel/fsp_baytrail/ramstage.c
+++ b/src/soc/intel/fsp_baytrail/ramstage.c
@@ -23,7 +23,6 @@
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/gpio.h>
diff --git a/src/soc/intel/fsp_baytrail/smihandler.c b/src/soc/intel/fsp_baytrail/smihandler.c
index f2abd99..0364758f 100644
--- a/src/soc/intel/fsp_baytrail/smihandler.c
+++ b/src/soc/intel/fsp_baytrail/smihandler.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <console/console.h>
diff --git a/src/soc/intel/fsp_broadwell_de/cpu.c b/src/soc/intel/fsp_broadwell_de/cpu.c
index 0b933c5..4814596 100644
--- a/src/soc/intel/fsp_broadwell_de/cpu.c
+++ b/src/soc/intel/fsp_broadwell_de/cpu.c
@@ -15,7 +15,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include <cpu/cpu.h>
#include <cpu/intel/microcode.h>
diff --git a/src/soc/intel/fsp_broadwell_de/ramstage.c b/src/soc/intel/fsp_broadwell_de/ramstage.c
index 96b3888..e892c5b 100644
--- a/src/soc/intel/fsp_broadwell_de/ramstage.c
+++ b/src/soc/intel/fsp_broadwell_de/ramstage.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/cpu.h>
#include <console/console.h>
#include <cpu/intel/microcode.h>
diff --git a/src/soc/intel/icelake/finalize.c b/src/soc/intel/icelake/finalize.c
index 3ada73d..b13c88a 100644
--- a/src/soc/intel/icelake/finalize.c
+++ b/src/soc/intel/icelake/finalize.c
@@ -32,7 +32,6 @@
#include <soc/pm.h>
#include <soc/smbus.h>
#include <soc/systemagent.h>
-#include <stdlib.h>
#define CAMERA1_CLK 0x8000 /* Camera 1 Clock */
#define CAMERA2_CLK 0x8080 /* Camera 2 Clock */
diff --git a/src/soc/intel/icelake/memmap.c b/src/soc/intel/icelake/memmap.c
index 821162e..97c42c3 100644
--- a/src/soc/intel/icelake/memmap.c
+++ b/src/soc/intel/icelake/memmap.c
@@ -25,7 +25,6 @@
#include <soc/pci_devs.h>
#include <soc/smm.h>
#include <soc/systemagent.h>
-#include <stdlib.h>
void smm_region(void **start, size_t *size)
{
diff --git a/src/soc/intel/icelake/pmutil.c b/src/soc/intel/icelake/pmutil.c
index 96ff52d..58000ac 100644
--- a/src/soc/intel/icelake/pmutil.c
+++ b/src/soc/intel/icelake/pmutil.c
@@ -29,7 +29,6 @@
#include <intelblocks/pmclib.h>
#include <intelblocks/rtc.h>
#include <intelblocks/tco.h>
-#include <stdlib.h>
#include <soc/gpe.h>
#include <soc/gpio.h>
#include <soc/iomap.h>
diff --git a/src/soc/intel/skylake/finalize.c b/src/soc/intel/skylake/finalize.c
index c69dffb..06118f5 100644
--- a/src/soc/intel/skylake/finalize.c
+++ b/src/soc/intel/skylake/finalize.c
@@ -38,7 +38,6 @@
#include <soc/smbus.h>
#include <soc/systemagent.h>
#include <soc/thermal.h>
-#include <stdlib.h>
#include <timer.h>
#define PSF_BASE_ADDRESS 0xA00
diff --git a/src/soc/intel/skylake/me.c b/src/soc/intel/skylake/me.c
index f7aa584..9a61102 100644
--- a/src/soc/intel/skylake/me.c
+++ b/src/soc/intel/skylake/me.c
@@ -23,7 +23,6 @@
#include <soc/me.h>
#include <soc/pci_devs.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
static inline u32 me_read_config32(int offset)
diff --git a/src/soc/intel/skylake/memmap.c b/src/soc/intel/skylake/memmap.c
index 60a7070..35137b8 100644
--- a/src/soc/intel/skylake/memmap.c
+++ b/src/soc/intel/skylake/memmap.c
@@ -27,7 +27,6 @@
#include <soc/msr.h>
#include <soc/pci_devs.h>
#include <soc/systemagent.h>
-#include <stdlib.h>
size_t mmap_region_granularity(void)
{
diff --git a/src/soc/intel/skylake/pei_data.c b/src/soc/intel/skylake/pei_data.c
index a2887ac..1dfb570 100644
--- a/src/soc/intel/skylake/pei_data.c
+++ b/src/soc/intel/skylake/pei_data.c
@@ -18,7 +18,6 @@
#include <console/streams.h>
#include <device/device.h>
#include <device/pci_def.h>
-#include <stdlib.h>
#include <stdint.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c
index 7d0dc0a..3a1ff44 100644
--- a/src/soc/intel/skylake/pmutil.c
+++ b/src/soc/intel/skylake/pmutil.c
@@ -29,7 +29,6 @@
#include <intelblocks/pmclib.h>
#include <intelblocks/lpc_lib.h>
#include <intelblocks/tco.h>
-#include <stdlib.h>
#include <soc/gpe.h>
#include <soc/gpio.h>
#include <soc/iomap.h>
diff --git a/src/soc/mediatek/common/spi.c b/src/soc/mediatek/common/spi.c
index 3e7186a..568cf1d 100644
--- a/src/soc/mediatek/common/spi.c
+++ b/src/soc/mediatek/common/spi.c
@@ -16,7 +16,6 @@
#include <device/mmio.h>
#include <assert.h>
#include <endian.h>
-#include <stdlib.h>
#include <soc/pll.h>
#include <soc/spi.h>
#include <timer.h>
diff --git a/src/soc/mediatek/mt8173/ddp.c b/src/soc/mediatek/mt8173/ddp.c
index 0b78c3e..d750c0e 100644
--- a/src/soc/mediatek/mt8173/ddp.c
+++ b/src/soc/mediatek/mt8173/ddp.c
@@ -15,7 +15,6 @@
#include <device/mmio.h>
#include <edid.h>
-#include <stdlib.h>
#include <stddef.h>
#include <soc/addressmap.h>
#include <soc/ddp.h>
diff --git a/src/soc/mediatek/mt8173/flash_controller.c b/src/soc/mediatek/mt8173/flash_controller.c
index bca2ecf..fcaf24a 100644
--- a/src/soc/mediatek/mt8173/flash_controller.c
+++ b/src/soc/mediatek/mt8173/flash_controller.c
@@ -21,7 +21,6 @@
#include <spi_flash.h>
#include <spi-generic.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <symbols.h>
#include <timer.h>
diff --git a/src/soc/mediatek/mt8173/include/soc/gpio.h b/src/soc/mediatek/mt8173/include/soc/gpio.h
index ec08334..8a6e13a 100644
--- a/src/soc/mediatek/mt8173/include/soc/gpio.h
+++ b/src/soc/mediatek/mt8173/include/soc/gpio.h
@@ -16,7 +16,6 @@
#define SOC_MEDIATEK_MT8173_GPIO_H
#include <stdint.h>
-#include <stdlib.h>
#include <soc/addressmap.h>
#include <soc/gpio_common.h>
diff --git a/src/soc/nvidia/tegra/i2c.c b/src/soc/nvidia/tegra/i2c.c
index 9dbfde8..90bcfd9 100644
--- a/src/soc/nvidia/tegra/i2c.c
+++ b/src/soc/nvidia/tegra/i2c.c
@@ -17,7 +17,6 @@
#include <console/console.h>
#include <delay.h>
#include <device/i2c_simple.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/addressmap.h>
#include "i2c.h"
diff --git a/src/soc/nvidia/tegra124/clock.c b/src/soc/nvidia/tegra124/clock.c
index 6877c04..3c8ddb2 100644
--- a/src/soc/nvidia/tegra124/clock.c
+++ b/src/soc/nvidia/tegra124/clock.c
@@ -24,7 +24,6 @@
#include <soc/maincpu.h>
#include <soc/pmc.h>
#include <soc/sysctr.h>
-#include <stdlib.h>
#include <symbols.h>
static struct clk_rst_ctlr *clk_rst = (void *)TEGRA_CLK_RST_BASE;
diff --git a/src/soc/nvidia/tegra124/display.c b/src/soc/nvidia/tegra124/display.c
index 51f7215..6fa3bdf 100644
--- a/src/soc/nvidia/tegra124/display.c
+++ b/src/soc/nvidia/tegra124/display.c
@@ -26,7 +26,6 @@
#include <soc/nvidia/tegra/dc.h>
#include <soc/nvidia/tegra/pwm.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include "chip.h"
diff --git a/src/soc/nvidia/tegra124/dma.c b/src/soc/nvidia/tegra124/dma.c
index 73d050f..a0bd5c0 100644
--- a/src/soc/nvidia/tegra124/dma.c
+++ b/src/soc/nvidia/tegra124/dma.c
@@ -21,7 +21,6 @@
#include <soc/addressmap.h>
#include <soc/dma.h>
#include <stddef.h>
-#include <stdlib.h>
struct apb_dma * const apb_dma = (struct apb_dma *)TEGRA_APB_DMA_BASE;
diff --git a/src/soc/nvidia/tegra124/dp.c b/src/soc/nvidia/tegra124/dp.c
index b9fa0ea..fbbc49b 100644
--- a/src/soc/nvidia/tegra124/dp.c
+++ b/src/soc/nvidia/tegra124/dp.c
@@ -27,7 +27,6 @@
#include <soc/nvidia/tegra/dc.h>
#include <soc/nvidia/tegra/displayport.h>
#include <soc/sor.h>
-#include <stdlib.h>
#include <string.h>
#include "chip.h"
diff --git a/src/soc/nvidia/tegra124/include/soc/clock.h b/src/soc/nvidia/tegra124/include/soc/clock.h
index 00744ce..5538b78 100644
--- a/src/soc/nvidia/tegra124/include/soc/clock.h
+++ b/src/soc/nvidia/tegra124/include/soc/clock.h
@@ -22,7 +22,6 @@
#include <device/mmio.h>
#include <soc/clk_rst.h>
#include <stdint.h>
-#include <stdlib.h>
enum {
CLK_L_CPU = 0x1 << 0,
diff --git a/src/soc/nvidia/tegra124/sdram.c b/src/soc/nvidia/tegra124/sdram.c
index 9af116c..7c5d304 100644
--- a/src/soc/nvidia/tegra124/sdram.c
+++ b/src/soc/nvidia/tegra124/sdram.c
@@ -22,7 +22,6 @@
#include <soc/mc.h>
#include <soc/pmc.h>
#include <soc/sdram.h>
-#include <stdlib.h>
#include <symbols.h>
diff --git a/src/soc/nvidia/tegra124/sdram_lp0.c b/src/soc/nvidia/tegra124/sdram_lp0.c
index 731fc61..aade07c 100644
--- a/src/soc/nvidia/tegra124/sdram_lp0.c
+++ b/src/soc/nvidia/tegra124/sdram_lp0.c
@@ -20,7 +20,6 @@
#include <soc/clk_rst.h>
#include <soc/pmc.h>
#include <soc/sdram.h>
-#include <stdlib.h>
/*
* This function reads SDRAM parameters (and a few CLK_RST register values) from
diff --git a/src/soc/nvidia/tegra124/sor.c b/src/soc/nvidia/tegra124/sor.c
index 9188f83..8c03a7e 100644
--- a/src/soc/nvidia/tegra124/sor.c
+++ b/src/soc/nvidia/tegra124/sor.c
@@ -29,7 +29,6 @@
#include <soc/nvidia/tegra/displayport.h>
#include <soc/sor.h>
#include <stdint.h>
-#include <stdlib.h>
#include "chip.h"
diff --git a/src/soc/nvidia/tegra124/spi.c b/src/soc/nvidia/tegra124/spi.c
index 45159c2..620edca 100644
--- a/src/soc/nvidia/tegra124/spi.c
+++ b/src/soc/nvidia/tegra124/spi.c
@@ -27,7 +27,6 @@
#include <spi-generic.h>
#include <spi_flash.h>
#include <stdint.h>
-#include <stdlib.h>
#include <symbols.h>
#include <timer.h>
diff --git a/src/soc/nvidia/tegra124/verstage.c b/src/soc/nvidia/tegra124/verstage.c
index 2495351..9899fcb 100644
--- a/src/soc/nvidia/tegra124/verstage.c
+++ b/src/soc/nvidia/tegra124/verstage.c
@@ -20,7 +20,6 @@
#include <program_loading.h>
#include <soc/cache.h>
#include <soc/early_configs.h>
-#include <stdlib.h>
#include <symbols.h>
#include <vendorcode/google/chromeos/chromeos.h>
diff --git a/src/soc/nvidia/tegra210/addressmap.c b/src/soc/nvidia/tegra210/addressmap.c
index 4f11d4e..983ecad 100644
--- a/src/soc/nvidia/tegra210/addressmap.c
+++ b/src/soc/nvidia/tegra210/addressmap.c
@@ -21,7 +21,6 @@
#include <soc/id.h>
#include <soc/mc.h>
#include <soc/sdram.h>
-#include <stdlib.h>
#include <symbols.h>
#include <soc/nvidia/tegra/types.h>
diff --git a/src/soc/nvidia/tegra210/arm_tf.c b/src/soc/nvidia/tegra210/arm_tf.c
index bd34185..ebed7d0 100644
--- a/src/soc/nvidia/tegra210/arm_tf.c
+++ b/src/soc/nvidia/tegra210/arm_tf.c
@@ -18,7 +18,6 @@
#include <assert.h>
#include <soc/addressmap.h>
#include <soc/console_uart.h>
-#include <stdlib.h>
#include <symbols.h>
typedef struct bl31_plat_params {
diff --git a/src/soc/nvidia/tegra210/clock.c b/src/soc/nvidia/tegra210/clock.c
index 55ee50b..236a450 100644
--- a/src/soc/nvidia/tegra210/clock.c
+++ b/src/soc/nvidia/tegra210/clock.c
@@ -18,7 +18,6 @@
#include <assert.h>
#include <console/console.h>
#include <delay.h>
-#include <stdlib.h>
#include <soc/addressmap.h>
#include <soc/clk_rst.h>
#include <soc/clock.h>
diff --git a/src/soc/nvidia/tegra210/dc.c b/src/soc/nvidia/tegra210/dc.c
index ceffb41..21e90ee 100644
--- a/src/soc/nvidia/tegra210/dc.c
+++ b/src/soc/nvidia/tegra210/dc.c
@@ -15,7 +15,6 @@
#include <console/console.h>
#include <device/mmio.h>
#include <stdint.h>
-#include <stdlib.h>
#include <edid.h>
#include <device/device.h>
#include <soc/nvidia/tegra/dc.h>
diff --git a/src/soc/nvidia/tegra210/dma.c b/src/soc/nvidia/tegra210/dma.c
index 03c5e67..bbc5c8f 100644
--- a/src/soc/nvidia/tegra210/dma.c
+++ b/src/soc/nvidia/tegra210/dma.c
@@ -21,7 +21,6 @@
#include <soc/addressmap.h>
#include <soc/dma.h>
#include <stddef.h>
-#include <stdlib.h>
struct apb_dma * const apb_dma = (struct apb_dma *)TEGRA_APB_DMA_BASE;
diff --git a/src/soc/nvidia/tegra210/dp.c b/src/soc/nvidia/tegra210/dp.c
index b0c0846..104ef04 100644
--- a/src/soc/nvidia/tegra210/dp.c
+++ b/src/soc/nvidia/tegra210/dp.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <device/i2c_simple.h>
#include <edid.h>
-#include <stdlib.h>
#include <string.h>
#include <delay.h>
#include <soc/addressmap.h>
diff --git a/src/soc/nvidia/tegra210/dsi.c b/src/soc/nvidia/tegra210/dsi.c
index 76054f0..5861113 100644
--- a/src/soc/nvidia/tegra210/dsi.c
+++ b/src/soc/nvidia/tegra210/dsi.c
@@ -15,7 +15,6 @@
#include <console/console.h>
#include <device/mmio.h>
#include <stdint.h>
-#include <stdlib.h>
#include <delay.h>
#include <timer.h>
#include <soc/addressmap.h>
diff --git a/src/soc/nvidia/tegra210/include/soc/clock.h b/src/soc/nvidia/tegra210/include/soc/clock.h
index 6d8c338..3694285 100644
--- a/src/soc/nvidia/tegra210/include/soc/clock.h
+++ b/src/soc/nvidia/tegra210/include/soc/clock.h
@@ -22,7 +22,6 @@
#include <device/mmio.h>
#include <soc/clk_rst.h>
#include <stdint.h>
-#include <stdlib.h>
enum {
CLK_L_CPU = 0x1 << 0,
diff --git a/src/soc/nvidia/tegra210/include/soc/mipi-phy.h b/src/soc/nvidia/tegra210/include/soc/mipi-phy.h
index 852c5a3..e9b5797 100644
--- a/src/soc/nvidia/tegra210/include/soc/mipi-phy.h
+++ b/src/soc/nvidia/tegra210/include/soc/mipi-phy.h
@@ -15,7 +15,6 @@
#ifndef _TEGRA_MIPI_PHY_H
#define _TEGRA_MIPI_PHY_H
-#include <stdlib.h>
/*
* Macros for calculating the phy timings
diff --git a/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c b/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c
index a9101b8..223f7a0 100644
--- a/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c
+++ b/src/soc/nvidia/tegra210/jdi_25x18_display/panel-jdi-lpm102a188a.c
@@ -14,7 +14,6 @@
*/
#include <console/console.h>
#include <stdint.h>
-#include <stdlib.h>
#include <delay.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/nvidia/tegra210/mipi-phy.c b/src/soc/nvidia/tegra210/mipi-phy.c
index 4e6bdf0..00891c4 100644
--- a/src/soc/nvidia/tegra210/mipi-phy.c
+++ b/src/soc/nvidia/tegra210/mipi-phy.c
@@ -14,7 +14,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/nvidia/tegra210/mipi.c b/src/soc/nvidia/tegra210/mipi.c
index f863496..ada23a7 100644
--- a/src/soc/nvidia/tegra210/mipi.c
+++ b/src/soc/nvidia/tegra210/mipi.c
@@ -17,7 +17,6 @@
#include <console/console.h>
#include <device/mmio.h>
#include <stdint.h>
-#include <stdlib.h>
#include <delay.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/nvidia/tegra210/mipi_dsi.c b/src/soc/nvidia/tegra210/mipi_dsi.c
index 23d9274..825cbff 100644
--- a/src/soc/nvidia/tegra210/mipi_dsi.c
+++ b/src/soc/nvidia/tegra210/mipi_dsi.c
@@ -41,7 +41,6 @@
#include <console/console.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/nvidia/tegra210/mmu_operations.c b/src/soc/nvidia/tegra210/mmu_operations.c
index 9cee6b2..1424d97 100644
--- a/src/soc/nvidia/tegra210/mmu_operations.c
+++ b/src/soc/nvidia/tegra210/mmu_operations.c
@@ -17,7 +17,6 @@
#include <assert.h>
#include <soc/addressmap.h>
#include <soc/mmu_operations.h>
-#include <stdlib.h>
#include <stdint.h>
#include <symbols.h>
diff --git a/src/soc/nvidia/tegra210/sdram.c b/src/soc/nvidia/tegra210/sdram.c
index e1d91fd..c609921 100644
--- a/src/soc/nvidia/tegra210/sdram.c
+++ b/src/soc/nvidia/tegra210/sdram.c
@@ -23,7 +23,6 @@
#include <soc/mc.h>
#include <soc/pmc.h>
#include <soc/sdram.h>
-#include <stdlib.h>
#include <soc/nvidia/tegra/apbmisc.h>
static void sdram_patch(uintptr_t addr, uint32_t value)
diff --git a/src/soc/nvidia/tegra210/sdram_lp0.c b/src/soc/nvidia/tegra210/sdram_lp0.c
index 9eaf5f0..09747ea 100644
--- a/src/soc/nvidia/tegra210/sdram_lp0.c
+++ b/src/soc/nvidia/tegra210/sdram_lp0.c
@@ -19,7 +19,6 @@
#include <soc/addressmap.h>
#include <soc/pmc.h>
#include <soc/sdram.h>
-#include <stdlib.h>
/*
* This function reads SDRAM parameters from the common BCT format and
diff --git a/src/soc/nvidia/tegra210/sor.c b/src/soc/nvidia/tegra210/sor.c
index 3055b29..8caf050 100644
--- a/src/soc/nvidia/tegra210/sor.c
+++ b/src/soc/nvidia/tegra210/sor.c
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <stdint.h>
-#include <stdlib.h>
#include <delay.h>
#include <soc/addressmap.h>
#include <device/device.h>
diff --git a/src/soc/nvidia/tegra210/spi.c b/src/soc/nvidia/tegra210/spi.c
index edb052d..ad2f234 100644
--- a/src/soc/nvidia/tegra210/spi.c
+++ b/src/soc/nvidia/tegra210/spi.c
@@ -27,7 +27,6 @@
#include <soc/dma.h>
#include <soc/spi.h>
#include <stdint.h>
-#include <stdlib.h>
#include <symbols.h>
#if defined(CONFIG_DEBUG_SPI) && CONFIG_DEBUG_SPI
diff --git a/src/soc/qualcomm/ipq40xx/i2c.c b/src/soc/qualcomm/ipq40xx/i2c.c
index f5c9943..fbabc53 100644
--- a/src/soc/qualcomm/ipq40xx/i2c.c
+++ b/src/soc/qualcomm/ipq40xx/i2c.c
@@ -32,7 +32,6 @@
#include <assert.h>
#include <console/console.h>
#include <device/i2c_simple.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/blsp.h>
#include <soc/qup.h>
diff --git a/src/soc/qualcomm/ipq40xx/qup.c b/src/soc/qualcomm/ipq40xx/qup.c
index 9d1f92d..bc98a3a 100644
--- a/src/soc/qualcomm/ipq40xx/qup.c
+++ b/src/soc/qualcomm/ipq40xx/qup.c
@@ -33,7 +33,6 @@
#include <console/console.h>
#include <delay.h>
#include <soc/iomap.h>
-#include <stdlib.h>
#include <soc/qup.h>
#define TIMEOUT_CNT 100
diff --git a/src/soc/qualcomm/ipq40xx/spi.c b/src/soc/qualcomm/ipq40xx/spi.c
index 109eda9..3aaebd4 100644
--- a/src/soc/qualcomm/ipq40xx/spi.c
+++ b/src/soc/qualcomm/ipq40xx/spi.c
@@ -33,7 +33,6 @@
#include <gpio.h>
#include <soc/iomap.h>
#include <soc/spi.h>
-#include <stdlib.h>
static const struct blsp_spi spi_reg[] = {
/* BLSP0 registers for SPI interface */
diff --git a/src/soc/qualcomm/ipq40xx/uart.c b/src/soc/qualcomm/ipq40xx/uart.c
index eb3731b..d17a926 100644
--- a/src/soc/qualcomm/ipq40xx/uart.c
+++ b/src/soc/qualcomm/ipq40xx/uart.c
@@ -37,7 +37,6 @@
#include <soc/blsp.h>
#include <soc/ipq_uart.h>
#include <stdint.h>
-#include <stdlib.h>
#define FIFO_DATA_SIZE 4
diff --git a/src/soc/qualcomm/ipq806x/i2c.c b/src/soc/qualcomm/ipq806x/i2c.c
index cd57591..145b3a4 100644
--- a/src/soc/qualcomm/ipq806x/i2c.c
+++ b/src/soc/qualcomm/ipq806x/i2c.c
@@ -30,7 +30,6 @@
#include <assert.h>
#include <console/console.h>
#include <device/i2c_simple.h>
-#include <stdlib.h>
#include <string.h>
#include <soc/gsbi.h>
#include <soc/qup.h>
diff --git a/src/soc/qualcomm/ipq806x/qup.c b/src/soc/qualcomm/ipq806x/qup.c
index 872b264..e2881d9 100644
--- a/src/soc/qualcomm/ipq806x/qup.c
+++ b/src/soc/qualcomm/ipq806x/qup.c
@@ -31,7 +31,6 @@
#include <console/console.h>
#include <delay.h>
#include <soc/iomap.h>
-#include <stdlib.h>
#include <soc/qup.h>
#define TIMEOUT_CNT 100000
diff --git a/src/soc/qualcomm/ipq806x/spi.c b/src/soc/qualcomm/ipq806x/spi.c
index 6577345..24b8492 100644
--- a/src/soc/qualcomm/ipq806x/spi.c
+++ b/src/soc/qualcomm/ipq806x/spi.c
@@ -19,7 +19,6 @@
#include <gpio.h>
#include <soc/iomap.h>
#include <soc/spi.h>
-#include <stdlib.h>
#define SUCCESS 0
diff --git a/src/soc/qualcomm/ipq806x/uart.c b/src/soc/qualcomm/ipq806x/uart.c
index fe2d673..04cc7eb 100644
--- a/src/soc/qualcomm/ipq806x/uart.c
+++ b/src/soc/qualcomm/ipq806x/uart.c
@@ -41,7 +41,6 @@
#include <soc/gsbi.h>
#include <soc/ipq_uart.h>
#include <stdint.h>
-#include <stdlib.h>
#define FIFO_DATA_SIZE 4
diff --git a/src/soc/rockchip/common/edp.c b/src/soc/rockchip/common/edp.c
index 98381a0..ef35db7 100644
--- a/src/soc/rockchip/common/edp.c
+++ b/src/soc/rockchip/common/edp.c
@@ -19,7 +19,6 @@
#include <delay.h>
#include <device/device.h>
#include <edid.h>
-#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <soc/addressmap.h>
diff --git a/src/soc/rockchip/common/gpio.c b/src/soc/rockchip/common/gpio.c
index fa0990b..6df0143 100644
--- a/src/soc/rockchip/common/gpio.c
+++ b/src/soc/rockchip/common/gpio.c
@@ -19,7 +19,6 @@
#include <soc/gpio.h>
#include <soc/grf.h>
#include <soc/soc.h>
-#include <stdlib.h>
static void gpio_set_dir(gpio_t gpio, enum gpio_dir dir)
{
diff --git a/src/soc/rockchip/common/i2c.c b/src/soc/rockchip/common/i2c.c
index e5f5a9a..4df6e0e 100644
--- a/src/soc/rockchip/common/i2c.c
+++ b/src/soc/rockchip/common/i2c.c
@@ -23,7 +23,6 @@
#include <soc/soc.h>
#include <soc/i2c.h>
#include <soc/clock.h>
-#include <stdlib.h>
#define RETRY_COUNT 3
/* 100000us = 100ms */
diff --git a/src/soc/rockchip/common/include/soc/edp.h b/src/soc/rockchip/common/include/soc/edp.h
index a9ebbc5..58986d1 100644
--- a/src/soc/rockchip/common/include/soc/edp.h
+++ b/src/soc/rockchip/common/include/soc/edp.h
@@ -17,7 +17,6 @@
#define __RK_DP_H
#include <edid.h>
-#include <stdlib.h>
struct rk_edp_regs {
u8 res0[0x10];
diff --git a/src/soc/rockchip/common/pwm.c b/src/soc/rockchip/common/pwm.c
index ad0453b..9be4878 100644
--- a/src/soc/rockchip/common/pwm.c
+++ b/src/soc/rockchip/common/pwm.c
@@ -20,7 +20,6 @@
#include <soc/soc.h>
#include <soc/pwm.h>
#include <soc/clock.h>
-#include <stdlib.h>
#include <timer.h>
struct pwm_ctl {
diff --git a/src/soc/rockchip/common/rk808.c b/src/soc/rockchip/common/rk808.c
index 58d910c..66a085c 100644
--- a/src/soc/rockchip/common/rk808.c
+++ b/src/soc/rockchip/common/rk808.c
@@ -21,7 +21,6 @@
#include <rtc.h>
#include <soc/rk808.h>
#include <stdint.h>
-#include <stdlib.h>
#if CONFIG_PMIC_BUS < 0
#error "PMIC_BUS must be set in mainboard's Kconfig."
diff --git a/src/soc/rockchip/common/spi.c b/src/soc/rockchip/common/spi.c
index 98016c0..0349ab6 100644
--- a/src/soc/rockchip/common/spi.c
+++ b/src/soc/rockchip/common/spi.c
@@ -23,7 +23,6 @@
#include <soc/clock.h>
#include <spi-generic.h>
#include <spi_flash.h>
-#include <stdlib.h>
#include <timer.h>
struct rockchip_spi_slave {
diff --git a/src/soc/rockchip/common/vop.c b/src/soc/rockchip/common/vop.c
index 9c70b78..f617b4a 100644
--- a/src/soc/rockchip/common/vop.c
+++ b/src/soc/rockchip/common/vop.c
@@ -14,7 +14,6 @@
*/
#include <device/mmio.h>
-#include <stdlib.h>
#include <stddef.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/rockchip/rk3288/clock.c b/src/soc/rockchip/rk3288/clock.c
index cee1ee2..6e0c139 100644
--- a/src/soc/rockchip/rk3288/clock.c
+++ b/src/soc/rockchip/rk3288/clock.c
@@ -24,7 +24,6 @@
#include <soc/i2c.h>
#include <soc/soc.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
struct pll_div {
diff --git a/src/soc/rockchip/rk3288/display.c b/src/soc/rockchip/rk3288/display.c
index 04a5992..a66b2d4 100644
--- a/src/soc/rockchip/rk3288/display.c
+++ b/src/soc/rockchip/rk3288/display.c
@@ -20,7 +20,6 @@
#include <delay.h>
#include <edid.h>
#include <gpio.h>
-#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <soc/addressmap.h>
diff --git a/src/soc/rockchip/rk3288/gpio.c b/src/soc/rockchip/rk3288/gpio.c
index 0f9d85c..8eeed88 100644
--- a/src/soc/rockchip/rk3288/gpio.c
+++ b/src/soc/rockchip/rk3288/gpio.c
@@ -18,7 +18,6 @@
#include <soc/grf.h>
#include <soc/pmu.h>
#include <soc/soc.h>
-#include <stdlib.h>
struct rockchip_gpio_regs *gpio_port[] = {
(struct rockchip_gpio_regs *)0xff750000,
diff --git a/src/soc/rockchip/rk3288/hdmi.c b/src/soc/rockchip/rk3288/hdmi.c
index 425d302..56f6a8f 100644
--- a/src/soc/rockchip/rk3288/hdmi.c
+++ b/src/soc/rockchip/rk3288/hdmi.c
@@ -25,7 +25,6 @@
#include <delay.h>
#include <edid.h>
#include <gpio.h>
-#include <stdlib.h>
#include <stdint.h>
#include <soc/addressmap.h>
#include <soc/hdmi.h>
diff --git a/src/soc/rockchip/rk3288/include/soc/hdmi.h b/src/soc/rockchip/rk3288/include/soc/hdmi.h
index fb20b4a..3089949 100644
--- a/src/soc/rockchip/rk3288/include/soc/hdmi.h
+++ b/src/soc/rockchip/rk3288/include/soc/hdmi.h
@@ -19,7 +19,6 @@
#define __SOC_HDMI_H__
#include <types.h>
-#include <stdlib.h>
#define HDMI_EDID_BLOCK_SIZE 128
diff --git a/src/soc/rockchip/rk3288/soc.c b/src/soc/rockchip/rk3288/soc.c
index bda9553..31c9998 100644
--- a/src/soc/rockchip/rk3288/soc.c
+++ b/src/soc/rockchip/rk3288/soc.c
@@ -22,7 +22,6 @@
#include <soc/soc.h>
#include <soc/sdram.h>
#include <stddef.h>
-#include <stdlib.h>
#include <symbols.h>
#include "chip.h"
diff --git a/src/soc/rockchip/rk3288/tsadc.c b/src/soc/rockchip/rk3288/tsadc.c
index a34105d..cfd1658 100644
--- a/src/soc/rockchip/rk3288/tsadc.c
+++ b/src/soc/rockchip/rk3288/tsadc.c
@@ -20,7 +20,6 @@
#include <soc/pmu.h>
#include <soc/tsadc.h>
#include <stdint.h>
-#include <stdlib.h>
struct rk3288_tsadc_regs {
u32 user_con;
diff --git a/src/soc/rockchip/rk3399/clock.c b/src/soc/rockchip/rk3399/clock.c
index 5252232..9364ecf 100644
--- a/src/soc/rockchip/rk3399/clock.c
+++ b/src/soc/rockchip/rk3399/clock.c
@@ -23,7 +23,6 @@
#include <soc/i2c.h>
#include <soc/soc.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
struct pll_div {
diff --git a/src/soc/rockchip/rk3399/display.c b/src/soc/rockchip/rk3399/display.c
index e2e9f7d..9cd4053 100644
--- a/src/soc/rockchip/rk3399/display.c
+++ b/src/soc/rockchip/rk3399/display.c
@@ -21,7 +21,6 @@
#include <delay.h>
#include <edid.h>
#include <gpio.h>
-#include <stdlib.h>
#include <stddef.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
diff --git a/src/soc/rockchip/rk3399/gpio.c b/src/soc/rockchip/rk3399/gpio.c
index 7fe2c19..9a01abc 100644
--- a/src/soc/rockchip/rk3399/gpio.c
+++ b/src/soc/rockchip/rk3399/gpio.c
@@ -18,7 +18,6 @@
#include <soc/gpio.h>
#include <soc/grf.h>
#include <soc/soc.h>
-#include <stdlib.h>
struct rockchip_gpio_regs *gpio_port[] = {
(struct rockchip_gpio_regs *)GPIO0_BASE,
diff --git a/src/soc/rockchip/rk3399/include/soc/mipi.h b/src/soc/rockchip/rk3399/include/soc/mipi.h
index f304d8f..300630b 100644
--- a/src/soc/rockchip/rk3399/include/soc/mipi.h
+++ b/src/soc/rockchip/rk3399/include/soc/mipi.h
@@ -16,7 +16,6 @@
#ifndef __RK_MIPI_H
#define __RK_MIPI_H
-#include <stdlib.h>
struct rk_mipi_regs {
u32 dsi_version;
diff --git a/src/soc/rockchip/rk3399/mipi.c b/src/soc/rockchip/rk3399/mipi.c
index ee8cc2e..1231a1e 100644
--- a/src/soc/rockchip/rk3399/mipi.c
+++ b/src/soc/rockchip/rk3399/mipi.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <edid.h>
#include <gpio.h>
-#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <soc/addressmap.h>
diff --git a/src/soc/rockchip/rk3399/saradc.c b/src/soc/rockchip/rk3399/saradc.c
index 3c6cbe6..8dd3cb4 100644
--- a/src/soc/rockchip/rk3399/saradc.c
+++ b/src/soc/rockchip/rk3399/saradc.c
@@ -20,7 +20,6 @@
#include <soc/clock.h>
#include <soc/saradc.h>
#include <stdint.h>
-#include <stdlib.h>
#include <timer.h>
struct rk3399_saradc_regs {
diff --git a/src/soc/rockchip/rk3399/soc.c b/src/soc/rockchip/rk3399/soc.c
index 3f3ff97..807a7bc 100644
--- a/src/soc/rockchip/rk3399/soc.c
+++ b/src/soc/rockchip/rk3399/soc.c
@@ -23,7 +23,6 @@
#include <soc/sdram.h>
#include <soc/symbols.h>
#include <stddef.h>
-#include <stdlib.h>
#include <symbols.h>
void bootmem_platform_add_ranges(void)
diff --git a/src/soc/rockchip/rk3399/tsadc.c b/src/soc/rockchip/rk3399/tsadc.c
index d5aeccd..fd73218 100644
--- a/src/soc/rockchip/rk3399/tsadc.c
+++ b/src/soc/rockchip/rk3399/tsadc.c
@@ -20,7 +20,6 @@
#include <soc/grf.h>
#include <soc/tsadc.h>
#include <stdint.h>
-#include <stdlib.h>
struct rk3399_tsadc_regs {
u32 user_con;
diff --git a/src/soc/samsung/exynos5250/alternate_cbfs.c b/src/soc/samsung/exynos5250/alternate_cbfs.c
index 9fef9ae..aa319d6 100644
--- a/src/soc/samsung/exynos5250/alternate_cbfs.c
+++ b/src/soc/samsung/exynos5250/alternate_cbfs.c
@@ -19,7 +19,6 @@
#include <soc/alternate_cbfs.h>
#include <soc/power.h>
#include <soc/spi.h>
-#include <stdlib.h>
#include <symbols.h>
/* This allows USB A-A firmware upload from a compatible host in four parts:
diff --git a/src/soc/samsung/exynos5250/clock.c b/src/soc/samsung/exynos5250/clock.c
index 7e7fe97..1006a98 100644
--- a/src/soc/samsung/exynos5250/clock.c
+++ b/src/soc/samsung/exynos5250/clock.c
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <soc/clk.h>
#include <soc/periph.h>
-#include <stdlib.h>
#include <timer.h>
/* input clock of PLL: SMDK5250 has 24MHz input clock */
diff --git a/src/soc/samsung/exynos5250/cpu.c b/src/soc/samsung/exynos5250/cpu.c
index f00351e..5f99899 100644
--- a/src/soc/samsung/exynos5250/cpu.c
+++ b/src/soc/samsung/exynos5250/cpu.c
@@ -23,7 +23,6 @@
#include <soc/dp-core.h>
#include <soc/fimd.h>
#include <stddef.h>
-#include <stdlib.h>
#include <string.h>
#include "chip.h"
diff --git a/src/soc/samsung/exynos5250/fb.c b/src/soc/samsung/exynos5250/fb.c
index 64980a1..8181c29 100644
--- a/src/soc/samsung/exynos5250/fb.c
+++ b/src/soc/samsung/exynos5250/fb.c
@@ -25,7 +25,6 @@
#include <soc/i2c.h>
#include <soc/power.h>
#include <soc/sysreg.h>
-#include <stdlib.h>
#include <timer.h>
/*
diff --git a/src/soc/samsung/exynos5250/spi.c b/src/soc/samsung/exynos5250/spi.c
index e35f888..cb15f46 100644
--- a/src/soc/samsung/exynos5250/spi.c
+++ b/src/soc/samsung/exynos5250/spi.c
@@ -21,7 +21,6 @@
#include <soc/clk.h>
#include <soc/gpio.h>
#include <soc/spi.h>
-#include <stdlib.h>
#include <symbols.h>
#if defined(CONFIG_DEBUG_SPI) && CONFIG_DEBUG_SPI
diff --git a/src/soc/samsung/exynos5420/alternate_cbfs.c b/src/soc/samsung/exynos5420/alternate_cbfs.c
index a1e92a0..74901ea 100644
--- a/src/soc/samsung/exynos5420/alternate_cbfs.c
+++ b/src/soc/samsung/exynos5420/alternate_cbfs.c
@@ -20,7 +20,6 @@
#include <soc/alternate_cbfs.h>
#include <soc/power.h>
#include <soc/spi.h>
-#include <stdlib.h>
#include <symbols.h>
/* This allows USB A-A firmware upload from a compatible host in four parts:
diff --git a/src/soc/samsung/exynos5420/clock.c b/src/soc/samsung/exynos5420/clock.c
index 720506c..5a7467c 100644
--- a/src/soc/samsung/exynos5420/clock.c
+++ b/src/soc/samsung/exynos5420/clock.c
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <soc/clk.h>
#include <soc/periph.h>
-#include <stdlib.h>
#include <timer.h>
/* input clock of PLL: SMDK5420 has 24MHz input clock */
diff --git a/src/soc/samsung/exynos5420/cpu.c b/src/soc/samsung/exynos5420/cpu.c
index 55b0512..375b370 100644
--- a/src/soc/samsung/exynos5420/cpu.c
+++ b/src/soc/samsung/exynos5420/cpu.c
@@ -24,7 +24,6 @@
#include <soc/cpu.h>
#include <soc/clk.h>
#include <stddef.h>
-#include <stdlib.h>
#include <string.h>
#include "chip.h"
diff --git a/src/soc/samsung/exynos5420/dp.c b/src/soc/samsung/exynos5420/dp.c
index 5ad3dd3..c48ea8c 100644
--- a/src/soc/samsung/exynos5420/dp.c
+++ b/src/soc/samsung/exynos5420/dp.c
@@ -21,7 +21,6 @@
#include <soc/i2c.h>
#include <soc/power.h>
#include <soc/sysreg.h>
-#include <stdlib.h>
#include <string.h>
/*
diff --git a/src/soc/samsung/exynos5420/dp_lowlevel.c b/src/soc/samsung/exynos5420/dp_lowlevel.c
index 164704b..df579b0 100644
--- a/src/soc/samsung/exynos5420/dp_lowlevel.c
+++ b/src/soc/samsung/exynos5420/dp_lowlevel.c
@@ -22,7 +22,6 @@
#include <soc/i2c.h>
#include <soc/power.h>
#include <soc/sysreg.h>
-#include <stdlib.h>
/* FIXME: I think the DP controller shouldn't be hardcoded here... */
static struct exynos_dp * const dp_regs = (void *)EXYNOS5_DP1_BASE;
diff --git a/src/soc/samsung/exynos5420/pinmux.c b/src/soc/samsung/exynos5420/pinmux.c
index d8c1378..eb804c1 100644
--- a/src/soc/samsung/exynos5420/pinmux.c
+++ b/src/soc/samsung/exynos5420/pinmux.c
@@ -16,7 +16,6 @@
#include <assert.h>
#include <soc/gpio.h>
#include <soc/pinmux.h>
-#include <stdlib.h>
static void exynos_pinmux_uart(int start, int count)
{
diff --git a/src/soc/samsung/exynos5420/smp.c b/src/soc/samsung/exynos5420/smp.c
index 5e16063..27c0fa6 100644
--- a/src/soc/samsung/exynos5420/smp.c
+++ b/src/soc/samsung/exynos5420/smp.c
@@ -18,7 +18,6 @@
#include <device/mmio.h>
#include <soc/cpu.h>
#include <soc/power.h>
-#include <stdlib.h>
#include <string.h>
#include <types.h>
diff --git a/src/soc/samsung/exynos5420/spi.c b/src/soc/samsung/exynos5420/spi.c
index 753a24b..72761d5 100644
--- a/src/soc/samsung/exynos5420/spi.c
+++ b/src/soc/samsung/exynos5420/spi.c
@@ -20,7 +20,6 @@
#include <soc/cpu.h>
#include <soc/spi.h>
#include <spi-generic.h>
-#include <stdlib.h>
#include <string.h>
#include <symbols.h>
diff --git a/src/soc/sifive/fu540/clock.c b/src/soc/sifive/fu540/clock.c
index 60a8a13..fc472fb 100644
--- a/src/soc/sifive/fu540/clock.c
+++ b/src/soc/sifive/fu540/clock.c
@@ -17,7 +17,6 @@
#include <console/console.h>
#include <soc/clock.h>
#include <soc/addressmap.h>
-#include <stdlib.h>
#include <stdint.h>
// 33.33 Mhz after reset
diff --git a/src/southbridge/amd/agesa/hudson/sm.c b/src/southbridge/amd/agesa/hudson/sm.c
index 46eca33..64dc5f5 100644
--- a/src/southbridge/amd/agesa/hudson/sm.c
+++ b/src/southbridge/amd/agesa/hudson/sm.c
@@ -20,7 +20,6 @@
#include <device/smbus.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>
-#include <stdlib.h>
#include "hudson.h"
#include "smbus.c"
diff --git a/src/southbridge/amd/agesa/hudson/spi.c b/src/southbridge/amd/agesa/hudson/spi.c
index 9c546c5..9656027 100644
--- a/src/southbridge/amd/agesa/hudson/spi.c
+++ b/src/southbridge/amd/agesa/hudson/spi.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
#include <stdint.h>
-#include <stdlib.h>
#include <device/mmio.h>
#include <console/console.h>
#include <spi_flash.h>
diff --git a/src/southbridge/amd/amd8111/lpc.c b/src/southbridge/amd/amd8111/lpc.c
index c4a7896..11e852a 100644
--- a/src/southbridge/amd/amd8111/lpc.c
+++ b/src/southbridge/amd/amd8111/lpc.c
@@ -28,7 +28,6 @@
#include <arch/acpigen.h>
#include <cpu/amd/powernow.h>
#endif
-#include <stdlib.h>
#include "amd8111.h"
diff --git a/src/southbridge/amd/cimx/sb800/smbus_spd.c b/src/southbridge/amd/cimx/sb800/smbus_spd.c
index a6881bb..7078379 100644
--- a/src/southbridge/amd/cimx/sb800/smbus_spd.c
+++ b/src/southbridge/amd/cimx/sb800/smbus_spd.c
@@ -15,7 +15,6 @@
#include <device/pci_def.h>
#include <device/device.h>
-#include <stdlib.h>
#include <OEM.h> /* SMBUS0_BASE_ADDRESS */
/* warning: Porting.h includes an open #pragma pack(1) */
diff --git a/src/southbridge/amd/cimx/sb800/spi.c b/src/southbridge/amd/cimx/sb800/spi.c
index ffda0a8..42393e9 100644
--- a/src/southbridge/amd/cimx/sb800/spi.c
+++ b/src/southbridge/amd/cimx/sb800/spi.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
#include <stdint.h>
-#include <stdlib.h>
#include <device/mmio.h>
#include <console/console.h>
#include <spi_flash.h>
diff --git a/src/southbridge/amd/pi/hudson/sm.c b/src/southbridge/amd/pi/hudson/sm.c
index 0387567..2d96856 100644
--- a/src/southbridge/amd/pi/hudson/sm.c
+++ b/src/southbridge/amd/pi/hudson/sm.c
@@ -20,7 +20,6 @@
#include <device/smbus.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>
-#include <stdlib.h>
#include "hudson.h"
#include "smbus.c"
diff --git a/src/southbridge/amd/sb700/sm.c b/src/southbridge/amd/sb700/sm.c
index 6b7ce68..510ba75 100644
--- a/src/southbridge/amd/sb700/sm.c
+++ b/src/southbridge/amd/sb700/sm.c
@@ -24,7 +24,6 @@
#include <arch/io.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>
-#include <stdlib.h>
#include "sb700.h"
#include "smbus.h"
diff --git a/src/southbridge/amd/sb700/spi.c b/src/southbridge/amd/sb700/spi.c
index ee031e9..8ecebc5 100644
--- a/src/southbridge/amd/sb700/spi.c
+++ b/src/southbridge/amd/sb700/spi.c
@@ -15,7 +15,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <device/mmio.h>
#include <console/console.h>
#include <spi-generic.h>
diff --git a/src/southbridge/amd/sb800/sm.c b/src/southbridge/amd/sb800/sm.c
index 1d2daed8..29e6474 100644
--- a/src/southbridge/amd/sb800/sm.c
+++ b/src/southbridge/amd/sb800/sm.c
@@ -23,7 +23,6 @@
#include <arch/io.h>
#include <cpu/x86/lapic.h>
#include <arch/ioapic.h>
-#include <stdlib.h>
#include "sb800.h"
#include "smbus.c"
diff --git a/src/southbridge/intel/bd82x6x/me_status.c b/src/southbridge/intel/bd82x6x/me_status.c
index b202376..bb708a1 100644
--- a/src/southbridge/intel/bd82x6x/me_status.c
+++ b/src/southbridge/intel/bd82x6x/me_status.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include "me.h"
diff --git a/src/southbridge/intel/common/smbus.c b/src/southbridge/intel/common/smbus.c
index 4b08c48..26b2c1c 100644
--- a/src/southbridge/intel/common/smbus.c
+++ b/src/southbridge/intel/common/smbus.c
@@ -18,7 +18,6 @@
#include <arch/io.h>
#include <console/console.h>
#include <device/smbus_def.h>
-#include <stdlib.h>
#include "smbus.h"
diff --git a/src/southbridge/intel/fsp_rangeley/early_init.c b/src/southbridge/intel/fsp_rangeley/early_init.c
index 32e3bb5..4eace72 100644
--- a/src/southbridge/intel/fsp_rangeley/early_init.c
+++ b/src/southbridge/intel/fsp_rangeley/early_init.c
@@ -16,7 +16,6 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <console/console.h>
#include <arch/io.h>
#include <device/mmio.h>
diff --git a/src/southbridge/intel/i82801ix/i82801ix.c b/src/southbridge/intel/i82801ix/i82801ix.c
index 99078dc..cae7bee 100644
--- a/src/southbridge/intel/i82801ix/i82801ix.c
+++ b/src/southbridge/intel/i82801ix/i82801ix.c
@@ -16,7 +16,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <device/device.h>
diff --git a/src/southbridge/intel/i82801jx/i82801jx.c b/src/southbridge/intel/i82801jx/i82801jx.c
index ec5576d..e75456c 100644
--- a/src/southbridge/intel/i82801jx/i82801jx.c
+++ b/src/southbridge/intel/i82801jx/i82801jx.c
@@ -16,7 +16,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <device/device.h>
diff --git a/src/southbridge/intel/lynxpoint/me_9.x.c b/src/southbridge/intel/lynxpoint/me_9.x.c
index f5f94fe..02ee1ec 100644
--- a/src/southbridge/intel/lynxpoint/me_9.x.c
+++ b/src/southbridge/intel/lynxpoint/me_9.x.c
@@ -34,6 +34,7 @@
#include <delay.h>
#include <elog.h>
#include <halt.h>
+#include <stdlib.h>
#include "me.h"
#include "pch.h"
diff --git a/src/southbridge/intel/lynxpoint/me_status.c b/src/southbridge/intel/lynxpoint/me_status.c
index 9ca5552..eca1f17 100644
--- a/src/southbridge/intel/lynxpoint/me_status.c
+++ b/src/southbridge/intel/lynxpoint/me_status.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <console/console.h>
#include "me.h"
diff --git a/src/southbridge/intel/lynxpoint/serialio.c b/src/southbridge/intel/lynxpoint/serialio.c
index f5c52ef..ac230e0 100644
--- a/src/southbridge/intel/lynxpoint/serialio.c
+++ b/src/southbridge/intel/lynxpoint/serialio.c
@@ -21,7 +21,6 @@
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
-#include <stdlib.h>
#include "pch.h"
#include "nvs.h"
diff --git a/src/southbridge/nvidia/ck804/lpc.c b/src/southbridge/nvidia/ck804/lpc.c
index 2123554..2a4ccd1 100644
--- a/src/southbridge/nvidia/ck804/lpc.c
+++ b/src/southbridge/nvidia/ck804/lpc.c
@@ -29,7 +29,6 @@
#include <arch/ioapic.h>
#include <arch/acpi.h>
#include <cpu/x86/lapic.h>
-#include <stdlib.h>
#include <assert.h>
#include <cpu/amd/powernow.h>
#include "chip.h"
diff --git a/src/southbridge/nvidia/mcp55/lpc.c b/src/southbridge/nvidia/mcp55/lpc.c
index 1aef631..e7e3218 100644
--- a/src/southbridge/nvidia/mcp55/lpc.c
+++ b/src/southbridge/nvidia/mcp55/lpc.c
@@ -31,7 +31,6 @@
#include <arch/ioapic.h>
#include <cpu/x86/lapic.h>
#include <arch/acpi.h>
-#include <stdlib.h>
#include <cpu/amd/powernow.h>
#include "mcp55.h"
diff --git a/src/superio/fintek/f71805f/superio.c b/src/superio/fintek/f71805f/superio.c
index 4719923..d69b4c5 100644
--- a/src/superio/fintek/f71805f/superio.c
+++ b/src/superio/fintek/f71805f/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include "f71805f.h"
static void f71805f_init(struct device *dev)
diff --git a/src/superio/fintek/f71808a/superio.c b/src/superio/fintek/f71808a/superio.c
index 200b21e..05132cc 100644
--- a/src/superio/fintek/f71808a/superio.c
+++ b/src/superio/fintek/f71808a/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "f71808a.h"
diff --git a/src/superio/fintek/f71859/superio.c b/src/superio/fintek/f71859/superio.c
index da998d0..2cd1bb1 100644
--- a/src/superio/fintek/f71859/superio.c
+++ b/src/superio/fintek/f71859/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include "f71859.h"
static void f71859_init(struct device *dev)
diff --git a/src/superio/fintek/f71863fg/superio.c b/src/superio/fintek/f71863fg/superio.c
index 634888b..f4ce234 100644
--- a/src/superio/fintek/f71863fg/superio.c
+++ b/src/superio/fintek/f71863fg/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "f71863fg.h"
diff --git a/src/superio/fintek/f71869ad/superio.c b/src/superio/fintek/f71869ad/superio.c
index 15fdf3e..67b39ef 100644
--- a/src/superio/fintek/f71869ad/superio.c
+++ b/src/superio/fintek/f71869ad/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "fintek_internal.h"
diff --git a/src/superio/fintek/f71872/superio.c b/src/superio/fintek/f71872/superio.c
index 3316ee2..5111b51 100644
--- a/src/superio/fintek/f71872/superio.c
+++ b/src/superio/fintek/f71872/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "f71872.h"
diff --git a/src/superio/fintek/f81216h/superio.c b/src/superio/fintek/f81216h/superio.c
index e55ec57..106ab0e 100644
--- a/src/superio/fintek/f81216h/superio.c
+++ b/src/superio/fintek/f81216h/superio.c
@@ -19,7 +19,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <console/console.h>
-#include <stdlib.h>
#include "chip.h"
#include "f81216h.h"
diff --git a/src/superio/fintek/f81865f/superio.c b/src/superio/fintek/f81865f/superio.c
index b6156ee..af48247 100644
--- a/src/superio/fintek/f81865f/superio.c
+++ b/src/superio/fintek/f81865f/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "f81865f.h"
diff --git a/src/superio/fintek/f81866d/superio.c b/src/superio/fintek/f81866d/superio.c
index 53a5aac..dd97a1c 100644
--- a/src/superio/fintek/f81866d/superio.c
+++ b/src/superio/fintek/f81866d/superio.c
@@ -19,7 +19,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "f81866d.h"
#include "fintek_internal.h"
diff --git a/src/superio/intel/i8900/superio.c b/src/superio/intel/i8900/superio.c
index 24805bc..f65ef43 100644
--- a/src/superio/intel/i8900/superio.c
+++ b/src/superio/intel/i8900/superio.c
@@ -14,7 +14,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <device/device.h>
#include <device/pnp.h>
#include <drivers/uart/uart8250reg.h>
diff --git a/src/superio/ite/common/env_ctrl.c b/src/superio/ite/common/env_ctrl.c
index 57896e0..d0d1a2f 100644
--- a/src/superio/ite/common/env_ctrl.c
+++ b/src/superio/ite/common/env_ctrl.c
@@ -16,7 +16,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <arch/io.h>
#include <console/console.h>
#include <delay.h>
diff --git a/src/superio/ite/it8528e/superio.c b/src/superio/ite/it8528e/superio.c
index 1ed8fe0..d7169e6 100644
--- a/src/superio/ite/it8528e/superio.c
+++ b/src/superio/ite/it8528e/superio.c
@@ -19,7 +19,6 @@
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "it8528e.h"
diff --git a/src/superio/ite/it8623e/superio.c b/src/superio/ite/it8623e/superio.c
index 5fdfcef..0448832 100644
--- a/src/superio/ite/it8623e/superio.c
+++ b/src/superio/ite/it8623e/superio.c
@@ -19,7 +19,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include <superio/ite/common/env_ctrl.h>
diff --git a/src/superio/ite/it8671f/superio.c b/src/superio/ite/it8671f/superio.c
index 70da2ab..f62f574 100644
--- a/src/superio/ite/it8671f/superio.c
+++ b/src/superio/ite/it8671f/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "it8671f.h"
diff --git a/src/superio/ite/it8712f/superio.c b/src/superio/ite/it8712f/superio.c
index 6f096b0..2004236 100644
--- a/src/superio/ite/it8712f/superio.c
+++ b/src/superio/ite/it8712f/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "it8712f.h"
diff --git a/src/superio/ite/it8716f/superio.c b/src/superio/ite/it8716f/superio.c
index de1ef0d..a3b8ec4 100644
--- a/src/superio/ite/it8716f/superio.c
+++ b/src/superio/ite/it8716f/superio.c
@@ -21,7 +21,6 @@
#include <device/pnp.h>
#include <console/console.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "it8716f.h"
diff --git a/src/superio/ite/it8718f/superio.c b/src/superio/ite/it8718f/superio.c
index ed15955..297aead 100644
--- a/src/superio/ite/it8718f/superio.c
+++ b/src/superio/ite/it8718f/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/ite/common/env_ctrl.h>
#include <superio/conf_mode.h>
diff --git a/src/superio/ite/it8721f/superio.c b/src/superio/ite/it8721f/superio.c
index cf3ca3f..e08339c 100644
--- a/src/superio/ite/it8721f/superio.c
+++ b/src/superio/ite/it8721f/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "it8721f.h"
diff --git a/src/superio/ite/it8728f/superio.c b/src/superio/ite/it8728f/superio.c
index 7107bb4..58a837e 100644
--- a/src/superio/ite/it8728f/superio.c
+++ b/src/superio/ite/it8728f/superio.c
@@ -18,7 +18,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/ite/common/env_ctrl.h>
#include "chip.h"
diff --git a/src/superio/ite/it8772f/superio.c b/src/superio/ite/it8772f/superio.c
index ed46e73..7c21f10 100644
--- a/src/superio/ite/it8772f/superio.c
+++ b/src/superio/ite/it8772f/superio.c
@@ -20,7 +20,6 @@
#include <pc80/keyboard.h>
#include <arch/io.h>
#include <delay.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "chip.h" /* FIXME */
diff --git a/src/superio/nsc/pc87309/superio.c b/src/superio/nsc/pc87309/superio.c
index 4f8f967..fac88d1 100644
--- a/src/superio/nsc/pc87309/superio.c
+++ b/src/superio/nsc/pc87309/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "pc87309.h"
static void init(struct device *dev)
diff --git a/src/superio/nsc/pc87360/superio.c b/src/superio/nsc/pc87360/superio.c
index 33f27e1..ae96181 100644
--- a/src/superio/nsc/pc87360/superio.c
+++ b/src/superio/nsc/pc87360/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "pc87360.h"
static void init(struct device *dev)
diff --git a/src/superio/nsc/pc87366/superio.c b/src/superio/nsc/pc87366/superio.c
index 6d8c66e..c32f55f 100644
--- a/src/superio/nsc/pc87366/superio.c
+++ b/src/superio/nsc/pc87366/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "pc87366.h"
static void init(struct device *dev)
diff --git a/src/superio/nsc/pc87382/superio.c b/src/superio/nsc/pc87382/superio.c
index 7c04023..577193e 100644
--- a/src/superio/nsc/pc87382/superio.c
+++ b/src/superio/nsc/pc87382/superio.c
@@ -16,7 +16,6 @@
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include "pc87382.h"
static void init(struct device *dev)
diff --git a/src/superio/nsc/pc87384/superio.c b/src/superio/nsc/pc87384/superio.c
index cef7ff7..cc76a62 100644
--- a/src/superio/nsc/pc87384/superio.c
+++ b/src/superio/nsc/pc87384/superio.c
@@ -16,7 +16,6 @@
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include "pc87384.h"
static struct device_operations ops = {
diff --git a/src/superio/nsc/pc87392/superio.c b/src/superio/nsc/pc87392/superio.c
index a15d0a2..7f2df2e 100644
--- a/src/superio/nsc/pc87392/superio.c
+++ b/src/superio/nsc/pc87392/superio.c
@@ -16,7 +16,6 @@
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include "pc87392.h"
static void init(struct device *dev)
diff --git a/src/superio/nsc/pc87417/superio.c b/src/superio/nsc/pc87417/superio.c
index f867ff3..b1a23d2 100644
--- a/src/superio/nsc/pc87417/superio.c
+++ b/src/superio/nsc/pc87417/superio.c
@@ -19,7 +19,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "pc87417.h"
static void init(struct device *dev)
diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c
index 42f5434..9b5341c 100644
--- a/src/superio/nsc/pc97317/superio.c
+++ b/src/superio/nsc/pc97317/superio.c
@@ -16,7 +16,6 @@
#include <device/device.h>
#include <device/pnp.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "pc97317.h"
diff --git a/src/superio/nuvoton/nct5104d/superio.c b/src/superio/nuvoton/nct5104d/superio.c
index 40d1200..ded8fcd 100644
--- a/src/superio/nuvoton/nct5104d/superio.c
+++ b/src/superio/nuvoton/nct5104d/superio.c
@@ -16,7 +16,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include "nct5104d.h"
#include "chip.h"
diff --git a/src/superio/nuvoton/nct5572d/superio.c b/src/superio/nuvoton/nct5572d/superio.c
index e8249d4..3084687 100644
--- a/src/superio/nuvoton/nct5572d/superio.c
+++ b/src/superio/nuvoton/nct5572d/superio.c
@@ -21,7 +21,6 @@
#include <device/pnp.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>
-#include <stdlib.h>
#include <arch/acpi.h>
#include <superio/conf_mode.h>
diff --git a/src/superio/nuvoton/nct6776/superio.c b/src/superio/nuvoton/nct6776/superio.c
index e399c0a..78e07b6 100644
--- a/src/superio/nuvoton/nct6776/superio.c
+++ b/src/superio/nuvoton/nct6776/superio.c
@@ -19,7 +19,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "nct6776.h"
diff --git a/src/superio/nuvoton/nct6779d/superio.c b/src/superio/nuvoton/nct6779d/superio.c
index 49e6306..7ef3488 100644
--- a/src/superio/nuvoton/nct6779d/superio.c
+++ b/src/superio/nuvoton/nct6779d/superio.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "nct6779d.h"
diff --git a/src/superio/nuvoton/nct6791d/superio.c b/src/superio/nuvoton/nct6791d/superio.c
index 3a6d740..23d5a6f 100644
--- a/src/superio/nuvoton/nct6791d/superio.c
+++ b/src/superio/nuvoton/nct6791d/superio.c
@@ -21,7 +21,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include "nct6791d.h"
diff --git a/src/superio/nuvoton/npcd378/superio.c b/src/superio/nuvoton/npcd378/superio.c
index c1f557e..f11e75a 100644
--- a/src/superio/nuvoton/npcd378/superio.c
+++ b/src/superio/nuvoton/npcd378/superio.c
@@ -23,7 +23,6 @@
#include <device/pnp.h>
#include <option.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include <superio/conf_mode.h>
#include <arch/acpi.h>
#include <arch/acpigen.h>
diff --git a/src/superio/nuvoton/wpcm450/superio.c b/src/superio/nuvoton/wpcm450/superio.c
index c666818..4c5b6d5 100644
--- a/src/superio/nuvoton/wpcm450/superio.c
+++ b/src/superio/nuvoton/wpcm450/superio.c
@@ -17,7 +17,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "wpcm450.h"
static void init(struct device *dev)
diff --git a/src/superio/renesas/m3885x/superio.c b/src/superio/renesas/m3885x/superio.c
index b200855..043ba0f 100644
--- a/src/superio/renesas/m3885x/superio.c
+++ b/src/superio/renesas/m3885x/superio.c
@@ -18,7 +18,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <assert.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
void m3885_configure_multikey(void);
diff --git a/src/superio/smsc/dme1737/superio.c b/src/superio/smsc/dme1737/superio.c
index 0bfd3b8..0723ae2 100644
--- a/src/superio/smsc/dme1737/superio.c
+++ b/src/superio/smsc/dme1737/superio.c
@@ -21,7 +21,6 @@
#include <superio/conf_mode.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "dme1737.h"
static void dme1737_init(struct device *dev)
diff --git a/src/superio/smsc/fdc37n972/superio.c b/src/superio/smsc/fdc37n972/superio.c
index 0ee9850..3706dec 100644
--- a/src/superio/smsc/fdc37n972/superio.c
+++ b/src/superio/smsc/fdc37n972/superio.c
@@ -17,7 +17,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "fdc37n972.h"
diff --git a/src/superio/smsc/kbc1100/superio.c b/src/superio/smsc/kbc1100/superio.c
index e43e791..16431a7 100644
--- a/src/superio/smsc/kbc1100/superio.c
+++ b/src/superio/smsc/kbc1100/superio.c
@@ -20,7 +20,6 @@
#include <superio/conf_mode.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "kbc1100.h"
/* Forward declarations */
diff --git a/src/superio/smsc/lpc47b272/superio.c b/src/superio/smsc/lpc47b272/superio.c
index 6ac2d6d..b0582ae 100644
--- a/src/superio/smsc/lpc47b272/superio.c
+++ b/src/superio/smsc/lpc47b272/superio.c
@@ -24,7 +24,6 @@
#include <superio/conf_mode.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "lpc47b272.h"
/**
diff --git a/src/superio/smsc/lpc47b397/superio.c b/src/superio/smsc/lpc47b397/superio.c
index ad8153f..f7f1c7a 100644
--- a/src/superio/smsc/lpc47b397/superio.c
+++ b/src/superio/smsc/lpc47b397/superio.c
@@ -22,7 +22,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "lpc47b397.h"
static void enable_hwm_smbus(struct device *dev)
diff --git a/src/superio/smsc/lpc47m10x/superio.c b/src/superio/smsc/lpc47m10x/superio.c
index cd13854..2596ac4 100644
--- a/src/superio/smsc/lpc47m10x/superio.c
+++ b/src/superio/smsc/lpc47m10x/superio.c
@@ -23,7 +23,6 @@
#include <superio/conf_mode.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "lpc47m10x.h"
/**
diff --git a/src/superio/smsc/lpc47m15x/superio.c b/src/superio/smsc/lpc47m15x/superio.c
index 80ed456..3cb084a 100644
--- a/src/superio/smsc/lpc47m15x/superio.c
+++ b/src/superio/smsc/lpc47m15x/superio.c
@@ -20,7 +20,6 @@
#include <superio/conf_mode.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "lpc47m15x.h"
/* Forward declarations */
diff --git a/src/superio/smsc/lpc47n207/early_serial.c b/src/superio/smsc/lpc47n207/early_serial.c
index b8e5c0b..f425730 100644
--- a/src/superio/smsc/lpc47n207/early_serial.c
+++ b/src/superio/smsc/lpc47n207/early_serial.c
@@ -16,7 +16,6 @@
#include <arch/io.h>
#include <device/pnp.h>
#include <stdint.h>
-#include <stdlib.h>
#include "lpc47n207.h"
/*
diff --git a/src/superio/smsc/lpc47n217/superio.c b/src/superio/smsc/lpc47n217/superio.c
index b10e8a1..0808cf6 100644
--- a/src/superio/smsc/lpc47n217/superio.c
+++ b/src/superio/smsc/lpc47n217/superio.c
@@ -25,7 +25,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <assert.h>
-#include <stdlib.h>
#include "lpc47n217.h"
/* Forward declarations */
diff --git a/src/superio/smsc/lpc47n227/superio.c b/src/superio/smsc/lpc47n227/superio.c
index 610f685..c21cdda 100644
--- a/src/superio/smsc/lpc47n227/superio.c
+++ b/src/superio/smsc/lpc47n227/superio.c
@@ -21,7 +21,6 @@
#include <console/console.h>
#include <device/smbus.h>
#include <assert.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include <superio/conf_mode.h>
diff --git a/src/superio/smsc/mec1308/superio.c b/src/superio/smsc/mec1308/superio.c
index 74b8b2e..c3bd150 100644
--- a/src/superio/smsc/mec1308/superio.c
+++ b/src/superio/smsc/mec1308/superio.c
@@ -20,7 +20,6 @@
#include <superio/conf_mode.h>
#include <device/smbus.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "mec1308.h"
static void mec1308_init(struct device *dev)
diff --git a/src/superio/smsc/sch4037/superio.c b/src/superio/smsc/sch4037/superio.c
index 5e49aa7..0e102e6 100644
--- a/src/superio/smsc/sch4037/superio.c
+++ b/src/superio/smsc/sch4037/superio.c
@@ -19,7 +19,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "sch4037.h"
diff --git a/src/superio/smsc/sio1036/superio.c b/src/superio/smsc/sio1036/superio.c
index a192831..6ed6954 100644
--- a/src/superio/smsc/sio1036/superio.c
+++ b/src/superio/smsc/sio1036/superio.c
@@ -18,7 +18,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include "sio1036.h"
diff --git a/src/superio/smsc/sio10n268/superio.c b/src/superio/smsc/sio10n268/superio.c
index b8243ec..4428b05 100644
--- a/src/superio/smsc/sio10n268/superio.c
+++ b/src/superio/smsc/sio10n268/superio.c
@@ -13,7 +13,6 @@
* GNU General Public License for more details.
*/
-#include <stdlib.h>
#include <device/device.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
diff --git a/src/superio/smsc/smscsuperio/superio.c b/src/superio/smsc/smscsuperio/superio.c
index 4ce006d..aa5af38 100644
--- a/src/superio/smsc/smscsuperio/superio.c
+++ b/src/superio/smsc/smscsuperio/superio.c
@@ -35,7 +35,6 @@
#include <superio/conf_mode.h>
#include <console/console.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
/* The following Super I/O chips are currently supported by this driver: */
#define LPC47M172 0x14
diff --git a/src/superio/via/vt1211/superio.c b/src/superio/via/vt1211/superio.c
index 4d7c8de..aa0a464 100644
--- a/src/superio/via/vt1211/superio.c
+++ b/src/superio/via/vt1211/superio.c
@@ -19,7 +19,6 @@
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
-#include <stdlib.h>
#include "vt1211.h"
static u8 hwm_io_regs[] = {
diff --git a/src/superio/winbond/w83627dhg/superio.c b/src/superio/winbond/w83627dhg/superio.c
index 9e15037..e1d4c17 100644
--- a/src/superio/winbond/w83627dhg/superio.c
+++ b/src/superio/winbond/w83627dhg/superio.c
@@ -17,7 +17,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "w83627dhg.h"
static void w83627dhg_enable_UR2(struct device *dev)
diff --git a/src/superio/winbond/w83627ehg/superio.c b/src/superio/winbond/w83627ehg/superio.c
index 88fbc31..fdf0a3f 100644
--- a/src/superio/winbond/w83627ehg/superio.c
+++ b/src/superio/winbond/w83627ehg/superio.c
@@ -23,7 +23,6 @@
#include <console/console.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>
-#include <stdlib.h>
#include "w83627ehg.h"
static void enable_hwm_smbus(struct device *dev)
diff --git a/src/superio/winbond/w83627hf/superio.c b/src/superio/winbond/w83627hf/superio.c
index 318eaa4..0a1f4fd 100644
--- a/src/superio/winbond/w83627hf/superio.c
+++ b/src/superio/winbond/w83627hf/superio.c
@@ -23,7 +23,6 @@
#include <console/console.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>
-#include <stdlib.h>
#include "w83627hf.h"
static void enable_hwm_smbus(struct device *dev)
diff --git a/src/superio/winbond/w83627uhg/superio.c b/src/superio/winbond/w83627uhg/superio.c
index 82974ba..3fb4a10 100644
--- a/src/superio/winbond/w83627uhg/superio.c
+++ b/src/superio/winbond/w83627uhg/superio.c
@@ -18,7 +18,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <stdint.h>
-#include <stdlib.h>
#include <pc80/keyboard.h>
#include "w83627uhg.h"
diff --git a/src/superio/winbond/w83667hg-a/superio.c b/src/superio/winbond/w83667hg-a/superio.c
index 0735f04..4a995d6 100644
--- a/src/superio/winbond/w83667hg-a/superio.c
+++ b/src/superio/winbond/w83667hg-a/superio.c
@@ -21,7 +21,6 @@
#include <device/pnp.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>
-#include <stdlib.h>
#include <arch/acpi.h>
#include <superio/conf_mode.h>
diff --git a/src/superio/winbond/w83697hf/superio.c b/src/superio/winbond/w83697hf/superio.c
index a3c132c..aa684a4 100644
--- a/src/superio/winbond/w83697hf/superio.c
+++ b/src/superio/winbond/w83697hf/superio.c
@@ -20,7 +20,6 @@
#include <superio/conf_mode.h>
#include <console/console.h>
#include <lib.h>
-#include <stdlib.h>
#include "chip.h"
#include "w83697hf.h"
diff --git a/src/superio/winbond/w83977tf/superio.c b/src/superio/winbond/w83977tf/superio.c
index b4f316b..c7cd3e8 100644
--- a/src/superio/winbond/w83977tf/superio.c
+++ b/src/superio/winbond/w83977tf/superio.c
@@ -20,7 +20,6 @@
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "w83977tf.h"
static void w83977tf_init(struct device *dev)
diff --git a/src/superio/winbond/wpcd376i/superio.c b/src/superio/winbond/wpcd376i/superio.c
index ae4fce4..1625fbd 100644
--- a/src/superio/winbond/wpcd376i/superio.c
+++ b/src/superio/winbond/wpcd376i/superio.c
@@ -19,7 +19,6 @@
#include <device/pnp.h>
#include <drivers/uart/uart8250reg.h>
#include <pc80/keyboard.h>
-#include <stdlib.h>
#include "chip.h"
#include "wpcd376i.h"
--
To view, visit https://review.coreboot.org/c/coreboot/+/32023
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id89751c600bad2ddb4b5aa9822adc5c5097787aa
Gerrit-Change-Number: 32023
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
1 week, 5 days