cpu/amd/pi: Change wrapper to use config option
commitca3815b4c586c63743892ee04ad61026d6ba4df0
authorMarshall Dawson <marshalldawson3rd@gmail.com>
Wed, 25 Jan 2017 22:23:47 +0000 (25 15:23 -0700)
committerMarc Jones <marc@marcjonesconsulting.com>
Thu, 27 Apr 2017 16:52:00 +0000 (27 18:52 +0200)
treefa044c1ddeb7457d8a0ed7f3c923665fb2ca56c3
parent6f978cfd1ab6a57e5729e19bed3df7702c4f09cb
cpu/amd/pi: Change wrapper to use config option

Add a check for vboot when locating the binaryPI image.

There is currently an ordering problem using cbmem to locate the
image when vboot is present.  Vboot inserts its locator into the
search process so that memory can be checked before flash is queried.
For the earliest calls using the wrapper, DRAM has not been set up
and cbmem not initialized in romstage.  This change prevents an
endless loop when vboot searches cbmem.

This change has another side effect.  When vboot is in effect, the
change forces the RO binaryPI to be used even when on either of the
RW paths.  There is currently no ability to relocate the XIP image
for use in a RW region.

Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Marc Jones <marcj303@gmail.com>
(cherry picked from commit 6efe9217c38cf93fd9b38e52cf3ec90fee3d0474)

Change-Id: I0c14bd729f8a67bca37cbdbd3a5e266c99c86d54
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/18438
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
src/northbridge/amd/pi/agesawrapper.c