mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
List overview
Download
flashrom-gerrit
June 2021
----- 2024 -----
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
flashrom-gerrit@flashrom.org
1 participants
874 discussions
Start a n
N
ew thread
Change in flashrom[master]: ogp_spi.c: Refactor singleton states into reentrant pattern
by Edward O'Callaghan (Code Review)
01 Jun '21
01 Jun '21
Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk. Edward O'Callaghan has posted comments on this change. (
https://review.coreboot.org/c/flashrom/+/54996
) Change subject: ogp_spi.c: Refactor singleton states into reentrant pattern ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit
https://review.coreboot.org/c/flashrom/+/54996
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I6b8f6ecd7c9949ffb4098bf56a8936393283382f Gerrit-Change-Number: 54996 Gerrit-PatchSet: 3 Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com> 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: Anastasia Klimchuk <aklm(a)chromium.org> Gerrit-Comment-Date: Tue, 01 Jun 2021 01:52:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1
0
0
0
Change in flashrom[master]: pony_spi.c: Refactor singleton states into reentrant pattern
by Edward O'Callaghan (Code Review)
01 Jun '21
01 Jun '21
Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk. Edward O'Callaghan has posted comments on this change. (
https://review.coreboot.org/c/flashrom/+/54997
) Change subject: pony_spi.c: Refactor singleton states into reentrant pattern ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit
https://review.coreboot.org/c/flashrom/+/54997
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Icf1125dadcdaa287ebe3c07ca95adb770bb19412 Gerrit-Change-Number: 54997 Gerrit-PatchSet: 3 Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com> 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: Anastasia Klimchuk <aklm(a)chromium.org> Gerrit-Comment-Date: Tue, 01 Jun 2021 01:52:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1
0
0
0
Change in flashrom[master]: nic3com.c: Refactor singleton states into reentrant pattern
by Anastasia Klimchuk (Code Review)
01 Jun '21
01 Jun '21
Anastasia Klimchuk has uploaded this change for review. (
https://review.coreboot.org/c/flashrom/+/55106
) Change subject: nic3com.c: Refactor singleton states into reentrant pattern ...................................................................... nic3com.c: Refactor singleton states into reentrant pattern Move global singleton states into a struct and store within the par_master data field for the life-time of the driver. This is one of the steps on the way to move par_master data memory management behind the initialisation API, for more context see other patches under the same topic "register_master_api". BUG=b:185191942 TEST=builds Change-Id: I1c3e4836760cc9f4f9a0bd4294e8d2407b150566 Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org> --- M nic3com.c 1 file changed, 36 insertions(+), 12 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/06/55106/1 diff --git a/nic3com.c b/nic3com.c index d60b03c..4266413 100644 --- a/nic3com.c +++ b/nic3com.c @@ -29,9 +29,11 @@ #define PCI_VENDOR_ID_3COM 0x10b7 -static uint32_t io_base_addr = 0; -static uint32_t internal_conf; -static uint16_t id; +struct nic3com_data { + uint32_t io_base_addr; + uint32_t internal_conf; + uint16_t id; +}; const struct dev_entry nics_3com[] = { /* 3C90xB */ @@ -56,15 +58,19 @@ static void nic3com_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) { - OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); - OUTB(val, io_base_addr + BIOS_ROM_DATA); + struct nic3com_data *data = flash->mst->par.data; + + OUTL((uint32_t)addr, data->io_base_addr + BIOS_ROM_ADDR); + OUTB(val, data->io_base_addr + BIOS_ROM_DATA); } static uint8_t nic3com_chip_readb(const struct flashctx *flash, const chipaddr addr) { - OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); - return INB(io_base_addr + BIOS_ROM_DATA); + struct nic3com_data *data = flash->mst->par.data; + + OUTL((uint32_t)addr, data->io_base_addr + BIOS_ROM_ADDR); + return INB(data->io_base_addr + BIOS_ROM_DATA); } static const struct par_master par_master_nic3com = { @@ -78,22 +84,29 @@ .chip_writen = fallback_chip_writen, }; -static int nic3com_shutdown(void *data) +static int nic3com_shutdown(void *par_data) { + struct nic3com_data *data = par_data; + const uint16_t id = data->id; + /* 3COM 3C90xB cards need a special fixup. */ if (id == 0x9055 || id == 0x9001 || id == 0x9004 || id == 0x9005 || id == 0x9006 || id == 0x900a || id == 0x905a || id == 0x9058) { /* Select register window 3 and restore the receiver status. */ - OUTW(SELECT_REG_WINDOW + 3, io_base_addr + INT_STATUS); - OUTL(internal_conf, io_base_addr + INTERNAL_CONFIG); + OUTW(SELECT_REG_WINDOW + 3, data->io_base_addr + INT_STATUS); + OUTL(data->internal_conf, data->io_base_addr + INTERNAL_CONFIG); } + free(data); return 0; } int nic3com_init(void) { struct pci_dev *dev = NULL; + uint32_t io_base_addr = 0; + uint32_t internal_conf = 0; + uint16_t id; if (rget_io_perms()) return 1; @@ -126,11 +139,22 @@ */ OUTW(SELECT_REG_WINDOW + 0, io_base_addr + INT_STATUS); - if (register_shutdown(nic3com_shutdown, NULL)) + struct nic3com_data *data = calloc(1, sizeof(*data)); + if (!data) { + msg_perr("Unable to allocate space for PAR master data\n"); return 1; + } + data->io_base_addr = io_base_addr; + data->internal_conf = internal_conf; + data->id = id; + + if (register_shutdown(nic3com_shutdown, data)) { + free(data); + return 1; + } max_rom_decode.parallel = 128 * 1024; - register_par_master(&par_master_nic3com, BUS_PARALLEL, NULL); + register_par_master(&par_master_nic3com, BUS_PARALLEL, data); return 0; } -- To view, visit
https://review.coreboot.org/c/flashrom/+/55106
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I1c3e4836760cc9f4f9a0bd4294e8d2407b150566 Gerrit-Change-Number: 55106 Gerrit-PatchSet: 1 Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org> Gerrit-MessageType: newchange
1
0
0
0
Change in flashrom[master]: nic3com.c: Allocate data and register shutdown at the end of init
by Anastasia Klimchuk (Code Review)
01 Jun '21
01 Jun '21
Anastasia Klimchuk has uploaded this change for review. (
https://review.coreboot.org/c/flashrom/+/55107
) Change subject: nic3com.c: Allocate data and register shutdown at the end of init ...................................................................... nic3com.c: Allocate data and register shutdown at the end of init This unlocks API change which plans to move register_shutdown inside register master API, see
https://review.coreboot.org/c/flashrom/+/51761
BUG=b:185191942 TEST=builds Change-Id: I9834b82650cd070556cf82207796bc6bd6b31b28 Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org> --- M nic3com.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/07/55107/1 diff --git a/nic3com.c b/nic3com.c index 4266413..17cf406 100644 --- a/nic3com.c +++ b/nic3com.c @@ -139,6 +139,8 @@ */ OUTW(SELECT_REG_WINDOW + 0, io_base_addr + INT_STATUS); + max_rom_decode.parallel = 128 * 1024; + struct nic3com_data *data = calloc(1, sizeof(*data)); if (!data) { msg_perr("Unable to allocate space for PAR master data\n"); @@ -152,8 +154,6 @@ free(data); return 1; } - - max_rom_decode.parallel = 128 * 1024; register_par_master(&par_master_nic3com, BUS_PARALLEL, data); return 0; -- To view, visit
https://review.coreboot.org/c/flashrom/+/55107
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I9834b82650cd070556cf82207796bc6bd6b31b28 Gerrit-Change-Number: 55107 Gerrit-PatchSet: 1 Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org> Gerrit-MessageType: newchange
1
0
0
0
← Newer
1
...
85
86
87
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200