| # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| AUTHOR = "Chrome OS Team" |
| NAME = "firmware_UpdateECBin" |
| PURPOSE = "Servo based software sync EC update test" |
| CRITERIA = "This test will fail if software sync failed on EC update" |
| SUITE = "faft" |
| TIME = "LONG" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "firmware" |
| TEST_TYPE = "server" |
| |
| DOC = """ |
| This test verified the EC software sync. The EC binary is embedded in |
| the BIOS image. On AP startup, AP verifies the EC by comparing the |
| hash of the current EC with the hash of the embedded EC image. So |
| updating EC is simple and we just need to change the EC binary on |
| the BIOS image. |
| |
| The test steps are: |
| 1. check EC is RO boot and AP is RO boot, |
| extract the original EC binary on current AP RW A and save it locally, |
| copy the new_ec binary to the EC area on the current AP RW A, |
| disable RO_BOOT preamble flag, |
| reboot; |
| 2. check EC is RW boot and AP is RW A boot, |
| compare the current EC with the new_ec binary, |
| copy the original EC binary to the EC area on the current AP RW A, |
| reboot; |
| 3. check EC is RW boot and AP is RW A boot, |
| compare the current EC with the original EC binary, |
| enable RO_BOOT preamble flag, |
| reboot; |
| 4. check EC is RO boot and AP is RW A boot. |
| |
| So RONORMAL->TWOSTOP, TWOSTOP->TWOSTOP, and TWOSTOP->RONORMAL are covered. |
| """ |
| |
| def run_updateec(machine): |
| host = hosts.create_host(machine) |
| job.run_test("firmware_UpdateECBin", host=host, cmdline_args=args, |
| use_faft=True, disable_sysinfo=True, |
| dev_mode=False, tag="normal") |
| |
| parallel_simple(run_updateec, machines) |