Attention is currently required from: Thomas Heijligen.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73570 )
Change subject: pcidev: remove pcidev_getdevfn() function
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> oh sorry :( what do we do now?
PCI access in flashrom is a big mess. Possibly the structure to handle the issues is to have a struct full of pci worker func pointers containing an opaque state machine with the pacc handle inside initialised at `struct bus_cfg` initiation time then passed down into either board_cfg || programmer_cfg or maybe just itself. It is hard to think so many moves ahead as other pre-requirements need to land first like the board_cfg cleanup series.
So that could look something akin to;
```
struct flashrom_pcihandle {
struct pci_access *pacc;
};
struct flashrom_pcibus {
struct flashrom_pci handle;
int (*find)(..);
int (*scan)(..);
int (*read)(..);
int (*write)(..);
};
```
I don't really like the OOP'ism however the tree has deeply ingrained excessive encapsulation patterns gone rampant and so any procedural state management winds up tripping you up on edge cases.
In either case, I would say this commit could be reverted as it seems to be motivated by aesthetic but not fixing a actually issue. The author just didn't notice the `pacc` singleton state machine containment as there was one patch missing that made it truly static. The reason being is that patch got stalled out unfortunately.
--
To view, visit https://review.coreboot.org/c/flashrom/+/73570
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2983420080f75ae6992edfb032bf5c83b29c803
Gerrit-Change-Number: 73570
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
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-Comment-Date: Sat, 11 Mar 2023 10:15:20 +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: Thomas Heijligen.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73570 )
Change subject: pcidev: remove pcidev_getdevfn() function
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> Hmm, the intention of `pcidev_getdevfn()` was to try and constrain `pacc` usage in the one place.
oh sorry :( what do we do now?
--
To view, visit https://review.coreboot.org/c/flashrom/+/73570
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2983420080f75ae6992edfb032bf5c83b29c803
Gerrit-Change-Number: 73570
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
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-Comment-Date: Sat, 11 Mar 2023 06:53:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen.
Hello build bot (Jenkins), Thomas Heijligen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/73455
to look at the new patch set (#2).
Change subject: internal: Move is_laptop into board_cfg
......................................................................
internal: Move is_laptop into board_cfg
Change-Id: I24e38e4457299934acdcd70325d0bf0f4b139e5f
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M board_enable.c
M include/programmer.h
M internal.c
3 files changed, 18 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/73455/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/73455
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I24e38e4457299934acdcd70325d0bf0f4b139e5f
Gerrit-Change-Number: 73455
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
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-MessageType: newpatchset
Attention is currently required from: Thomas Heijligen, Angel Pons.
Hello build bot (Jenkins), Thomas Heijligen, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/73456
to look at the new patch set (#3).
Change subject: internal: Move laptop_ok into board_cfg
......................................................................
internal: Move laptop_ok into board_cfg
Due to how internal is structured around chipset_flash_enable()
entry we need to prepare a crafted programmer_cfg that contains
a board_enable substructure with data derived from the board_enable
subsystem. While this is certainly not perfection, it does make
clear the relationships between board_enable into chipset_flash_enable
and subsequently the overall internal programmer initialisation
in a RAII fashion at the type level over closure upon global
state that is impossible to reason about.
Also flip predicate in report_nonwl_laptop_detected() and
return early with the trivial base-case.
TEST=`$ sudo ./flashrom -p internal --flash-name`.
Change-Id: I459215253845c2af73262943ce91a36464e9eb06
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M board_enable.c
M chipset_enable.c
M flashrom.c
M include/programmer.h
M internal.c
5 files changed, 69 insertions(+), 44 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/56/73456/3
--
To view, visit https://review.coreboot.org/c/flashrom/+/73456
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I459215253845c2af73262943ce91a36464e9eb06
Gerrit-Change-Number: 73456
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.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: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Felix Singer, Thomas Heijligen, Angel Pons.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71622 )
Change subject: dmi.c: Pass is_laptop by ref into dmi
......................................................................
Patch Set 5:
(2 comments)
File internal.c:
https://review.coreboot.org/c/flashrom/+/71622/comment/8985a57a_8a6d7961
PS4, Line 31: laptop_ok
> Sorry when my intent was not clear. […]
Done
https://review.coreboot.org/c/flashrom/+/71622/comment/e600d430_63a37960
PS4, Line 272:
> ?
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/71622
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3d5ad6c0623269492d775a99a947fd6fe26c5f91
Gerrit-Change-Number: 71622
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Fri, 10 Mar 2023 23:54:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Edward O'Callaghan, Angel Pons.
Hello Felix Singer, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/71622
to look at the new patch set (#5).
Change subject: dmi.c: Pass is_laptop by ref into dmi
......................................................................
dmi.c: Pass is_laptop by ref into dmi
Prefix the remaining global cases with `g_` to avoid shadowing
issues and for easy greping.
Change-Id: I3d5ad6c0623269492d775a99a947fd6fe26c5f91
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M board_enable.c
M dmi.c
M include/programmer.h
M internal.c
4 files changed, 44 insertions(+), 31 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/22/71622/5
--
To view, visit https://review.coreboot.org/c/flashrom/+/71622
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3d5ad6c0623269492d775a99a947fd6fe26c5f91
Gerrit-Change-Number: 71622
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73570 )
Change subject: pcidev: remove pcidev_getdevfn() function
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
Hmm, the intention of `pcidev_getdevfn()` was to try and constrain `pacc` usage in the one place.
--
To view, visit https://review.coreboot.org/c/flashrom/+/73570
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2983420080f75ae6992edfb032bf5c83b29c803
Gerrit-Change-Number: 73570
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 10 Mar 2023 23:44:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment