New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657835 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Need an unified way to enable PD WP in finalization

Project Member Reported by hungte@chromium.org, Oct 20 2016

Issue description

Unlike AP and EC, currently PD does not have an unified way to enable write protection in factory finalization.

For project "Samus", we've tried to execute some special tests:
      # The STM32F07 PD chip on Samus requires a reboot to actually turn on the
      # write-protect. The '--wp-range' argument in flashrom is not required for
      # ChromeOS-EC.
      OperatorTest(
          id='EnablePDWriteProtect',
          label_zh='開啟 PD 寫入保護',
          pytest_name='line_check_item',
          dargs={'title_en': 'PD Write-protect',
                 'title_zh': u'PD 寫入保護',
                 'items': [
                     ('Enabling PD write-protect', u'正在啟動 PD 寫入保護',
                      'flashrom -p ec:type=pd --wp-enable || true', False),
                     ('Rebooting PD', u'重起 PD',
                      'ectool --interface=dev --dev=1 reboot_ec || true',
                      False),
                 ]})

The problem is other project may be not aware of such test list customization for forgot (or not aware of) to add such step into their finalization process.

A more reliable way is to always do WP in the gooftool, a standalone finalization process, that partners are NOT expected to change / modify, so every partners will implicitly get updated without touching test list.

As a result, we need to know what we should do to write a common procedure to enable PD WP on all platforms.
 

Comment 1 by hungte@chromium.org, Oct 20 2016

Cc: sha...@chromium.org dlaurie@chromium.org
Owner: ----
+shawnn

I think we need a complete guide for
 - How to detect if we need to enable PD WP on this platform
 - How to enable WP if the detection says yes
 - How to verify if WP (especially range) is properly set
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 21 2016

Labels: merge-merged-factory-glados-7828.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/f1382ddaf9c291584e4afe5a6fd3329ab42664d6

commit f1382ddaf9c291584e4afe5a6fd3329ab42664d6
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Oct 20 14:22:31 2016

gooftool: Support checking PD write protection.

PD write protection should be checked and verified in Gooftool.

This is the first step of adding EC-style checks. Some PD may need extra
reboot (so we may need to check RO_AT_REBOOT) and some PD may not
support WP function at all. We may need to revise the process in future,
but now let's first commit something so we won't forget checking PD.

BUG= chromium:657835 
TEST=Dry test (gooftool write_protect), and
     verified on a Chell with all WP enabled.

Previous-Reviewed-on: https://chromium-review.googlesource.com/#/c/401263/
Change-Id: I166abb2f230c9197a88708ff884e385291a5e671
Reviewed-on: https://chromium-review.googlesource.com/401301
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Trybot-Ready: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/f1382ddaf9c291584e4afe5a6fd3329ab42664d6/py/gooftool/crosfw.py
[modify] https://crrev.com/f1382ddaf9c291584e4afe5a6fd3329ab42664d6/py/gooftool/gooftool.py

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d3b124c3f8189f94a888f646f6a32e59a9131a20

commit d3b124c3f8189f94a888f646f6a32e59a9131a20
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Oct 20 14:22:31 2016

gooftool: Support checking PD write protection.

PD write protection should be checked and verified in Gooftool.

This is the first step of adding EC-style checks. Some PD may need extra
reboot (so we may need to check RO_AT_REBOOT) and some PD may not
support WP function at all. We may need to revise the process in future,
but now let's first commit something so we won't forget checking PD.

BUG= chromium:657835 
TEST=Dry test (gooftool write_protect), and
     verified on a Chell with all WP enabled.

Change-Id: I166abb2f230c9197a88708ff884e385291a5e671
Reviewed-on: https://chromium-review.googlesource.com/401263
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/d3b124c3f8189f94a888f646f6a32e59a9131a20/py/gooftool/crosfw.py
[modify] https://crrev.com/d3b124c3f8189f94a888f646f6a32e59a9131a20/py/gooftool/commands.py

Comment 4 by hungte@chromium.org, Jan 25 2017

Owner: hungte@chromium.org
Status: Fixed (was: Untriaged)
Turns out we only need this for glados.

Newer platforms can't enable PD WP so we're probably fine here.

Comment 5 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 6 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 7 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 8 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment