summaryrefslogtreecommitdiff
path: root/tests/ec_sync_tests.c
Commit message (Collapse)AuthorAgeFilesLines
* vboot: replace VBERROR_SIMULATED with VB2_ERROR_MOCKJoel Kitching2019-08-131-7/+7
| | | | | | | | | | | | | | | Replace vboot1-style VBERROR_SIMULATED with VB2_ERROR_MOCK. BUG=b:124141368, chromium:988410 TEST=make clean && make runtests BRANCH=none Change-Id: I9f7a21b957097672883a428a5210c14a27852085 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722917 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: replace VBERROR_UNKNOWN with VB2_ERROR_UNKNOWNJoel Kitching2019-08-131-2/+2
| | | | | | | | | | | | | | | | Replace vboot1-style VBERROR_UNKNOWN with VB2_ERROR_UNKNOWN. BUG=b:124141368, chromium:988410 TEST=make clean && make runtests BRANCH=none Change-Id: Icd2158e328142cff69ce94b5396ab021a1f7839c Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1728115 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722916 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: replace VBERROR_SUCCESS with VB2_SUCCESSJoel Kitching2019-08-131-16/+16
| | | | | | | | | | | | | | | | | Replace vboot1-style VBERROR_SUCCESS with VB2_SUCCESS (trivial change since both are equal values). BUG=b:124141368, chromium:988410 TEST=make clean && make runtests BRANCH=none Change-Id: I46e02471a031e9f36ec869d11d0b957d1c1b5769 Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1728114 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722915 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: rename VbError_t typedef to vb2_error_tJoel Kitching2019-08-061-20/+22
| | | | | | | | | | | | | | | | | | | | | | As part of the conversion of error codes from vboot1 to vboot2, replace all instances of VbError_t with vb2_error_t. vboot2 currently uses the int type for return values, but we would like to implement the use of vb2_error_t instead, which is potentially clearer than simply using an int. Existing functions will be converted to use vb2_error_t in a subsequent CL. BUG=b:124141368, chromium:988410 TEST=make clean && make runtests BRANCH=none Change-Id: Iee90d9a1f46bcf5f088e981ba6ddbcf886ff0f18 Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1728112 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1722914 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org>
* lib/ec_sync_all: Reboot EC to RO after successful AUX FW updateKarthikeyan Ramasubramanian2019-06-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Currently some chips that require AUX FW update request EC reboot to RO after the FW update is applied successfully while some chips do not. It is safe to request EC reboot to RO whenever AUX FW update is applied successfully so that all the chips that require AUX FW update gets reset to a clean state. Update tests to handle the updated code flow and return code correctly. BUG=b:128820536,b:119046668 BRANCH=None TEST=Ensure that the device boots to ChromeOS. Force a TCPC FW update and ensure that after it is successfully applied EC reboots to RO. Cq-Depend: chromium:1625866 Change-Id: I72849620d90284e49cd1a9b31fc5eadede455c51 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/1627302 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: don't unset VB2_NV_DISPLAY_REQUEST in EC syncJoel Kitching2019-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | VB2_NV_DISPLAY_REQUEST disabling code has been relocated to VbBootNormal. Remove from EC sync code. Remove the vb2_shared_data argument from check_reboot_for_display. Avoid calling ec_sync_check_aux_fw after phase 1 if already certain that a reboot is required. BUG=b:124141368, chromium:948592, chromium:967298 TEST=make clean && make runtests BRANCH=none Change-Id: Ia5472aceb0b2a415f24dd76d26179632009d07cb Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1634453 Commit-Queue: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* tests/ec_sync_tests: Update the test to reflect new AUX FW protectionKarthikeyan Ramasubramanian2019-06-061-0/+5
| | | | | | | | | | | | | | | | | | All AUX FW remote bus tunnels are protected as part of VbootExEcVbootDone callback. So update the test to reflect that behavior. BUG=None BRANCH=None TEST=/mnt/host/source/chromite/bin/cros_run_unit_tests --board=octopus --packages=chromeos-base/vboot_reference Change-Id: I163518a57deb586fb12ea11ba74987ff1a4ad90b Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1641531 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* vboot: save GBB header in workbuf during firmware verificationJoel Kitching2019-05-281-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since GBB header will be needed for subsequent GBB reads later on (in kernel verification stage), and since GBB header is relatively small (128 bytes), save the full GBB header onto workbuf during firmware verification stage, and store an offset pointer to it in vb2_shared_data. vb2_gbb_header object may be accessed via the vb2_get_gbb function. Additionally, update functions in firmware/lib/region-init.c to read GBB data from flash, rather than using cparams passed in by depthcharge, which is slated for deprecation. BUG=b:124141368, chromium:954774 TEST=make clean && make runtests BRANCH=none Change-Id: I6e6218231299ce3a5b383663bc3480b20f929840 Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1585500 Reviewed-on: https://chromium-review.googlesource.com/1627430 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
* vboot: deprecate v1 GoogleBinaryBlockHeader structJoel Kitching2019-05-171-1/+0
| | | | | | | | | | | | | | | | | Deprecate internal usage of GoogleBinaryBlockHeader struct in favour of vb2_gbb_header struct. Keep the v1 struct around until we remove references in other repos. BUG=b:124141368, chromium:954774 TEST=make clean && make runtests BRANCH=none Change-Id: I396d2e624bd5dcac9c461cc86e8175e8f7692d26 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/1583826 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
* vboot: update display init to use vboot2 codeJoel Kitching2019-05-161-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per go/vboot2-oprom-cleanup, use vboot2 SD flag DISPLAY_AVAILABLE, instead of the old vboot1 flags OPROM_MATTERS and OPROM_LOADED. Remove instances of "OPROM" and update with correct nomenclature. Update code and tests for EC software sync and diagnostic menu to use vboot2 display init model. OPROM_MATTERS and OPROM_LOADED are now deprecated, and will be removed when no references remain in depthcharge and coreboot. Deprecate VBERROR_DISPLAY_INIT_MISMATCH (previously OPROM_MISMATCH) and return VBERROR_REBOOT_REQUIRED directly when needed. BUG=b:124141368, b:124192753, chromium:948529 TEST=Build image for eve, force EC update, check that the "critical update" screen shows TEST=make clean && make runtests BRANCH=none Change-Id: I889872f886230f8559d5cce09d0de194da3fcc38 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/1605641 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* Makefile: Enable more warnings for host utilities / testsJulius Werner2019-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a bunch of more warnings that are already enabled in coreboot and thus already enabled for firmware builds anyway (because coreboot just passes its CFLAGS through). Enabling it in the vboot Makefile means they also apply to host utilities and tests, which sounds desirable for consistency. Fix enough of the cruft and bad coding practices that accumulated over the years of not having warnings enabled to get it to build again (this includes making functions static, removing dead code, cleaning up prototypes, etc.). Also remove -fno-strict-aliasing from the x86 firmware build options, because it's not clear why it's there (coreboot isn't doing this, so presumably it's not needed). BRANCH=None BUG=None TEST=make runtests Change-Id: Ie4a42083c4770a4eca133b22725be9ba85b24184 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1598721 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
* vboot: Add ui for setting vendor data in VPDfirmware-atlas-11827.12.BMathew King2019-02-221-1/+2
| | | | | | | | | | | | | | | BUG=b:124297157 TEST=make runtest test on device BRANCH=none CQ-DEPEND=CL:1466822 Change-Id: Ic3b1b502b1aff14a795397da3024f8a12eb04775 Reviewed-on: https://chromium-review.googlesource.com/1466290 Commit-Ready: Mathew King <mathewk@chromium.org> Tested-by: Mathew King <mathewk@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
* test/ec_sync_test: Add mock test for VB_AUX_FW_NO_DEVICE severityKarthikeyan Ramasubramanian2018-11-271-2/+13
| | | | | | | | | | | | | | | | | Add a mock test to handle VB_AUX_FW_NO_DEVICE severity BUG=chromium:896451 BRANCH=None TEST=/mnt/host/source/chromite/bin/cros_run_unit_tests --board=octopus --packages=chromeos-base/vboot_reference Change-Id: Ifdabdf3cee1130a8c853d57c278f0e557ebbb96f Signed-off-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1299994 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* ec_sync: Go to recovery on aux fw update failureDuncan Laurie2018-03-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | If an aux firmware update fails enter recovery with a specific reason code so we can identify systems that fail. Also handle the case where the update succeeds and requests a cold reset of the EC, first clearing the oprom flag if necessary in order to prevent a second reset. Unit test was added to check recovery reason for aux firmware update failure. BUG=b:74336712 BRANCH=eve TEST=manual: force update to fail and ensure it goes to recovery mode, and after successful update check that the option rom flag is cleared before the EC reset happens. Unit tests udpated and 'make runtests' passes. Change-Id: I35a93892a0f8bb16eac0925ada5dfbc5c3144f8d Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/959671 Reviewed-by: Caveh Jalali <caveh@google.com> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* firmware: Remove deprecated SW_WP_ENABLED flagRandall Spangler2018-03-041-12/+0
| | | | | | | | | | | | | | | | This was deprecated months ago in crossystem, and isn't set by depthcharge or coreboot. Remove the flag from vboot as well, keeping only a reminder in vboot_struct.h so we don't reuse the VbSharedData bit. BUG=chromium:742685 BRANCH=none TEST=make runtests Change-Id: Ifa928e8ec4d999c524c6f4168695859261f384c9 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/947256 Reviewed-by: Julius Werner <jwerner@chromium.org>
* firmware: Stop using vboot1 cparams internallyRandall Spangler2018-01-091-5/+0
| | | | | | | | | | | | | | | | | | Now that vb2_shared_data / vb2_context provides all the same data to lower-level kernel verification code that cparams did, stop passing cparams down to those functions. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: I86eb1801ee96d8b56404b74843a8d09e3122567f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/852814 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
* firmware: Prune down old region APIRandall Spangler2018-01-091-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | The region API was a way for firmware and kernel verification to get at various blocks of caller-provided data. In practice, we only used it internally as a way to get at parts of the GBB. Prune it down to access only the bits of GBB we still need, from the buffer we already know we have. In the long run we should use the same vb2ex_read_resource() API that vb2 firmware verification does, but that should be done in a follow-up CL since it'll need to be coordinated with support in depthcharge. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: I5715cb8d88274164a1a73ed4a56bbd93af46f9bf Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/852798 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
* firmware: Include vb1 shared data in vb2 structRandall Spangler2018-01-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, firmware verification uses entirely vb2 structs, including vb2_shared_data. This goes through an ugly translation to the old vb1 VbSharedData to pass it to depthcharge. The vboot kernel verification maintains an equally ugly translation back to the vb2 struct internally. Eventually, we want to get rid of all that and use vb2 all the way down to what crossystem picks up from the OS. But before we can do that, we need to finish translating kernel verification code to use the new vb2 structs. This is a step on that path, using vb2_shared_data equivalents where present and hiding the old vb1 shared data struct as a member of vb2_shared_data so at least the vboot functions don't need to pass around cparams to get at it. This will be followed by more CLs which convert more vboot internals to use vb2 structs directly, and eventually coreboot/depthcharge CLs which pass the vb2 structs from firmware verification directly to kernel verification. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: I5df8ce81ba3c3ac3f2cb4229db5461757cd89d8d Reviewed-on: https://chromium-review.googlesource.com/852856 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
* firmware: Remove bmpblk codeRandall Spangler2018-01-091-2/+1
| | | | | | | | | | | | | | | | | | | | All screens are now drawn by depthcharge. ToT firmware does not include a bmpblk / bmpfv section in the GBB. Remove the code paths which are no longer used. Also drop a few cparams parameters from functions that no longer use it, now that those functions don't need to access the GBB. BUG=chromium:502066 BRANCH=none TEST=make -j runtests; build bob firmware and check recovery screens Change-Id: I4d2d0a3ba57c34151e65c6f42581df823192a4ae Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/852371 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
* ec_sync: Use vboot2 context instead of cparamsRandall Spangler2018-01-091-3/+3
| | | | | | | | | | | | | | | | | | | Copy sync-related flags from cparams / vboot1 shared data to the equivalent vboot2 structs. This removes the need for ec_sync to access the old structs, which are on their way out. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: I50ee76cf275a7fba894c2ec2c3dd83b9a8d91b53 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/852489 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
* firmware: use sd->gbb_flagsRandall Spangler2018-01-051-4/+4
| | | | | | | | | | | | | | | | | | Vboot1 code directly referenced the GBB from cparams even though now it has access to the GBB flags via the vb2 context. Refactor all existing code to use the vb2 context, since that takes us one step closer to getting rid of the old vboot1 cparams. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: Ic4a5bf215b723a2eacbf0a4cf0eba8b1338155a2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/847310 Reviewed-by: Shelley Chen <shchen@chromium.org>
* vboot: Use 2nvstorage instead of vboot_nvstorageRandall Spangler2017-12-111-10/+9
| | | | | | | | | | | | | | | | | | Remove the old vboot1 vboot_nvstorage library (VbNv*() functions) and use the vboot2 library (vb2_nv_*()) instead. This is needed in preparation for moving to 64-byte records; no sense in implementing that change twice... Should be (better be) no change in system behavior. BUG=chromium:789276 BRANCH=none TEST=make runtests compare output of crossystem before/after change (should be identical) Change-Id: I10f9975b0824263064b9a74a3c6daadcecc085d3 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/794732
* Call VbExEcRunningRW to set IN_RW flagDaisuke Nojiri2017-10-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | CL:693008 changed check_ac_active so that we ask CR50 to verify EC is in RO. While this is the right decision, on some platforms ECs can't reset EC_IN_RW. This causes check_ec_active to set IN_RW wrongly when EC is in RO after reboot. This patch replaces VbExTrustEC with VbExEcRunningRW. If RW is owned it may say it's in RO. Then, the software sync will proceed and flash RW while the EC is running RW copy. It also removes redundant checks for VbExTrustEC() when deciding whether to allow developer mode to be enabled from the INSERT screen. The INSERT screen can only be reached by manual recovery, which resets the EC, we don't need to check again before going to TODEV. BUG=b:67976359 BRANCH=none TEST=make runtests Change-Id: Ide722146ca8683411dd9072a39387aa9531f6cfc Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/740878
* Check EC_IN_RW before proceeding to recovery modeDaisuke Nojiri2017-10-051-30/+1
| | | | | | | | | | | | | | | | | | | | | | Depthcharge currently asks EC whether recovery was requested manually or not without verifying EC is in RO or not. If EC-RW is compromised, recovery switch state can be spoofed. This patch makes Depthcharge check EC_IN_RW to determine whether EC is in RO or not. Only if it's in RO and it says recovery button was pressed at boot, we proceed to the recovery process. All other recovery requests including manual recovery requested by a (compromised) host will end up with 'broken' screen. BUG=b:66516882 BRANCH=none TEST=Boot Fizz. make runtests. Change-Id: I01d2df05fe22e79bbc949f5cb83db605147667b3 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/693008 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* ec_sync: always call VbExUpdateAuxFwCaveh Jalali2017-08-211-7/+18
| | | | | | | | | | | | | | | | | | | | | | call VbExUpdateAuxFw() uncontidionally, instead of when we know we need to do an update. Vb*AuxFw() already maintains state, so this doesn't change when we (attempt) to update firmware. however, this does allow us to iterate over all firmware drivers to call their .protect() method. previously, we would only call .protect() after an actual firmware update. updated unit tests to match the new logic. BRANCH=none BUG=b:35585700 TEST=verified i2c tunnels are protected on reef using ectool i2cprotect N status. Change-Id: I9244db28ed181f568d117092307293202257735b Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://chromium-review.googlesource.com/620281 Reviewed-by: Julius Werner <jwerner@chromium.org>
* call depthcharge hooks for auxiliary FW update.Caveh Jalali2017-06-281-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this adds calls to depthcharge (using callbacks) to do auxiliary firmware updates. in particular, this is intended to trigger TCPC updates, but other programmables could also be updated. no firmware updates take place until a board file has actually registered a firmware update "driver". board file updates to follow. TEST="COV=1 make" passes. depthcharge boots on snappy. with additional follow-on CLs, we can update the ps8751. the companion depthcharge changes are here: https://chromium-review.googlesource.com/c/498150/ the working design doc is here: https://docs.google.com/a/google.com/document/d/1uzS0b3O3Us1QI2Sx7LDkjEfHmuhYB2BolrAoNwCVoc0/edit?usp=sharing these features depend on vboot API updates: CQ-DEPEND=CL:498150 BUG=b:35586896 BRANCH=none Change-Id: If0d634eab08b429a8e7e80f5fe11eab3705bba0f Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://chromium-review.googlesource.com/505260 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
* firmware: Refactor and clean up ec_syncChromeOS Developer2017-01-121-34/+9
| | | | | | | | | | | | | | | | | | | | Previously, the EC software sync process called VbDisplayScreen() from several function calls deep. Refactor software sync so that the UI decisions are at a higher level (in ec_sync_all.c) and isolated from the low-level EC software sync functionality (in ec_sync.c). This is one in a series of changes which are more clearly separating out the UI, to make it easier to support multiple UI across a range of devices. BUG=chromium:611535 BRANCH=none TEST=make runtests; build_packages --board=reef chromeos-firmware; boot reef Change-Id: I40597abeb5b0cc8f5d8fc2098e4acbed4bf59bf6 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/411921 Reviewed-by: Shelley Chen <shchen@chromium.org>
* vboot: Pass vb2 context and use vboot2 NV routinesRandall Spangler2016-12-221-15/+21
| | | | | | | | | | | | | | | Passing the vb2 context around allows using more of the vb2 functions in future changes, and prepares for a future where we directly use the context as it was set up in firmware verification. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I8efa606dbdec5d195b66eb899e76fdc84337ad36 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404997 Reviewed-by: Shelley Chen <shchen@chromium.org>
* vboot: Split ec software sync to its own fileRandall Spangler2016-12-201-0/+427
This was previously done inside vboot_api_kernel. But it has nothing to do with kernel verification; that's just the only place where we could easily put it given that vboot (currently) owns the firmware UI. No outwardly-visible functionality changes. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I8a434eb4449a5a86b129ecac61ad81d0ad55549c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404920