Anastasia Klimchuk has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/54989 )
Change subject: bitbang_spi.c: Rename usages of bitbang_spi_master into master
......................................................................
bitbang_spi.c: Rename usages of bitbang_spi_master into master
There were two different things in this file, but both of them were
called "mst" and it was confusing.
Now the variables of type bitbang_spi_master are called "master",
including the member of bitbang_spi_master_data. The variables of
type spi_master are called mst.
BUG=b:185191942
TEST=builds
Change-Id: I2fdbdc2daedde7f6996642cfbb2d34ec06a89621
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M bitbang_spi.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/89/54989/1
diff --git a/bitbang_spi.c b/bitbang_spi.c
index bb89071..85c867e 100644
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -95,7 +95,7 @@
}
struct bitbang_spi_master_data {
- const struct bitbang_spi_master *mst;
+ const struct bitbang_spi_master *master;
};
static int bitbang_spi_send_command(const struct flashctx *flash,
@@ -105,7 +105,7 @@
{
unsigned int i;
const struct bitbang_spi_master_data *data = flash->mst->spi.data;
- const struct bitbang_spi_master *master = data->mst;
+ const struct bitbang_spi_master *master = data->master;
/* FIXME: Run bitbang_spi_request_bus here or in programmer init?
* Requesting and releasing the SPI bus is handled in here to allow the
@@ -160,7 +160,7 @@
}
struct bitbang_spi_master_data *data = calloc(1, sizeof(struct bitbang_spi_master_data));
- data->mst = master;
+ data->master = master;
mst.data = data;
register_spi_master(&mst, NULL);
register_shutdown(bitbang_spi_shutdown, data);
--
To view, visit https://review.coreboot.org/c/flashrom/+/54989
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2fdbdc2daedde7f6996642cfbb2d34ec06a89621
Gerrit-Change-Number: 54989
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Ivan V, Nico Huber.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54964 )
Change subject: platform: Fix endianness detection for Apple Silicon Macs
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/54964
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ifdb1523ee2c7023e657cfd7b823b091d5deef513
Gerrit-Change-Number: 54964
Gerrit-PatchSet: 1
Gerrit-Owner: Ivan V <root(a)pcm720.me>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Ivan V <root(a)pcm720.me>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Comment-Date: Wed, 26 May 2021 22:22:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Ivan V has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/54964 )
Change subject: platform: Fix endianness detection for Apple Silicon Macs
......................................................................
platform: Fix endianness detection for Apple Silicon Macs
Building flashrom on Apple Silicon Macs fails with
"Unable to determine endianness" error. It seems that current
endianness detection fails on macOS due to a combination of
three issues:
1. On macOS, neither GCC nor Clang have __ARMEL__ macros used
by architecture-specific detection;
2. Generic detection fails because Apple uses LITTLE_ENDIAN,
BIG_ENDIAN and BYTE_ORDER macros instead of __BYTE_ORDER and
__LITTLE_ENDIAN;
3. __LITTLE_ENDIAN__ and __BIG_ENDIAN__ macros are used only
for PowerPC architecture.
This error can be fixed by appending __LITTLE_ENDIAN__ and
__BIG_ENDIAN__ to conditions in IS_ARM branch. I've considered
multiple approaches, but this one seems the cleanest to me.
Signed-off-by: Ivan V <root(a)pcm720.me>
Change-Id: Ifdb1523ee2c7023e657cfd7b823b091d5deef513
---
M platform.h
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/64/54964/1
diff --git a/platform.h b/platform.h
index 751957c..04f1ab1 100644
--- a/platform.h
+++ b/platform.h
@@ -116,9 +116,9 @@
#elif IS_ARM
/* ARM can be either endian. */
-#if defined (__ARMEB__)
+#if defined (__ARMEB__) || defined (__BIG_ENDIAN__)
#define __FLASHROM_BIG_ENDIAN__ 1
-#elif defined (__ARMEL__)
+#elif defined (__ARMEL__) || defined (__LITTLE_ENDIAN__)
#define __FLASHROM_LITTLE_ENDIAN__ 1
#endif
--
To view, visit https://review.coreboot.org/c/flashrom/+/54964
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ifdb1523ee2c7023e657cfd7b823b091d5deef513
Gerrit-Change-Number: 54964
Gerrit-PatchSet: 1
Gerrit-Owner: Ivan V <root(a)pcm720.me>
Gerrit-MessageType: newchange
Attention is currently required from: Nico Huber, Angel Pons, Arthur Heymans.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54905 )
Change subject: dummyflasher.c: Don't leak `emu_persistent_image`
......................................................................
Patch Set 1:
(1 comment)
File dummyflasher.c:
https://review.coreboot.org/c/flashrom/+/54905/comment/6113fea7_bcb0ad82
PS1, Line 1026: free(data->emu_persistent_image);
> > Is it ok to free something which is !(not) ? […]
Oh thank you, super useful!
So the code like `if (pointer) free(pointer)` is not needed, just `free(pointer)` is sufficient? Specifically, when I write new code?
--
To view, visit https://review.coreboot.org/c/flashrom/+/54905
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I76529973cefcc6a1472681e1f4da8239fcbf07a6
Gerrit-Change-Number: 54905
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Comment-Date: Wed, 26 May 2021 22:04:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Arthur Heymans, Anastasia Klimchuk.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54905 )
Change subject: dummyflasher.c: Don't leak `emu_persistent_image`
......................................................................
Patch Set 1:
(1 comment)
File dummyflasher.c:
https://review.coreboot.org/c/flashrom/+/54905/comment/564cc727_142daf52
PS1, Line 1026: free(data->emu_persistent_image);
> Is it ok to free something which is !(not) ?
Do you mean if it's okay to pass a null pointer to `free()`? Quoting the C standard, 7.20.3.2/2 from ISO-IEC 9899 [1]:
> If ptr is a null pointer, no action occurs.
So yes, it's a perfectly fine thing to do.
[1]: http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf
--
To view, visit https://review.coreboot.org/c/flashrom/+/54905
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I76529973cefcc6a1472681e1f4da8239fcbf07a6
Gerrit-Change-Number: 54905
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Wed, 26 May 2021 10:00:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Paul Menzel, Stefan Reinauer.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54943 )
Change subject: Add AmigaOS suppport to flashrom
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/54943/comment/3145b028_1c020388
PS1, Line 8:
Also, I'd greatly appreciate if you could give a body to this commit message. For example, mention that this change introduces the `IS_AMIGA` macro to handle AmigaOS-specific quirks, and describe how this was tested.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54943
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3e4a3885f88313aad019454fdbdf4be176b35330
Gerrit-Change-Number: 54943
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Comment-Date: Wed, 26 May 2021 09:13:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Stefan Reinauer.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54944 )
Change subject: Add support for TerribleFire TF530 SPI controller
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/54944/comment/4ab3b33b_914a7f37
PS1, Line 8:
I'd greatly appreciate if you could elaborate a bit about this programmer. Where can one find this SPI controller? Is it part of a chipset? Was this code tested?
--
To view, visit https://review.coreboot.org/c/flashrom/+/54944
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I109eec4dec89650bb80d3d1da905d33f65f60f5a
Gerrit-Change-Number: 54944
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Comment-Date: Wed, 26 May 2021 09:06:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment