Attention is currently required from: Aarya, Hsuan-ting Chen, Nikolai Artemiev, Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Peter Marheine. ( https://review.coreboot.org/c/flashrom/+/82496?usp=email )
Change subject: Correct get_flash_region() to use inclusive upper bounds
......................................................................
Patch Set 6:
(1 comment)
File include/layout.h:
--
To view, visit https://review.coreboot.org/c/flashrom/+/82496?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ia0ca867aef33b598c2697fc264807fa5e29683ec
Gerrit-Change-Number: 82496
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Attention: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Tue, 28 May 2024 01:55:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hsuan-ting Chen <roccochen(a)google.com>
Attention is currently required from: Alexander Goncharov.
Robert Marko has posted comments on this change by Alexander Goncharov. ( https://review.coreboot.org/c/flashrom/+/82657?usp=email )
Change subject: add gcc-14 -Werror=calloc-transposed-args compatibility
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
Fixes compilation with GCC14 on Fedora 40 for me.
--
To view, visit https://review.coreboot.org/c/flashrom/+/82657?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Icb9842fbc2fa6ad4cd9dc9384c19fd3741eadb2e
Gerrit-Change-Number: 82657
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Robert Marko <robimarko(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Mon, 27 May 2024 19:34:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: Aarya, Alexander Goncharov, Nikolai Artemiev, Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Peter Marheine. ( https://review.coreboot.org/c/flashrom/+/82393?usp=email )
Change subject: erasure_layout: Fix get_flash_region bug
......................................................................
Patch Set 13:
(4 comments)
Patchset:
PS13:
I got some last moment thoughts...
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/82393/comment/afce5561_615cb6d6?us… :
PS13, Line 368: for (unsigned int addr = region_start; addr <= region_end; addr += len) {
I looked at this loop and got a bit suspicious. Specifically, will it properly get to the other side of protected region and continue after the end of protected region?
And I really only now thought about it. And now I am realising that current test cases do not cover this case, when protected region somewhere in the middle of the chip (which is always the case in real life).
The unit test has protected region which ends right at the end of chip memory :\ To represent what I am thinking about now, it could be e.g. between bytes 6-12, and we want to make sure bytes 13-15 are also processed.
What do you think? I can try modify the test cases, maybe at the end of this week. Or if you want you can?
File tests/erase_func_algo.c:
https://review.coreboot.org/c/flashrom/+/82393/comment/8fa90395_825e150d?us… :
PS9, Line 953: const size_t num_unparameterized = 1;
> I don't understand what you're suggesting as an alternative. […]
I forgot what exactly was on my mind when I was asking , sorry :(
Probably I was confused because parameterized tests are initialized in a loop, and non-param with a memcpy.
File tests/erase_func_algo.c:
https://review.coreboot.org/c/flashrom/+/82393/comment/4e231d09_e567a183?us… :
PS13, Line 766:
: #define START_PROTECTED_REGION 8
: #define END_PROTECTED_REGION 15
This was what I thought in the other comment: have this both in the middle of a chip (5-12, something like that). Which might also need to adjust layout regions. It's easier to have the same protected region, and variations of layout regions in every test case.
--
To view, visit https://review.coreboot.org/c/flashrom/+/82393?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ic5bf9d0f0e4a94c48d6f6e74e3cb9cccdc7adec9
Gerrit-Change-Number: 82393
Gerrit-PatchSet: 13
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Mon, 27 May 2024 12:59:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Comment-In-Reply-To: Peter Marheine <pmarheine(a)chromium.org>
Attention is currently required from: Aarya, Nikolai Artemiev, Peter Marheine.
Hsuan-ting Chen has posted comments on this change by Peter Marheine. ( https://review.coreboot.org/c/flashrom/+/82496?usp=email )
Change subject: Correct get_flash_region() to use inclusive upper bounds
......................................................................
Patch Set 6:
(2 comments)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/82496/comment/aa48d700_675c6ee4?us… :
PS6, Line 2240: start = region->end + 1;
Just want to double-check: This and all other layout-related occurrences in `layout.c` (like `included_regions_overlap` and `layout_sanity_checks`) don't need to be changed. Is my understanding correct?
File include/layout.h:
--
To view, visit https://review.coreboot.org/c/flashrom/+/82496?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ia0ca867aef33b598c2697fc264807fa5e29683ec
Gerrit-Change-Number: 82496
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Mon, 27 May 2024 10:59:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Aarya, Nikolai Artemiev, Peter Marheine.
Anastasia Klimchuk has posted comments on this change by Peter Marheine. ( https://review.coreboot.org/c/flashrom/+/82496?usp=email )
Change subject: Correct get_flash_region() to use inclusive upper bounds
......................................................................
Patch Set 6:
(1 comment)
Patchset:
PS6:
I am wondering, this path in ichspi (ich_get_region) is the same in Chrome OS, is it possible to do a few test runs on a device?
There are unit tests in the following patch, but they are implementing test version of get_flash_region and this changes the ich one.
Otherwise I have no other comments!
--
To view, visit https://review.coreboot.org/c/flashrom/+/82496?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ia0ca867aef33b598c2697fc264807fa5e29683ec
Gerrit-Change-Number: 82496
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Mon, 27 May 2024 10:41:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Nikolai Artemiev, Peter Marheine, Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change by Peter Marheine. ( https://review.coreboot.org/c/flashrom/+/82251?usp=email )
Change subject: tests/erase: record the opcode for each erase
......................................................................
Patch Set 8: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/82251?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I3983fe42c2e7f06668a1bd20d2db7fafa93b8043
Gerrit-Change-Number: 82251
Gerrit-PatchSet: 8
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Comment-Date: Mon, 27 May 2024 09:36:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Hsuan Ting Chen, Nikolai Artemiev, Stefan Reinauer.
Hsuan-ting Chen has posted comments on this change by Hsuan-ting Chen. ( https://review.coreboot.org/c/flashrom/+/82605?usp=email )
Change subject: flashchips: Correct feature_bits for MX25L128*
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Thank you so much for testing and fixing! So do I understand correctly that now everything works wit […]
1. Before this patch: All WP-related options were accessible only through the `-p interna` programmer.
2. With this patch: We can now work with them through the debugger and `-p raiden_debug_spi` programmer.
If there's any other scenario setup worth trying, please let me know
--
To view, visit https://review.coreboot.org/c/flashrom/+/82605?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I001cde6816bd099317bc9c23904c5fcbe6003241
Gerrit-Change-Number: 82605
Gerrit-PatchSet: 1
Gerrit-Owner: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hsuan Ting Chen <roccochen(a)chromium.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Mon, 27 May 2024 07:00:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hsuan-ting Chen <roccochen(a)google.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Attention is currently required from: Aarya, Anastasia Klimchuk, Nikolai Artemiev.
Hello Aarya, Anastasia Klimchuk, Nikolai Artemiev, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/82496?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: Correct get_flash_region() to use inclusive upper bounds
......................................................................
Correct get_flash_region() to use inclusive upper bounds
get_flash_region() emits a struct flash_region, which uses chipoff_t for
the start and end addresses of a region. chipoff_t is defined as a valid
flash address, so it was wrong to be setting the end address to start +
len; this is clearly wrong in the case where there is a single region
because setting end to the flash size generates an address that is
beyond the end of the chip (due to zero-indexing).
This changes the one actual implementation of .get_region in ichspi.c to
use inclusive upper bounds, and corrects all callers of
get_flash_region() to treat the upper bounds as inclusive. Overall this
reduces complexity slightly by removing more downward adjustments by 1
than it needs to add upward adjustments.
Change-Id: Ia0ca867aef33b598c2697fc264807fa5e29683ec
Signed-off-by: Peter Marheine <pmarheine(a)chromium.org>
---
M erasure_layout.c
M flashrom.c
M ichspi.c
3 files changed, 22 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/96/82496/6
--
To view, visit https://review.coreboot.org/c/flashrom/+/82496?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ia0ca867aef33b598c2697fc264807fa5e29683ec
Gerrit-Change-Number: 82496
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Hsuan-ting Chen <roccochen(a)google.com>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Attention is currently required from: Aarya, Alexander Goncharov, Anastasia Klimchuk, Nikolai Artemiev.
Peter Marheine has posted comments on this change by Peter Marheine. ( https://review.coreboot.org/c/flashrom/+/82393?usp=email )
Change subject: erasure_layout: Fix get_flash_region bug
......................................................................
Patch Set 12:
(8 comments)
File tests/erase_func_algo.c:
https://review.coreboot.org/c/flashrom/+/82393/comment/1792f48b_a2cb24cb?us… :
PS9, Line 766: 16
> To be consistent with your previous patch, and also I think tests are partially a documentation (a s […]
Done
https://review.coreboot.org/c/flashrom/+/82393/comment/11d54903_58ed26e6?us… :
PS9, Line 953: const size_t num_unparameterized = 1;
> Do you think this is needed? It's the same name and the same function. […]
I don't understand what you're suggesting as an alternative. All of the tests need to be allocated in one block, and since this value is used in two locations (the size for memcpy below as well as generating the total number of tests) it seemed less error-prone to put the 1 in as a constant: this way you're less likely to forget to increase the allocation size if you add another unparameterized case.
https://review.coreboot.org/c/flashrom/+/82393/comment/98801773_4b44b3a6?us… :
PS9, Line 973: .name = "erase failure for unskipped unwritable regions",
> I had the trouble with test names, because I wanted an index (a test case #) in the name. […]
The key with this test is that it expects `flashrom_flash_erase` to fail, whereas the other tests (with `SKIP_UNWRITABLE_REGIONS` enabled) require it to succeed.
https://review.coreboot.org/c/flashrom/+/82393/comment/381cf412_d9796d9e?us… :
PS9, Line 1103: 16
> This is `END_PROTECTED_REGION + 1`, just for perfection […]
Done
https://review.coreboot.org/c/flashrom/+/82393/comment/27425dc9_70d4251d?us… :
PS9, Line 1138: <
> <= […]
Done
https://review.coreboot.org/c/flashrom/+/82393/comment/cd5f27f4_e0442904?us… :
PS9, Line 1140: <
> also here <=
I realized there was another issue with this comparison: it didn't handle the case where the block to be erased completely contains the protected region but neither endpoint is inside it. That doesn't affect the tests right now, but I added a check for that as well.
File tests/tests.h:
https://review.coreboot.org/c/flashrom/+/82393/comment/40e2456a_0f17e15c?us… :
PS9, Line 113: void erase_unwritable_regions_skipflag_off_test_success(void **state);
> this also can be removed from this patch
Done
https://review.coreboot.org/c/flashrom/+/82393/comment/ff54bfe2_4fd50433?us… :
PS9, Line 114: erase_unwritable_regions_skipflag_on_test_success
> I am wondering maybe this is also not needed. Because the function which is called in tests. […]
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/82393?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ic5bf9d0f0e4a94c48d6f6e74e3cb9cccdc7adec9
Gerrit-Change-Number: 82393
Gerrit-PatchSet: 12
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Attention: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-Comment-Date: Mon, 27 May 2024 01:15:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>