<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/coreboot/vboot.git/host, branch stabilize-15317.B</title>
<subtitle>review.coreboot.org: vboot.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/'/>
<entry>
<title>futility/flashrom_drv: Add new skip perm flags</title>
<updated>2023-01-06T23:27:51+00:00</updated>
<author>
<name>Edward O'Callaghan</name>
<email>quasisec@google.com</email>
</author>
<published>2023-01-03T02:15:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=16791bfe0f16f02d8be50c429e56fe46bfedda8e'/>
<id>16791bfe0f16f02d8be50c429e56fe46bfedda8e</id>
<content type='text'>
flashrom now respects region permissions rather than ignoring
exit codes. While downstreaming this support we require these
flags to be set to ensure no change in behavior for futility.

BUG=b:260440773
BRANCH=none
TEST=builds

Signed-off-by: Edward O'Callaghan &lt;quasisec@google.com&gt;
Change-Id: Id54164385d24b3a9f2bf1da8490baf05c4728cf3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4127324
Commit-Queue: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
Tested-by: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
Auto-Submit: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
flashrom now respects region permissions rather than ignoring
exit codes. While downstreaming this support we require these
flags to be set to ensure no change in behavior for futility.

BUG=b:260440773
BRANCH=none
TEST=builds

Signed-off-by: Edward O'Callaghan &lt;quasisec@google.com&gt;
Change-Id: Id54164385d24b3a9f2bf1da8490baf05c4728cf3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4127324
Commit-Queue: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
Tested-by: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
Auto-Submit: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crossystem: Print an error log if we fall back to WPSW_BOOT</title>
<updated>2022-12-15T03:53:19+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2022-12-14T00:02:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=167d3873450dcd5d735a07d647462829f16b2061'/>
<id>167d3873450dcd5d735a07d647462829f16b2061</id>
<content type='text'>
On new systems, WPSW_BOOT is potentially bogus. The BIOS doesn't set
it so it always reports that the device is _not_ write protected.

Let's print an error log so we have an idea if we ever fall back.

BRANCH=None
BUG=b:249498455, b:254337014
TEST=Force a failure and see the log

Change-Id: Ie741ca9f9f938382ea7e56cfd81bd273dd9bb548
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Disallow-Recycled-Builds: test-failures
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4104708
Reviewed-by: Hung-Te Lin &lt;hungte@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On new systems, WPSW_BOOT is potentially bogus. The BIOS doesn't set
it so it always reports that the device is _not_ write protected.

Let's print an error log so we have an idea if we ever fall back.

BRANCH=None
BUG=b:249498455, b:254337014
TEST=Force a failure and see the log

Change-Id: Ie741ca9f9f938382ea7e56cfd81bd273dd9bb548
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Disallow-Recycled-Builds: test-failures
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4104708
Reviewed-by: Hung-Te Lin &lt;hungte@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "crossystem: Add board_id property"</title>
<updated>2022-11-23T09:30:27+00:00</updated>
<author>
<name>Jack Rosenthal</name>
<email>jrosenth@chromium.org</email>
</author>
<published>2022-11-22T00:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=5bbd123cac5650dba0db6cc3c40c7cf33bfd7efc'/>
<id>5bbd123cac5650dba0db6cc3c40c7cf33bfd7efc</id>
<content type='text'>
This reverts commit 87663c3bef0f6b198945cf3eb83632f461a5d6f8.

The parent CL to this commit should be sufficient to resolve the
failure that prevented "crossystem board_id" on ARM from working.

Original change's description:
&gt; crossystem: Add board_id property
&gt;
&gt; futility is one of a few places in ChromeOS that uses "mosys platform
&gt; version".  The goal is to remove this command from mosys.
&gt;
&gt; This commit adds a new property to crossystem, "board_id", which
&gt; reads the board revision from SMBIOS/FDT, and replaces the call in
&gt; futility with the appropriate VbGetSystemPropertyInt.
&gt;
&gt; BUG=b:187790074
&gt; BRANCH=none
&gt; TEST="crossystem board_id" on hana and brya
&gt;
&gt; Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
&gt; Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
&gt; Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
&gt; Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;

BUG=b:187790074
BRANCH=none
TEST="crossystem board_id" on hana and brya

Change-Id: I37b4c622e3c1d294b5be8e0d98ef14175902acc3
Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045047
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 87663c3bef0f6b198945cf3eb83632f461a5d6f8.

The parent CL to this commit should be sufficient to resolve the
failure that prevented "crossystem board_id" on ARM from working.

Original change's description:
&gt; crossystem: Add board_id property
&gt;
&gt; futility is one of a few places in ChromeOS that uses "mosys platform
&gt; version".  The goal is to remove this command from mosys.
&gt;
&gt; This commit adds a new property to crossystem, "board_id", which
&gt; reads the board revision from SMBIOS/FDT, and replaces the call in
&gt; futility with the appropriate VbGetSystemPropertyInt.
&gt;
&gt; BUG=b:187790074
&gt; BRANCH=none
&gt; TEST="crossystem board_id" on hana and brya
&gt;
&gt; Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
&gt; Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
&gt; Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
&gt; Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;

BUG=b:187790074
BRANCH=none
TEST="crossystem board_id" on hana and brya

Change-Id: I37b4c622e3c1d294b5be8e0d98ef14175902acc3
Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045047
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crossystem: arm: Make FDT_BASE_PATH /proc/device-tree</title>
<updated>2022-11-23T09:30:25+00:00</updated>
<author>
<name>Jack Rosenthal</name>
<email>jrosenth@chromium.org</email>
</author>
<published>2022-11-22T00:36:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=edcc75666d8fab2e1be895ac87af87ee74ec0079'/>
<id>edcc75666d8fab2e1be895ac87af87ee74ec0079</id>
<content type='text'>
Hard-coding to /proc/device-tree/firmware/chromeos won't let us read
device-tree properties outside of /firmware/chromeos.

The follow-on CL reads from /firmware/coreboot.

BUG=b:187790074
BRANCH=none
TEST=CQ passes

Change-Id: I752aa5a1e20db1dad7f2508852c7a1c982a4bcb4
Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045046
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hard-coding to /proc/device-tree/firmware/chromeos won't let us read
device-tree properties outside of /firmware/chromeos.

The follow-on CL reads from /firmware/coreboot.

BUG=b:187790074
BRANCH=none
TEST=CQ passes

Change-Id: I752aa5a1e20db1dad7f2508852c7a1c982a4bcb4
Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045046
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "crossystem: Add board_id property"</title>
<updated>2022-11-19T04:37:50+00:00</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2022-11-18T18:36:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=87663c3bef0f6b198945cf3eb83632f461a5d6f8'/>
<id>87663c3bef0f6b198945cf3eb83632f461a5d6f8</id>
<content type='text'>
This reverts commit db1b34f559fdbf5584b57007da43e4dddda43c6a.

Reason for revert: seems to break scarlet - b/259702907

Original change's description:
&gt; crossystem: Add board_id property
&gt;
&gt; futility is one of a few places in ChromeOS that uses "mosys platform
&gt; version".  The goal is to remove this command from mosys.
&gt;
&gt; This commit adds a new property to crossystem, "board_id", which
&gt; reads the board revision from SMBIOS/FDT, and replaces the call in
&gt; futility with the appropriate VbGetSystemPropertyInt.
&gt;
&gt; BUG=b:187790074
&gt; BRANCH=none
&gt; TEST="crossystem board_id" on hana and brya
&gt;
&gt; Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
&gt; Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
&gt; Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
&gt; Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;

Bug: b:187790074, b:259702907
Change-Id: Ibdc2525d6f395e2ef63354d36ca02b71543e8079
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4038443
Commit-Queue: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Tested-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Commit-Queue: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Owners-Override: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit db1b34f559fdbf5584b57007da43e4dddda43c6a.

Reason for revert: seems to break scarlet - b/259702907

Original change's description:
&gt; crossystem: Add board_id property
&gt;
&gt; futility is one of a few places in ChromeOS that uses "mosys platform
&gt; version".  The goal is to remove this command from mosys.
&gt;
&gt; This commit adds a new property to crossystem, "board_id", which
&gt; reads the board revision from SMBIOS/FDT, and replaces the call in
&gt; futility with the appropriate VbGetSystemPropertyInt.
&gt;
&gt; BUG=b:187790074
&gt; BRANCH=none
&gt; TEST="crossystem board_id" on hana and brya
&gt;
&gt; Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
&gt; Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
&gt; Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
&gt; Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;

Bug: b:187790074, b:259702907
Change-Id: Ibdc2525d6f395e2ef63354d36ca02b71543e8079
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4038443
Commit-Queue: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Tested-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Commit-Queue: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Owners-Override: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>host/lib/cbfstool: Fix cbfs verification validity check</title>
<updated>2022-11-17T19:39:21+00:00</updated>
<author>
<name>Jakub Czapiga</name>
<email>czapiga@google.com</email>
</author>
<published>2022-11-16T18:24:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=0d5f3ca53047313b96aa620a14f8401a2392a220'/>
<id>0d5f3ca53047313b96aa620a14f8401a2392a220</id>
<content type='text'>
cbfstool uses tab instead of space, and because of that current
code does not work correctly with metadata hash images. Changing
space to tab in pattern fixes the issue.

BRANCH=none
BUG=b:259153966,b:197114807
TEST=build bootimage for volteer/voxel

Signed-off-by: Jakub Czapiga &lt;jacz@semihalf.com&gt;
Change-Id: Iab6ab56927a6bea9275eda4a5bad1ad73b779a69
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4030402
Commit-Queue: Jakub Czapiga &lt;czapiga@google.com&gt;
Tested-by: Jakub Czapiga &lt;czapiga@google.com&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cbfstool uses tab instead of space, and because of that current
code does not work correctly with metadata hash images. Changing
space to tab in pattern fixes the issue.

BRANCH=none
BUG=b:259153966,b:197114807
TEST=build bootimage for volteer/voxel

Signed-off-by: Jakub Czapiga &lt;jacz@semihalf.com&gt;
Change-Id: Iab6ab56927a6bea9275eda4a5bad1ad73b779a69
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4030402
Commit-Queue: Jakub Czapiga &lt;czapiga@google.com&gt;
Tested-by: Jakub Czapiga &lt;czapiga@google.com&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crossystem: Add board_id property</title>
<updated>2022-11-17T14:56:10+00:00</updated>
<author>
<name>Jack Rosenthal</name>
<email>jrosenth@chromium.org</email>
</author>
<published>2022-11-15T22:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=db1b34f559fdbf5584b57007da43e4dddda43c6a'/>
<id>db1b34f559fdbf5584b57007da43e4dddda43c6a</id>
<content type='text'>
futility is one of a few places in ChromeOS that uses "mosys platform
version".  The goal is to remove this command from mosys.

This commit adds a new property to crossystem, "board_id", which
reads the board revision from SMBIOS/FDT, and replaces the call in
futility with the appropriate VbGetSystemPropertyInt.

BUG=b:187790074
BRANCH=none
TEST="crossystem board_id" on hana and brya

Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
futility is one of a few places in ChromeOS that uses "mosys platform
version".  The goal is to remove this command from mosys.

This commit adds a new property to crossystem, "board_id", which
reads the board revision from SMBIOS/FDT, and replaces the call in
futility with the appropriate VbGetSystemPropertyInt.

BUG=b:187790074
BRANCH=none
TEST="crossystem board_id" on hana and brya

Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
Signed-off-by: Jack Rosenthal &lt;jrosenth@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>host/lib: Add flashrom_read_region() to read just the requested region</title>
<updated>2022-11-17T09:24:43+00:00</updated>
<author>
<name>Sam McNally</name>
<email>sammc@chromium.org</email>
</author>
<published>2022-10-18T09:31:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=57318f0ff4e47394e767d8752cd04a0eb7a89164'/>
<id>57318f0ff4e47394e767d8752cd04a0eb7a89164</id>
<content type='text'>
The region parameter to flashrom_read_image() is essentially unusable in
isolation since it reads just the requested region into a buffer sized
to the entire flash, at the offset of the region within the flash.

Remove its unused region parameter and split the functionality of
requesting a region into flashrom_read_region() which stores just the
requested region into a buffer sized to the region.

BUG=b:253966060
TEST=futility update --detect-model -a &lt;archive&gt; works as expected
BRANCH=None

Signed-off-by: Sam McNally &lt;sammc@chromium.org&gt;
Change-Id: Ibf6c152dd42fbc99c1742fb077bc6aa35feeed08
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3965583
Reviewed-by: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The region parameter to flashrom_read_image() is essentially unusable in
isolation since it reads just the requested region into a buffer sized
to the entire flash, at the offset of the region within the flash.

Remove its unused region parameter and split the functionality of
requesting a region into flashrom_read_region() which stores just the
requested region into a buffer sized to the region.

BUG=b:253966060
TEST=futility update --detect-model -a &lt;archive&gt; works as expected
BRANCH=None

Signed-off-by: Sam McNally &lt;sammc@chromium.org&gt;
Change-Id: Ibf6c152dd42fbc99c1742fb077bc6aa35feeed08
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3965583
Reviewed-by: Edward O'Callaghan &lt;quasisec@chromium.org&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crossystem: arm: Retry if we fail to read a GPIO</title>
<updated>2022-10-20T02:42:18+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2022-10-18T17:37:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=4ca43a34f5a936683ebcdc7b0edd059f313f61be'/>
<id>4ca43a34f5a936683ebcdc7b0edd059f313f61be</id>
<content type='text'>
It turns out that if two processes try to read the same GPIO at the
same time that one of them will fail because the GPIO is
"busy".

This is really by design of the kernel's GPIO API. In order to read a
value, each userspace process "requests" control of the GPIO and then
queries it. There doesn't appear to be any way to "wait" for a GPIO
that's been requested by someone else--we just need to wait a bit and
try again later. ...so that's what we'll do.

Without this patch, if you run the following script on a
write-protected sc7180-trogdor class device in two shells at the same
time:

  old_val=""
  while true; do
    val=$(crossystem wpsw_cur)
    if [[ "${val}" != "${old_val}" ]]; then
      echo "$(date): ${old_val} =&gt; ${val}"
      old_val="${val}"
    fi
  done

Then you'll see stuff like this:

  GPIO_GET_LINEHANDLE_IOCTL: Device or resource busy
  Tue Oct 18 11:34:01 PDT 2022: 1 =&gt; 0
  Tue Oct 18 11:34:01 PDT 2022: 0 =&gt; 1
  GPIO_GET_LINEHANDLE_IOCTL: Device or resource busy
  Tue Oct 18 11:34:01 PDT 2022: 1 =&gt; 0
  Tue Oct 18 11:34:01 PDT 2022: 0 =&gt; 1

The 0 actually comes from the fact that crossystem falls back to
`GetVdatInt(VDAT_INT_HW_WPSW_BOOT)` if it fails to read the GPIO and
that value isn't initted to anything on trogdor (VDAT_INT_HW_WPSW_BOOT
is deprecated and not populated on trogdor).

It is postulated that the above problem is causing some parts of the
system to get confused about the write protect state of devices.

BRANCH=none
BUG=b:249498455
TEST=Run script in CL commit message and see no errors

Change-Id: I307cdb4e290c27694690a19af60f4697ee0233e4
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3963985
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Commit-Queue: Julius Werner &lt;jwerner@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out that if two processes try to read the same GPIO at the
same time that one of them will fail because the GPIO is
"busy".

This is really by design of the kernel's GPIO API. In order to read a
value, each userspace process "requests" control of the GPIO and then
queries it. There doesn't appear to be any way to "wait" for a GPIO
that's been requested by someone else--we just need to wait a bit and
try again later. ...so that's what we'll do.

Without this patch, if you run the following script on a
write-protected sc7180-trogdor class device in two shells at the same
time:

  old_val=""
  while true; do
    val=$(crossystem wpsw_cur)
    if [[ "${val}" != "${old_val}" ]]; then
      echo "$(date): ${old_val} =&gt; ${val}"
      old_val="${val}"
    fi
  done

Then you'll see stuff like this:

  GPIO_GET_LINEHANDLE_IOCTL: Device or resource busy
  Tue Oct 18 11:34:01 PDT 2022: 1 =&gt; 0
  Tue Oct 18 11:34:01 PDT 2022: 0 =&gt; 1
  GPIO_GET_LINEHANDLE_IOCTL: Device or resource busy
  Tue Oct 18 11:34:01 PDT 2022: 1 =&gt; 0
  Tue Oct 18 11:34:01 PDT 2022: 0 =&gt; 1

The 0 actually comes from the fact that crossystem falls back to
`GetVdatInt(VDAT_INT_HW_WPSW_BOOT)` if it fails to read the GPIO and
that value isn't initted to anything on trogdor (VDAT_INT_HW_WPSW_BOOT
is deprecated and not populated on trogdor).

It is postulated that the above problem is causing some parts of the
system to get confused about the write protect state of devices.

BRANCH=none
BUG=b:249498455
TEST=Run script in CL commit message and see no errors

Change-Id: I307cdb4e290c27694690a19af60f4697ee0233e4
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3963985
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Commit-Queue: Julius Werner &lt;jwerner@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firmware: host: futility: Add CBFS metadata hash support</title>
<updated>2022-10-12T17:41:55+00:00</updated>
<author>
<name>Jakub Czapiga</name>
<email>jacz@semihalf.com</email>
</author>
<published>2022-08-04T15:13:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/vboot.git/commit/?id=0ca7a9e4dad2e9780690524ced9273fa07052179'/>
<id>0ca7a9e4dad2e9780690524ced9273fa07052179</id>
<content type='text'>
This patch adds support for signing and verification of coreboot images
supporting VBOOT_CBFS_INTEGRATION. Images with config option
CONFIG_VBOOT_CBFS_INTEGRATION=y will be signed with CBFS metadata hash
in signature. vb2api_get_metadata_hash() should be used to extract hash
value from VBLOCK and then should be used to verify CBFS metadata.
To support full verification, CBFS file data verification should also be
enabled and correctly handled.

BUG=b:197114807
TEST=build with CB:66909 and boot on volteer/voxel with
     CONFIG_VBOOT_CBFS_INTEGRATION=y
BRANCH=none

Signed-off-by: Jakub Czapiga &lt;czapiga@google.com&gt;
Change-Id: I4075c84820949be24c423ed14e291c89a0032863
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3811754
Commit-Queue: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for signing and verification of coreboot images
supporting VBOOT_CBFS_INTEGRATION. Images with config option
CONFIG_VBOOT_CBFS_INTEGRATION=y will be signed with CBFS metadata hash
in signature. vb2api_get_metadata_hash() should be used to extract hash
value from VBLOCK and then should be used to verify CBFS metadata.
To support full verification, CBFS file data verification should also be
enabled and correctly handled.

BUG=b:197114807
TEST=build with CB:66909 and boot on volteer/voxel with
     CONFIG_VBOOT_CBFS_INTEGRATION=y
BRANCH=none

Signed-off-by: Jakub Czapiga &lt;czapiga@google.com&gt;
Change-Id: I4075c84820949be24c423ed14e291c89a0032863
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3811754
Commit-Queue: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-by: Yu-Ping Wu &lt;yupingso@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
