Initial commit for depthcharge.

BUG=chrome-os-partner:8339
TEST=Built and booted on Stumpy.
BRANCH=None

Change-Id: I66c4ca0cc0e3e5a5d96eca89fae52d61bb4cd815
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24620
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Add stubs for the functions vboot expects to call in the host firmware.

BUG=chrome-os-partner:8339
TEST=Build for stumpy.
BRANCH=None

Change-Id: I10c89938816f34e65eae93cb5ca97e257d2250f3
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24621
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Set the compiler's standards mode to gnu99.

BUG=chrome-os-partner:8339
TEST=Built for stumpy.
BRANCH=None

Change-Id: I2f40eb974aee9c3f57051f8dc96ddb5d277fc5b1
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24622
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Add stubs for memory utility functions.

These functions aren't technically part of the vboot API, but they're not
standard functions either because vboot uses their EFI names.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: I8d51879bae033ad3048333d339100a96661417a1
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24623
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Add a skeleton of the functions that drive vboot.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: Ic554fe654d41f072a5df6860090fb53df32013cb
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24624
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Implement vboot's debug callbacks.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy and saw some debug messages.
BRANCH=None

Change-Id: I370f8070b512282037c9d00f1bdd9b6af4c1d81b
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24698
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Implement vboot's memory/utility callbacks.

BUG=chrome-os-partner:8339
TEST=Built and booted on Stumpy.
BRANCH=None

Change-Id: I167be445d18d93f47cf5f984fd7768bf153eb8fd
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24699
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Implement the vboot keyboard callbacks.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: I2e712c6bcd351bde7fc395c882da57650e637ab5
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24700
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Add a config option to specify the location of the FMAP.

BUG=chrome-os-partner:8339
TEST=Built on Stumpy and printed the FMAP.
BRANCH=None

Change-Id: If1f40b4af0fdcfba2eecc8e9f3247a5027226f2f
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24701
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Add some code for handling FMAPs.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: I46830648adc5f36d169a402a8575d78601cbf95c
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24702
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Set up the cparams structure using the contents of the FMAP.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: Ibf4e8ec6965b1d7262691ddce6b37fb5257756b7
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24733
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Set some compiler options to make our ABI match vboot's.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy and saw some bad behavior go away.
BRANCH=None

Change-Id: I9cdb5f5f7cacc8738489291d9ed413d8dba43092
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24734
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Steal our implementation of vboot's nvstorage callbacks from U-Boot.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: I1319536c6849d9dd34eceef6f13b7503902b2346
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24735
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Steal our HDA codec driver back from U-Boot so we can beep.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: Ic20c6cfe5d72f31ca4bea69969411af510d45136
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24737
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Implement vboot's time related callbacks.

BUG=chrome-os-partner:8339
TEST=Built and booted on Stumpy.
BRANCH=None

Change-Id: Idff7a7b7ce65a3a4145c5dfcd2a260fe7bea7445
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24769
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Implement vboot's TPM callbacks by grabbing our TPM support from U-Boot.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy, booted, and saw messages indicating that the TPM was
working properly.
BRANCH=None

Change-Id: If305360c6a372506a48ef2cebad0a32f3cbe2e1a
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24770
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Get rid of some unnecessary debug output.

BUG=chrome-os-partner:8339
TEST=Built and booted on Stumpy.
BRANCH=None

Change-Id: I1ae95f1e0b9732ce75ba2569629f618ae2ad9b4a
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24771
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Provide access to the actual vblocks, and allow booting RO.

BUG=chrome-os-partner:8339
TEST=Built and booted on Stumpy. Saw that vboot selected the RO firmware.
BRANCH=None

Change-Id: Ie30bf1d8c906344bbdf7fc1a8569b5ea73e240f2
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24772
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Detect the CPU speed early in initialization.

The delay functions depend on knowing what the CPU speed is.

BUG=chrome-os-partner:8339
TEST=Built on Stumpy.
BRANCH=None

Change-Id: Iec5af0afe220833e68367ee174d5d1174929e8c4
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24773
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Get rid of some more unnecessary debug output.

BUG=chrome-os-partner:8339
TEST=Built for Stumpy.
BRANCH=None

Change-Id: Ic1807da43cdef0c407edff66fd68593e0d3f66b7
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit-int.chromium.org/24776
Reviewed-by: Stefan Reinauer <reinauer@google.com>