Vic Yang | 38d4885 | 2012-08-28 10:40:02 +0800 | [diff] [blame^] | 1 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | AUTHOR = "Chrome OS Team" |
| 6 | NAME = "firmware_ECWriteProtect" |
| 7 | PURPOSE = "Servo based EC write protect test" |
| 8 | CRITERIA = "This test will fail if EC write protect misbehaved" |
| 9 | TIME = "LONG" |
| 10 | TEST_CATEGORY = "Functional" |
| 11 | TEST_CLASS = "firmware" |
| 12 | TEST_TYPE = "server" |
| 13 | |
| 14 | DOC = """ |
| 15 | This test starts with RO normal mode and enables EC write protect. Software sync |
| 16 | supposed to write protect the entire EC flash, so we expect the following |
| 17 | write protect flags: |
| 18 | - wp_gpio_asserted |
| 19 | - ro_at_boot |
| 20 | - ro_now |
| 21 | - all_now |
| 22 | These flags are checked under following situations: |
| 23 | - Cold reset. RO normal. |
| 24 | - Cold reset. Two stop. |
| 25 | - Cold reset by ectool. Two stop. |
| 26 | At the end of the test, write protect is deactivated and firmware is restored to |
| 27 | RO normal mode. |
| 28 | """ |
| 29 | |
| 30 | def run_ecwriteprotect(machine): |
| 31 | host = hosts.create_host(machine) |
| 32 | job.run_test("firmware_ECWriteProtect", host=host, cmdline_args=args, |
| 33 | use_faft=True, disable_sysinfo=True, |
| 34 | dev_mode=True, tag="dev") |
| 35 | |
| 36 | parallel_simple(run_ecwriteprotect, machines) |