Add revision table to the SPL blob

It is becoming necessary to communicate the revision table to the SPL
blob so that it can decide what memory size to expect on the target.

The machine parameters structure allows only fixed size (32 bits)
elements. Let's add to the structure the offset of the array of bytes
representing the revision table.

The offset of the table is based on the address of the machine
parameter structure. The size of the table implicitly is defined as (3
^ NUM_GPIOS * 2) bytes, as each GPIO is a tertiary number, and for
each revision read from GPIOs the table includes two byte values:
revision and subrevision.

The size field of the variable size SPL blob header needs to be
updated to reflect the addition.

Instead of adding another elif case to the huge statement handling the
machine parameter names, this change introduces a dictionary for
routing processing based on the machine parameter name.

The fact that the blob could be resized by parameter processing
functions posed a challenge, as the blob is represented by a binary
string, and changing it in the function does not affect the caller.
The solution is to make the blob on of the ExynosBL2 class'
properties. This results in a larger change, but simplifies footprints
of many methods of this class.

For the purposes of checksum verification the BL1 expects the SPL size
to be divisible by 4, adding padding as necessary.

Conflicts:
	host/lib/exynos.py
...branch is missing a significant number of changes, so had to apply
a bunch manually.

BRANCH=4482
BUG=chrome-os-partner:23024
TEST=With all other CLs, rev5.0 board now reports 5.0 in the SPL.
TEST=Added SPL code to print map and saw values that matched dts:
  02028154: 0e 00 0e 01 0e 02 0e 03 0e 04 0e 05 0e 06 0e 07
  02028164: 03 00 03 01 03 02 03 03 04 00 04 01 04 02 04 03
  02028174: 05 00 05 01 05 02 05 03 06 00 06 01 06 02 06 03
  ...
  020281e4: 0d 00 0d 01 0d 02 0d 03 0d 04 0d 05 0d 06 0d 07
  020281f4: f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Change-Id: I4f0b005f53d4bc437780432fb59fb3c9088f4ec7
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Previously-Reviewed-on: https://chromium-review.googlesource.com/171772
Reviewed-on: https://chromium-review.googlesource.com/173243
1 file changed