build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/25082 )
Change subject: drivers/spi: Read Winbond's flash protection bits
......................................................................
Patch Set 10:
(2 comments)
https://review.coreboot.org/#/c/25082/10/src/drivers/spi/winbond.c
File src/drivers/spi/winbond.c:
https://review.coreboot.org/#/c/25082/10/src/drivers/spi/winbond.c@79
PS10, Line 79: u8 : 6;
space prohibited before that ':' (ctx:WxW)
https://review.coreboot.org/#/c/25082/10/src/drivers/spi/winbond.c@81
PS10, Line 81: u8 : 1;
space prohibited before that ':' (ctx:WxW)
--
To view, visit https://review.coreboot.org/25082
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I933a8abdc28174ec32acf323c102d606b58c1ea5
Gerrit-Change-Number: 25082
Gerrit-PatchSet: 10
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Tue, 31 Jul 2018 14:16:10 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Patrick Rudolph has uploaded a new patch set (#2). ( https://review.coreboot.org/27751 )
Change subject: drivers/spi: Add support for flash protections
......................................................................
drivers/spi: Add support for flash protections
If the SPI controller doesn't have protected regions, try to directly
lock the flash. Requires vendor specific code (Winbond ATM).
Tested on Cavium EVB CN81xx using W25Q128.
Change-Id: I03eac2fc1c3ac6cd15125b1042e31c507ea94e65
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/drivers/spi/spi_flash.c
M src/include/spi_flash.h
2 files changed, 29 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/27751/2
--
To view, visit https://review.coreboot.org/27751
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I03eac2fc1c3ac6cd15125b1042e31c507ea94e65
Gerrit-Change-Number: 27751
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/25082 )
Change subject: drivers/spi: Read Winbond's flash protection bits
......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/#/c/25082/9/src/drivers/spi/winbond.c
File src/drivers/spi/winbond.c:
https://review.coreboot.org/#/c/25082/9/src/drivers/spi/winbond.c@79
PS9, Line 79: u8 : 6;
space prohibited before that ':' (ctx:WxW)
https://review.coreboot.org/#/c/25082/9/src/drivers/spi/winbond.c@81
PS9, Line 81: u8 : 1;
space prohibited before that ':' (ctx:WxW)
--
To view, visit https://review.coreboot.org/25082
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I933a8abdc28174ec32acf323c102d606b58c1ea5
Gerrit-Change-Number: 25082
Gerrit-PatchSet: 9
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Tue, 31 Jul 2018 14:08:51 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27751
Change subject: drivers/spi/spi_flash: Add support for flash protections
......................................................................
drivers/spi/spi_flash: Add support for flash protections
If the SPI controller doesn't have protected regions, try to directly
lock the flash. Requires vendor specific code (Winbond ATM).
Tested on Cavium EVB CN81xx using W25Q128.
Change-Id: I03eac2fc1c3ac6cd15125b1042e31c507ea94e65
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/drivers/spi/spi_flash.c
M src/include/spi_flash.h
2 files changed, 29 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/27751/1
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index a9bc23a..4656df6 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -543,6 +543,7 @@
const struct region *region)
{
const struct spi_ctrlr *ctrlr;
+ const struct spi_flash_ops *ops;
struct region flash_region = { 0 };
if (!flash)
@@ -554,13 +555,20 @@
return -1;
ctrlr = flash->spi.ctrlr;
+ ops = flash->ops;
- if (!ctrlr)
- return -1;
-
- if (ctrlr->flash_protect)
+ /* Lock access in the controller using "Protected Regions" */
+ if (ctrlr && ctrlr->flash_protect)
return ctrlr->flash_protect(flash, region);
+ /* Try to directly lock the region in flash */
+ if (ops && ops->get_write_protection)
+ if (ops->get_write_protection(flash, region))
+ return 0;
+
+ if (ops && ops->set_write_protection)
+ return ops->set_write_protection(flash, region);
+
return -1;
}
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index 9ba0c82..e3aad9f 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -159,8 +159,23 @@
* if CONFIG_BOOT_DEVICE_SPI_FLASH is enabled. */
const struct spi_flash *boot_device_spi_flash(void);
-/* Protect a region of spi flash using its controller, if available. Returns
- * < 0 on error, else 0 on success. */
+/*
+ * Protect a region of SPI flash.
+ * It first tries to use its controller, if available.
+ * If the controller doesn't support flash protections, try to directly lock
+ * the region in the flash device (requires flash vendor specific support).
+ *
+ * @param flash The flash device to operate on
+ * @param region The region to lock
+ * @Return < 0 on error, else 0 on success.
+ *
+ * Possible errors:
+ * * Invalid region specified
+ * * No more free "Protected Region" slots in the controller
+ * * SPI flash is already locked
+ * * Requested region layout can't be directly applied on flash
+ * * SPI bus error
+ */
int spi_flash_ctrlr_protect_region(const struct spi_flash *flash,
const struct region *region);
--
To view, visit https://review.coreboot.org/27751
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03eac2fc1c3ac6cd15125b1042e31c507ea94e65
Gerrit-Change-Number: 27751
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Hello Patrick Rudolph, Arthur Heymans, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/27750
to look at the new patch set (#2).
Change subject: sandybridge/raminit_common: use macro for execute command queue register
......................................................................
sandybridge/raminit_common: use macro for execute command queue register
This patch doesn't change the hash of a timeless build.
Change-Id: I5d329f65be0eee741fd330c0926881ff4f956624
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
M src/northbridge/intel/sandybridge/raminit_common.c
1 file changed, 79 insertions(+), 34 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/27750/2
--
To view, visit https://review.coreboot.org/27750
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5d329f65be0eee741fd330c0926881ff4f956624
Gerrit-Change-Number: 27750
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/27656 )
Change subject: Documentation: Add util.md summary
......................................................................
Documentation: Add util.md summary
Add short explanation of Utility list
Change-Id: I5fc45ebe29cd42c1aa18c59dabc3ac3db3107bd7
Signed-off-by: Tom Hiller <thrilleratplay(a)gmail.com>
Reviewed-on: https://review.coreboot.org/27656
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro(a)das-labor.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
---
M Documentation/util.md
M util/util_readme/util_readme.sh
2 files changed, 3 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Paul Menzel: Looks good to me, but someone else must approve
Philipp Deppenwiese: Looks good to me, approved
Patrick Rudolph: Looks good to me, but someone else must approve
diff --git a/Documentation/util.md b/Documentation/util.md
index 9adb908..be7cc99 100644
--- a/Documentation/util.md
+++ b/Documentation/util.md
@@ -1,4 +1,5 @@
# Utilities
+_Scripts and programs found in the `./util` directory_
* __abuild__ - coreboot autobuild script builds coreboot images for all
available targets. `bash`
* __acpi__ - Walk through all ACPI tables with their addresses. `bash`
diff --git a/util/util_readme/util_readme.sh b/util/util_readme/util_readme.sh
index 2516614..420ffae 100755
--- a/util/util_readme/util_readme.sh
+++ b/util/util_readme/util_readme.sh
@@ -10,11 +10,13 @@
UTIL_DIR=$(dirname "$UTIL_README_DIR")
COREBOOT_ROOT_DIR=$(dirname "$UTIL_DIR")
DOCMENTATION_DIR="$COREBOOT_ROOT_DIR/Documentation"
+SUMMARY="_Scripts and programs found in the \`./util\` directory_"
DESCRIPTION_FILES=$(find "$UTIL_DIR" -name "description.md" | sort)
echo -n "" > "$UTIL_DIR/README.md"
echo "# Utilities" > "$DOCMENTATION_DIR/util.md"
+echo "$SUMMARY" >> "$DOCMENTATION_DIR/util.md"
for DESC_FILE in $DESCRIPTION_FILES; do
UTIL_NAME=$(echo "$DESC_FILE" | rev | cut -d '/' -f2 | rev)
--
To view, visit https://review.coreboot.org/27656
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5fc45ebe29cd42c1aa18c59dabc3ac3db3107bd7
Gerrit-Change-Number: 27656
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Hiller <thrilleratplay(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>