<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/28092">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Stoneyridge: Remove VENDORCODE_FULL_SUPPORT<br><br>Remove VENDORCODE_FULL_SUPPORT from /soc/amd/stoneyridge/Kconfig and<br>from vendorcode/amd/pi/00670F00/Makefile.inc, thus completing the removal<br>of VENDORCODE_FULL_SUPPORT from coreboot.<br><br>BUG=b:112578491<br>TEST=none, VENDORCODE_FULL_SUPPORT already not used.<br><br>Change-Id: Idb5f6dc7add1617f7a97a97ae110901b2dec0996<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/soc/amd/stoneyridge/Kconfig<br>M src/vendorcode/amd/pi/00670F00/Makefile.inc<br>D src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c<br>D src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c<br>D src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/MemLib.c<br>D src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/PciLib.c<br>6 files changed, 0 insertions(+), 405 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/28092/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig</span><br><span>index 594d22c..2716c8c 100644</span><br><span>--- a/src/soc/amd/stoneyridge/Kconfig</span><br><span>+++ b/src/soc/amd/stoneyridge/Kconfig</span><br><span>@@ -377,11 +377,4 @@</span><br><span>          return to S0.  Otherwise the system will remain in S5 once power</span><br><span>     is restored.</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-config VENDORCODE_FULL_SUPPORT</span><br><span style="color: hsl(0, 100%, 40%);">-        def_bool n</span><br><span style="color: hsl(0, 100%, 40%);">-      help</span><br><span style="color: hsl(0, 100%, 40%);">-      This option determines if all files under</span><br><span style="color: hsl(0, 100%, 40%);">-       vendorcode/amd/pi/00670F00/ will be compiled or only</span><br><span style="color: hsl(0, 100%, 40%);">-    selected procedures of source files (minimum required).</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4</span><br><span>diff --git a/src/vendorcode/amd/pi/00670F00/Makefile.inc b/src/vendorcode/amd/pi/00670F00/Makefile.inc</span><br><span>index bd807a9..ad3955c 100644</span><br><span>--- a/src/vendorcode/amd/pi/00670F00/Makefile.inc</span><br><span>+++ b/src/vendorcode/amd/pi/00670F00/Makefile.inc</span><br><span>@@ -90,9 +90,6 @@</span><br><span> </span><br><span> agesa_raw_files += $(wildcard $(AGESA_ROOT)/binaryPI/*.[cS])</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-ifeq ($(CONFIG_VENDORCODE_FULL_SUPPORT),y)</span><br><span style="color: hsl(0, 100%, 40%);">-agesa_raw_files += $(wildcard $(AGESA_ROOT)/Proc/Fch/Common/*.[cS])</span><br><span style="color: hsl(0, 100%, 40%);">-endif</span><br><span> agesa_raw_files += $(wildcard $(AGESA_ROOT)/Proc/Psp/PspBaseLib/*.[cS])</span><br><span> </span><br><span> classes-$(CONFIG_CPU_AMD_AGESA_BINARY_PI) += libagesa</span><br><span>diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c</span><br><span>deleted file mode 100644</span><br><span>index 01ae71e..0000000</span><br><span>--- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,79 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/* $NoKeywords:$ */</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * @file</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * FCH IO access common routine</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @xrefitem bom "File Content Label" "Release Content"</span><br><span style="color: hsl(0, 100%, 40%);">- * @e project:     AGESA</span><br><span style="color: hsl(0, 100%, 40%);">- * @e sub-project: FCH</span><br><span style="color: hsl(0, 100%, 40%);">- * @e \$Revision$   @e \$Date$</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">- /*****************************************************************************</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (c) 2008 - 2016, Advanced Micro Devices, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- * All rights reserved.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Redistribution and use in source and binary forms, with or without</span><br><span style="color: hsl(0, 100%, 40%);">- * modification, are permitted provided that the following conditions are met:</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions of source code must retain the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions in binary form must reproduce the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer in the</span><br><span style="color: hsl(0, 100%, 40%);">- *       documentation and/or other materials provided with the distribution.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Neither the name of Advanced Micro Devices, Inc. nor the names of</span><br><span style="color: hsl(0, 100%, 40%);">- *       its contributors may be used to endorse or promote products derived</span><br><span style="color: hsl(0, 100%, 40%);">- *       from this software without specific prior written permission.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span><br><span style="color: hsl(0, 100%, 40%);">- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span><br><span style="color: hsl(0, 100%, 40%);">- * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY</span><br><span style="color: hsl(0, 100%, 40%);">- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span><br><span style="color: hsl(0, 100%, 40%);">- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span><br><span style="color: hsl(0, 100%, 40%);">- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- ***************************************************************************/</span><br><span style="color: hsl(0, 100%, 40%);">-#include "FchPlatform.h"</span><br><span style="color: hsl(0, 100%, 40%);">-#define FILECODE PROC_FCH_COMMON_FCHLIB_FILECODE</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**< FchStall - Reserved  */</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-FchStall (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       UINT32              uSec,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       AMD_CONFIG_PARAMS   *StdHeader</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  UINT16 timerAddr;</span><br><span style="color: hsl(0, 100%, 40%);">-  UINT32 startTime;</span><br><span style="color: hsl(0, 100%, 40%);">-  UINT32 elapsedTime;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  LibAmdMemRead (AccessWidth16, (UINT64) (ACPI_MMIO_BASE + PMIO_BASE + FCH_PMIOA_REG64), &timerAddr, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-  if ( timerAddr == 0 ) {</span><br><span style="color: hsl(0, 100%, 40%);">-    uSec = uSec / 2;</span><br><span style="color: hsl(0, 100%, 40%);">-    while ( uSec != 0 ) {</span><br><span style="color: hsl(0, 100%, 40%);">-      LibAmdIoRead (AccessWidth8, FCHOEM_IO_DELAY_PORT, (UINT8 *) (&startTime), StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-      uSec--;</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-  } else {</span><br><span style="color: hsl(0, 100%, 40%);">-    LibAmdIoRead (AccessWidth32, timerAddr, &startTime, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-    for ( ;; ) {</span><br><span style="color: hsl(0, 100%, 40%);">-      LibAmdIoRead (AccessWidth32, timerAddr, &elapsedTime, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-      if ( elapsedTime < startTime ) {</span><br><span style="color: hsl(0, 100%, 40%);">-        elapsedTime = elapsedTime + FCH_MAX_TIMER - startTime;</span><br><span style="color: hsl(0, 100%, 40%);">-      } else {</span><br><span style="color: hsl(0, 100%, 40%);">-        elapsedTime = elapsedTime - startTime;</span><br><span style="color: hsl(0, 100%, 40%);">-      }</span><br><span style="color: hsl(0, 100%, 40%);">-      if ( (elapsedTime * FCHOEM_ELAPSED_TIME_UNIT / FCHOEM_ELAPSED_TIME_DIVIDER) > uSec ) {</span><br><span style="color: hsl(0, 100%, 40%);">-        break;</span><br><span style="color: hsl(0, 100%, 40%);">-      }</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-  }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c</span><br><span>deleted file mode 100644</span><br><span>index 2b70e17..0000000</span><br><span>--- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,95 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/* $NoKeywords:$ */</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * @file</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * FCH IO access common routine</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @xrefitem bom "File Content Label" "Release Content"</span><br><span style="color: hsl(0, 100%, 40%);">- * @e project:     AGESA</span><br><span style="color: hsl(0, 100%, 40%);">- * @e sub-project: FCH</span><br><span style="color: hsl(0, 100%, 40%);">- * @e \$Revision$   @e \$Date$</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">- /*****************************************************************************</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (c) 2008 - 2016, Advanced Micro Devices, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- * All rights reserved.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Redistribution and use in source and binary forms, with or without</span><br><span style="color: hsl(0, 100%, 40%);">- * modification, are permitted provided that the following conditions are met:</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions of source code must retain the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions in binary form must reproduce the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer in the</span><br><span style="color: hsl(0, 100%, 40%);">- *       documentation and/or other materials provided with the distribution.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Neither the name of Advanced Micro Devices, Inc. nor the names of</span><br><span style="color: hsl(0, 100%, 40%);">- *       its contributors may be used to endorse or promote products derived</span><br><span style="color: hsl(0, 100%, 40%);">- *       from this software without specific prior written permission.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span><br><span style="color: hsl(0, 100%, 40%);">- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span><br><span style="color: hsl(0, 100%, 40%);">- * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY</span><br><span style="color: hsl(0, 100%, 40%);">- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span><br><span style="color: hsl(0, 100%, 40%);">- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span><br><span style="color: hsl(0, 100%, 40%);">- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- ***************************************************************************/</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include "FchPlatform.h"</span><br><span style="color: hsl(0, 100%, 40%);">-#include  "cpuFamilyTranslation.h"</span><br><span style="color: hsl(0, 100%, 40%);">- /*</span><br><span style="color: hsl(0, 100%, 40%);">-  * Headers removed for coreboot.</span><br><span style="color: hsl(0, 100%, 40%);">-  * #include  "Porting.h"</span><br><span style="color: hsl(0, 100%, 40%);">-  * #include  "AMD.h"</span><br><span style="color: hsl(0, 100%, 40%);">-  * #include  "amdlib.h"</span><br><span style="color: hsl(0, 100%, 40%);">-  * #include  "heapManager.h"</span><br><span style="color: hsl(0, 100%, 40%);">-  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define FILECODE PROC_FCH_COMMON_FCHPELIB_FILECODE</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * GetChipSysMode - Get Chip status</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] Value - Return Chip strap status</span><br><span style="color: hsl(0, 100%, 40%);">- *   StrapStatus [15.0] - Hudson-2 chip Strap Status</span><br><span style="color: hsl(0, 100%, 40%);">- *    @li <b>0001</b> - Not USED FWH</span><br><span style="color: hsl(0, 100%, 40%);">- *    @li <b>0002</b> - Not USED LPC ROM</span><br><span style="color: hsl(0, 100%, 40%);">- *    @li <b>0004</b> - EC enabled</span><br><span style="color: hsl(0, 100%, 40%);">- *    @li <b>0008</b> - Reserved</span><br><span style="color: hsl(0, 100%, 40%);">- *    @li <b>0010</b> - Internal Clock mode</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] StdHeader</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-GetChipSysMode (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       VOID                *Value,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       AMD_CONFIG_PARAMS   *StdHeader</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  LibAmdMemRead (AccessWidth8, (UINT64) (ACPI_MMIO_BASE + MISC_BASE + FCH_MISC_REG80), Value, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * IsImcEnabled - Is IMC Enabled</span><br><span style="color: hsl(0, 100%, 40%);">- * @retval  TRUE for IMC Enabled; FALSE for IMC Disabled</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-BOOLEAN</span><br><span style="color: hsl(0, 100%, 40%);">-IsImcEnabled (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       AMD_CONFIG_PARAMS   *StdHeader</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  UINT8   dbSysConfig;</span><br><span style="color: hsl(0, 100%, 40%);">-  GetChipSysMode (&dbSysConfig, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-  if (dbSysConfig & ChipSysEcEnable) {</span><br><span style="color: hsl(0, 100%, 40%);">-    return TRUE;</span><br><span style="color: hsl(0, 100%, 40%);">-  } else {</span><br><span style="color: hsl(0, 100%, 40%);">-    return FALSE;</span><br><span style="color: hsl(0, 100%, 40%);">-  }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/MemLib.c b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/MemLib.c</span><br><span>deleted file mode 100644</span><br><span>index de263dd..0000000</span><br><span>--- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/MemLib.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,147 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/* $NoKeywords:$ */</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * @file</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * FCH memory access lib</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @xrefitem bom "File Content Label" "Release Content"</span><br><span style="color: hsl(0, 100%, 40%);">- * @e project:     AGESA</span><br><span style="color: hsl(0, 100%, 40%);">- * @e sub-project: FCH</span><br><span style="color: hsl(0, 100%, 40%);">- * @e \$Revision$   @e \$Date$</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">- /*****************************************************************************</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (c) 2008 - 2016, Advanced Micro Devices, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- * All rights reserved.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Redistribution and use in source and binary forms, with or without</span><br><span style="color: hsl(0, 100%, 40%);">- * modification, are permitted provided that the following conditions are met:</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions of source code must retain the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions in binary form must reproduce the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer in the</span><br><span style="color: hsl(0, 100%, 40%);">- *       documentation and/or other materials provided with the distribution.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Neither the name of Advanced Micro Devices, Inc. nor the names of</span><br><span style="color: hsl(0, 100%, 40%);">- *       its contributors may be used to endorse or promote products derived</span><br><span style="color: hsl(0, 100%, 40%);">- *       from this software without specific prior written permission.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span><br><span style="color: hsl(0, 100%, 40%);">- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span><br><span style="color: hsl(0, 100%, 40%);">- * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY</span><br><span style="color: hsl(0, 100%, 40%);">- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span><br><span style="color: hsl(0, 100%, 40%);">- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span><br><span style="color: hsl(0, 100%, 40%);">- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- ***************************************************************************/</span><br><span style="color: hsl(0, 100%, 40%);">-#include "FchPlatform.h"</span><br><span style="color: hsl(0, 100%, 40%);">- /*</span><br><span style="color: hsl(0, 100%, 40%);">-  * Header removed for coreboot.</span><br><span style="color: hsl(0, 100%, 40%);">-  * #include  "Ids.h"</span><br><span style="color: hsl(0, 100%, 40%);">-  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define FILECODE PROC_FCH_COMMON_MEMLIB_FILECODE</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * ReadMem - Read FCH BAR Memory</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] Address    - Memory BAR address</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] OpFlag     - Access width</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] *ValuePtr  - In/Out value pointer</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-ReadMem (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT32     Address,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT8      OpFlag,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  VOID       *ValuePtr</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  OpFlag = OpFlag & 0x7f;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  switch ( OpFlag ) {</span><br><span style="color: hsl(0, 100%, 40%);">-  case AccessWidth8:</span><br><span style="color: hsl(0, 100%, 40%);">-    *((UINT8*)ValuePtr) = *((volatile UINT8*) ((UINTN)Address));</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  case AccessWidth16:</span><br><span style="color: hsl(0, 100%, 40%);">-    *((UINT16*)ValuePtr) = *((volatile UINT16*) ((UINTN)Address));</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  case AccessWidth32:</span><br><span style="color: hsl(0, 100%, 40%);">-    *((UINT32*)ValuePtr) = *((volatile UINT32*) ((UINTN)Address));</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  default:</span><br><span style="color: hsl(0, 100%, 40%);">-    ASSERT (FALSE);</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-  }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * WriteMem - Write FCH BAR Memory</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] Address    - Memory BAR address</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] OpFlag     - Access width</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] *ValuePtr  - In/Out Value pointer</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-WriteMem (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT32     Address,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT8      OpFlag,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  VOID       *ValuePtr</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  OpFlag = OpFlag & 0x7f;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  switch ( OpFlag ) {</span><br><span style="color: hsl(0, 100%, 40%);">-  case AccessWidth8 :</span><br><span style="color: hsl(0, 100%, 40%);">-    *((volatile UINT8*) ((UINTN)Address)) = *((UINT8*)ValuePtr);</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  case AccessWidth16:</span><br><span style="color: hsl(0, 100%, 40%);">-    *((volatile UINT16*) ((UINTN)Address)) = *((UINT16*)ValuePtr);</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  case AccessWidth32:</span><br><span style="color: hsl(0, 100%, 40%);">-    *((volatile UINT32*) ((UINTN)Address)) = *((UINT32*)ValuePtr);</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  default:</span><br><span style="color: hsl(0, 100%, 40%);">-    ASSERT (FALSE);</span><br><span style="color: hsl(0, 100%, 40%);">-    break;</span><br><span style="color: hsl(0, 100%, 40%);">-  }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * RwMem - Read & Write FCH BAR Memory</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] Address    - Memory BAR address</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] OpFlag     - Access width</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] Mask       - Mask Value of data</span><br><span style="color: hsl(0, 100%, 40%);">- * @param[in] Data       - Write data</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-RwMem (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT32     Address,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT8      OpFlag,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT32     Mask,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN  UINT32     Data</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  UINT32 Result;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  ReadMem (Address, OpFlag, &Result);</span><br><span style="color: hsl(0, 100%, 40%);">-  Result = (Result & Mask) | Data;</span><br><span style="color: hsl(0, 100%, 40%);">-  WriteMem (Address, OpFlag, &Result);</span><br><span style="color: hsl(0, 100%, 40%);">-  ReadMem (Address, OpFlag, &Result);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/PciLib.c b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/PciLib.c</span><br><span>deleted file mode 100644</span><br><span>index 136353e..0000000</span><br><span>--- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/PciLib.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,74 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/* $NoKeywords:$ */</span><br><span style="color: hsl(0, 100%, 40%);">-/**</span><br><span style="color: hsl(0, 100%, 40%);">- * @file</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * FCH PCI access lib</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @xrefitem bom "File Content Label" "Release Content"</span><br><span style="color: hsl(0, 100%, 40%);">- * @e project:     AGESA</span><br><span style="color: hsl(0, 100%, 40%);">- * @e sub-project: FCH</span><br><span style="color: hsl(0, 100%, 40%);">- * @e \$Revision$   @e \$Date$</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">- /*****************************************************************************</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (c) 2008 - 2016, Advanced Micro Devices, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- * All rights reserved.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Redistribution and use in source and binary forms, with or without</span><br><span style="color: hsl(0, 100%, 40%);">- * modification, are permitted provided that the following conditions are met:</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions of source code must retain the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Redistributions in binary form must reproduce the above copyright</span><br><span style="color: hsl(0, 100%, 40%);">- *       notice, this list of conditions and the following disclaimer in the</span><br><span style="color: hsl(0, 100%, 40%);">- *       documentation and/or other materials provided with the distribution.</span><br><span style="color: hsl(0, 100%, 40%);">- *     * Neither the name of Advanced Micro Devices, Inc. nor the names of</span><br><span style="color: hsl(0, 100%, 40%);">- *       its contributors may be used to endorse or promote products derived</span><br><span style="color: hsl(0, 100%, 40%);">- *       from this software without specific prior written permission.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span><br><span style="color: hsl(0, 100%, 40%);">- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span><br><span style="color: hsl(0, 100%, 40%);">- * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY</span><br><span style="color: hsl(0, 100%, 40%);">- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span><br><span style="color: hsl(0, 100%, 40%);">- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span><br><span style="color: hsl(0, 100%, 40%);">- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span><br><span style="color: hsl(0, 100%, 40%);">- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span><br><span style="color: hsl(0, 100%, 40%);">- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- ***************************************************************************/</span><br><span style="color: hsl(0, 100%, 40%);">-#include "FchPlatform.h"</span><br><span style="color: hsl(0, 100%, 40%);">-#define FILECODE PROC_FCH_COMMON_PCILIB_FILECODE</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-ReadPci (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       UINT32                  Address,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       UINT8                   OpFlag,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       VOID*                   Value,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       AMD_CONFIG_PARAMS       *StdHeader</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  PCI_ADDR  PciAddress;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  PciAddress.AddressValue = ((Address >> 4) & ~0xFFF) + (Address & 0xFFF);</span><br><span style="color: hsl(0, 100%, 40%);">-  LibAmdPciRead ((ACCESS_WIDTH) OpFlag, PciAddress, Value, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-VOID</span><br><span style="color: hsl(0, 100%, 40%);">-WritePci (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       UINT32                  Address,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       UINT8                   OpFlag,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       VOID                    *Value,</span><br><span style="color: hsl(0, 100%, 40%);">-  IN       AMD_CONFIG_PARAMS       *StdHeader</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-  PCI_ADDR  PciAddress;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-  PciAddress.AddressValue = ((Address >> 4) & ~0xFFF) + (Address & 0xFFF);</span><br><span style="color: hsl(0, 100%, 40%);">-  LibAmdPciWrite ((ACCESS_WIDTH) OpFlag, PciAddress, Value, StdHeader);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28092">change 28092</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/28092"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Idb5f6dc7add1617f7a97a97ae110901b2dec0996 </div>
<div style="display:none"> Gerrit-Change-Number: 28092 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>