David Hendricks has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/36986 )
Change subject: mysteries_intel: Add a section about SMM_BWP
......................................................................
mysteries_intel: Add a section about SMM_BWP
Something to point users to when SMM_BWP might be causing problems.
Change-Id: I394c033e8d4ff96433162f86aefb428d8acf6349
Signed-off-by: David Hendricks <david.hendricks(a)gmail.com>
---
M Documentation/mysteries_intel.txt
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/86/36986/1
diff --git a/Documentation/mysteries_intel.txt b/Documentation/mysteries_intel.txt
index 10cb37d..d6ceb6a 100644
--- a/Documentation/mysteries_intel.txt
+++ b/Documentation/mysteries_intel.txt
@@ -5,6 +5,25 @@
A0h), so we have no clue if or where it is on ICH8. Out current policy is to
not touch it at all and assume/hope it is 0.
+= SMM BIOS write protection =
+Sometimes a hardware vendor will enable "SMM BIOS Write Protect" (SMM_BWP).
+The bits that control this are in the BIOS_CNTL register in the LPC interface.
+
+When enabled, the SPI flash can only be written when the system is operating in
+in System Management Mode (SMM). In other words, only code that was installed by
+the BIOS can write to the flash chip. Reads are still possible with code that
+runs outside of SMM, such as flashrom.
+
+Flashrom will attempt to detect this and print a message such as the following:
+"Warning: BIOS region SMM protection is enabled!"
+
+Many vendor-supplied firmware update utilities do not actually write to the ROM;
+instead they transfer data to/from memory which is read/written by a routine
+running in SMM and is responsible for writing to the firmware ROM. This causes
+severe system performance degradataion since all processors must be in SMM
+context (ring -2) instead of OS context (ring 0) while the firmware ROM is being
+written.
+
= Accesses beyond region bounds in descriptor mode =
Intel's flash image tool will always expand the last region so that it covers
the whole flash chip, but some boards ship with a different configuration.
--
To view, visit https://review.coreboot.org/c/flashrom/+/36986
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I394c033e8d4ff96433162f86aefb428d8acf6349
Gerrit-Change-Number: 36986
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-MessageType: newchange
Hello Edward O'Callaghan, David Hendricks,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/flashrom/+/36909
to review the following change.
Change subject: Revert "print.c: Dedup 'test_state_to_text()' logic"
......................................................................
Revert "print.c: Dedup 'test_state_to_text()' logic"
This reverts commit 61e16e549a52194ac80ef40504f2dc661d1ff99c.
Obviously throws alignment in the table off and changes output
class from `general` to `programmer` for no visible reason.
Change-Id: I864044b9fac6af9cf6a89c053eccdcb36f17c7bd
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M print.c
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/09/36909/1
diff --git a/print.c b/print.c
index 596fc53..6a7ff5d 100644
--- a/print.c
+++ b/print.c
@@ -401,7 +401,14 @@
for (i = 0; i < maxboardlen - strlen(b->name); i++)
msg_ginfo(" ");
- msg_pinfo(test_state_to_text(b->working));
+ switch (b->working) {
+ case OK: msg_ginfo("OK "); break;
+ case NT: msg_ginfo("NT "); break;
+ case DEP: msg_ginfo("DEP "); break;
+ case NA: msg_ginfo("N/A "); break;
+ case BAD:
+ default: msg_ginfo("BAD "); break;
+ }
for (e = board_matches; e->vendor_name != NULL; e++) {
if (strcmp(e->vendor_name, b->vendor)
--
To view, visit https://review.coreboot.org/c/flashrom/+/36909
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I864044b9fac6af9cf6a89c053eccdcb36f17c7bd
Gerrit-Change-Number: 36909
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newchange
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/37372 )
Change subject: print.c: Fix pp str format alignment in print_supported_boards_helper()
......................................................................
print.c: Fix pp str format alignment in print_supported_boards_helper()
Fix a print format regression introduced in commit
61e16e549a52194ac80ef40504f2dc661d1ff99c.
Change-Id: Ic25512bc6f31e62dfc77e32a4c71519bdde01598
Signed-off-by: Edward O'Callaghan <quasisec(a)chromium.org>
---
M print.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/72/37372/1
diff --git a/print.c b/print.c
index 596fc53..aeb56cb 100644
--- a/print.c
+++ b/print.c
@@ -401,7 +401,7 @@
for (i = 0; i < maxboardlen - strlen(b->name); i++)
msg_ginfo(" ");
- msg_pinfo(test_state_to_text(b->working));
+ msg_pinfo("%s\t", test_state_to_text(b->working));
for (e = board_matches; e->vendor_name != NULL; e++) {
if (strcmp(e->vendor_name, b->vendor)
--
To view, visit https://review.coreboot.org/c/flashrom/+/37372
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic25512bc6f31e62dfc77e32a4c71519bdde01598
Gerrit-Change-Number: 37372
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/31017
Change subject: ifwi: Add definitions for the Integrated Firmware Image format
......................................................................
ifwi: Add definitions for the Integrated Firmware Image format
The Integrated Firmware Image (IFWI) is used as a partitioning format
on some Intel SoCs (e.g. Apollo Lake). It is not tied to NOR flashes,
rather to have a common format between different types of boot media.
Change-Id: I4bdf47637bfb68560e6d4269f89710572c1bb82a
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
A ifwi.h
1 file changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/17/31017/1
diff --git a/ifwi.h b/ifwi.h
new file mode 100644
index 0000000..622fccf
--- /dev/null
+++ b/ifwi.h
@@ -0,0 +1,80 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/*
+ * The Integrated Firmware Image (IFWI) is used as a partitioning
+ * format on some Intel SoCs (e.g. Apollo Lake). It is not tied to
+ * NOR flashes, rather to have a common format between different
+ * types of boot media.
+ */
+
+#ifndef __IFWI_H__
+#define __IFWI_H__ 1
+
+#include <stdint.h>
+
+#include "layout.h"
+
+int layout_from_ifwi_rom(struct flashrom_layout **, struct flashrom_flashctx *, const size_t flash_offset);
+
+/*********** Boot Partition Descriptor Table (BPDT) ***********/
+
+#define BPDT_ENTRY_LENGTH 12
+
+struct bpdt_entry { /* points to a Sub-Partition */
+ uint16_t type;
+ uint16_t flags;
+ uint32_t offset; /* from start of Logical Boot Partition */
+ uint32_t size;
+};
+
+#define BPDT_SIGNATURE 0x000055aa
+#define BPDT_HEADER_LENGTH 24
+
+struct bpdt {
+ uint32_t signature;
+ uint16_t desc_count;
+ uint16_t version;
+ uint32_t xorsum; /* covers BPDT to S-BPDT (inclusive), iff there is
+ a redundant Logical Boot Partition, otherwise 0 */
+ uint32_t ifwi_version; /* revision of this IFWI build */
+ struct bpdt_entry entries[];
+};
+
+/**************** Sub-Partition Directory (SPD) ***************/
+
+#define SPD_ENTRY_OFFSET_MASK 0x01ffffff
+#define SPD_ENTRY_LENGTH 24
+
+struct spd_entry {
+ char name[12 + 1]; /* serialized as 12 chars w/o terminator */
+ uint32_t offset; /* from start of the SPD header */
+ uint32_t length;
+};
+
+#define SPD_MARKER 0x44504324 /* $CPD */
+#define SPD_MIN_HEADER_LENGTH 16
+
+struct spd {
+ uint32_t marker;
+ uint32_t num_entries;
+ uint8_t header_version;
+ uint8_t entry_version;
+ uint8_t header_length;
+ uint8_t checksum; /* xor-sum covering header + entries */
+ char name[4 + 1]; /* serialized as 4 chars w/o terminator */
+ struct spd_entry entries[];
+};
+
+#endif /* __IFWI_H__ */
--
To view, visit https://review.coreboot.org/c/flashrom/+/31017
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4bdf47637bfb68560e6d4269f89710572c1bb82a
Gerrit-Change-Number: 31017
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange