Julius Werner has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/63660 )
Change subject: docs/coding_style: Clarify use of GCC extensions
......................................................................
docs/coding_style: Clarify use of GCC extensions
This patch adds a section to the coding style that explicitly clarifies
the use of GCC extensions in coreboot (which has been long-standing
practice anyway), and expressly allows their use.
See the mailing list discussion for more details:
https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/3C2Q…
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I0d0eb90d6729fefeb131cdd573ad51f1884afe11
---
M Documentation/contributing/coding_style.md
1 file changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/63660/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/63660
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0d0eb90d6729fefeb131cdd573ad51f1884afe11
Gerrit-Change-Number: 63660
Gerrit-PatchSet: 2
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newpatchset
Julius Werner has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63660 )
Change subject: docs/coding_style: Clarify use of GCC extensions
......................................................................
docs/coding_style: Clarify use of GCC extensions
This patch adds a section to the coding style that explicitly clarifies
the use of GCC extensions in coreboot (which has been long-standing
practice anyway), and expressly allows their use.
See the mailing list discussion for more details:
TODO
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I0d0eb90d6729fefeb131cdd573ad51f1884afe11
---
M Documentation/contributing/coding_style.md
1 file changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/63660/1
diff --git a/Documentation/contributing/coding_style.md b/Documentation/contributing/coding_style.md
index 6564545..3314030 100644
--- a/Documentation/contributing/coding_style.md
+++ b/Documentation/contributing/coding_style.md
@@ -960,6 +960,41 @@
: /* outputs */ : /* inputs */ : /* clobbers */);
```
+GCC extensions
+--------------
+
+GCC is the only officially-supported compiler for coreboot, and a
+variety of its C language extensions are heavily used throughout the
+code base. There have been occasional attempts to add clang as a second
+compiler option, which is generally compatible to the same language
+extensions that have been long-established by GCC.
+
+Some GCC extensions (e.g. inline assembly) are basically required for
+proper firmware development. Others enable more safe or flexible
+coding patterns than can be expressed with standard C (e.g. statement
+expressions and `typeof()` to avoid double evaluation in macros like
+`MAX()`). Yet others just add some simple convenience and reduce
+boilerplate (e.g. `void *` arithmetic).
+
+Since some GCC extensions are necessary either way, there is no gain
+from avoiding other GCC extensions elsewhere. The use of all official
+GCC extensions is expressly allowed within coreboot. In cases where an
+extension can be replaced by a 100% equivalent C standard feature with
+no extra boilerplate or loss of readability, the C standard feature
+should be preferred (this usually only happens when GCC retains an
+older pre-standardization extension for backwards compatibility, e.g.
+the old pre-C99 syntax for designated initializers). But if there is
+any advantage offered by the GCC extension (e.g. using GCC zero-length
+arrays instead of C99 variable-length arrays because they don't inhibit
+`sizeof()`), there is no reason to deprive ourselves of that, and "this
+is not C standard compliant" should not be a reason to argue against
+its use in reviews.
+
+This rule only applies to explicit GCC extensions listed in the
+"Extensions to the C Language Family" section of the GCC manual. Code
+should never rely on incidental GCC translation behavior that is not
+explicitly documented as a feature and could change at any moment.
+
References
----------
--
To view, visit https://review.coreboot.org/c/coreboot/+/63660
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0d0eb90d6729fefeb131cdd573ad51f1884afe11
Gerrit-Change-Number: 63660
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange
Attention is currently required from: Hung-Te Lin, Nico Huber, Rex-BC Chen, Julius Werner, Arthur Heymans, Yu-Ping Wu, Jianjun Wang.
Shelley Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63251 )
Change subject: coreboot_tables: Add PCIe info to coreboot table
......................................................................
Patch Set 18:
(1 comment)
Patchset:
PS9:
> > I think that ctrl_base == config_base […]
Ok, I think that I understand what you're saying now.
Can we start out with mmio_base and size? Those seem very generic. Is MTK deriving the mmio_size from the ctrl_base? QC can derive the atu_base in their QC specific case separately.
--
To view, visit https://review.coreboot.org/c/coreboot/+/63251
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6cdce21efc66aa441ec077e6fc1d5d1c6a9aafb0
Gerrit-Change-Number: 63251
Gerrit-PatchSet: 18
Gerrit-Owner: Jianjun Wang <jianjun.wang(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Rex-BC Chen <rex-bc.chen(a)mediatek.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Rex-BC Chen <rex-bc.chen(a)mediatek.com>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Jianjun Wang <jianjun.wang(a)mediatek.com>
Gerrit-Comment-Date: Fri, 15 Apr 2022 21:26:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Shelley Chen <shchen(a)google.com>
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Comment-In-Reply-To: Yu-Ping Wu <yupingso(a)google.com>
Comment-In-Reply-To: Jianjun Wang <jianjun.wang(a)mediatek.com>
Gerrit-MessageType: comment
Attention is currently required from: Kyösti Mälkki.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59011 )
Change subject: [WIP] mb/google,intel: Split chromeos.c files
......................................................................
Patch Set 9:
(1 comment)
File src/mainboard/google/eve/chromeos.c:
https://review.coreboot.org/c/coreboot/+/59011/comment/dd62dabb_f7b426dc
PS6, Line 26: CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME),
> Actually, I meant if the use of line above with CROS_GPIO_VIRTUAL was still valid, I can see recover […]
I think we're getting at the same thing, it looks like "virtual" GPIOs in the `cros_gpios` doesn't really do much useful, at least for the recovery mode switch.
--
To view, visit https://review.coreboot.org/c/coreboot/+/59011
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I71a02c5fa1b256316b86b673660bf22dfd284f7f
Gerrit-Change-Number: 59011
Gerrit-PatchSet: 9
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Comment-Date: Fri, 15 Apr 2022 21:15:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Comment-In-Reply-To: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga, Ivy Jian, Eric Lai, Lean Sheng Tan.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63628 )
Change subject: lib: Check for non-existent DIMMs in check_if_dimm_changed
......................................................................
Patch Set 9: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/63628/comment/b691830c_342bc9e8
PS9, Line 11: common
`commonly`
--
To view, visit https://review.coreboot.org/c/coreboot/+/63628
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2ada0109eb0805174cb85d4ce373e2a3ab7dbcac
Gerrit-Change-Number: 63628
Gerrit-PatchSet: 9
Gerrit-Owner: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Frank Wu <frank_wu(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Ivy Jian <ivy.jian(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Amanda Hwang <amanda_hwang(a)compal.corp-partner.google.com>
Gerrit-CC: Dtrain Hsu <dtrain_hsu(a)compal.corp-partner.google.com>
Gerrit-CC: Ian Feng <ian_feng(a)compal.corp-partner.google.com>
Gerrit-CC: John Su <john_su(a)compal.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Van Chen <van_chen(a)compal.corp-partner.google.com>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Attention: Ivy Jian <ivy.jian(a)quanta.corp-partner.google.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Attention: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Comment-Date: Fri, 15 Apr 2022 21:06:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Jakub Czapiga, Eric Lai.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63643 )
Change subject: test/lib: Add non-existent DIMMs test case in spd_cache-test
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/63643
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3c8aa92ee0cfd5908399f4bbd305f8f306571d40
Gerrit-Change-Number: 63643
Gerrit-PatchSet: 1
Gerrit-Owner: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Comment-Date: Fri, 15 Apr 2022 21:05:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Robert Zieba, Nico Huber, Raul Rangel, Angel Pons, Arthur Heymans, Tim Wawrzynczak, Kyösti Mälkki.
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63657 )
Change subject: arch/x86: Add support for catching null deferences through debug regs
......................................................................
Patch Set 5:
(10 comments)
File src/arch/x86/Kconfig:
https://review.coreboot.org/c/coreboot/+/63657/comment/2fe9ee80_f528e604
PS5, Line 327:
Nit: Replace 2nd tab with 2 spaces so that it is consistent with other config items.
File src/arch/x86/breakpoint.c:
https://review.coreboot.org/c/coreboot/+/63657/comment/389c3a07_9815cedf
PS5, Line 35: #define DEBUG_CTRL_INSTR 0x0
: #define DEBUG_CTRL_WRITE 0x1
: #define DEBUG_CTRL_IO_RW 0x2
: #define DEBUG_CTRL_RW 0x3
enum seems like a good candidate
https://review.coreboot.org/c/coreboot/+/63657/comment/255cc93e_7b56e99a
PS5, Line 50: {
Nit: For functions, recommend to keep opening braces in a separate line.
https://review.coreboot.org/c/coreboot/+/63657/comment/6382279b_ab8a2361
PS5, Line 51: uintptr_t ret = ~0x0;
Nit: Always leave an empty line between a declaration block and function body. Here and in other places in this CL.
https://review.coreboot.org/c/coreboot/+/63657/comment/73041323_794f9f8e
PS5, Line 173: case 8:
Nit:
```
case 8:
if (!ENV_X86_64)
return BREAKPOINT_RES_INVALID_LENGTH;
len_value = DEBUG_CTRL_LEN_8;
break;
```
File src/arch/x86/exception.c:
https://review.coreboot.org/c/coreboot/+/63657/comment/266aa05d_01f3732b
PS5, Line 374: #include <arch/registers.h>
If this source file has been using anything from registers.h, then it is always better to include this file. Probably better to move it to the top along with other includes.
https://review.coreboot.org/c/coreboot/+/63657/comment/128a36ca_4ba7a31a
PS5, Line 491: #if ENV_RAMSTAGE && CONFIG(DEBUG_HW_BREAKPOINTS)
If you have a static inline stubbed out implementation of breakpoint_dispatch_handler in breakpoint.h then you dont need this.
https://review.coreboot.org/c/coreboot/+/63657/comment/9a950766_a7fc02fc
PS5, Line 492: 1
What is this magic number 1?
File src/arch/x86/include/arch/breakpoint.h:
https://review.coreboot.org/c/coreboot/+/63657/comment/ef10b369_dd48b865
PS5, Line 5: CONFIG(DEBUG_HW_BREAKPOINTS)
I dont think this is required since it is included only in breakpoint.c and null_breakpoint.c which are built only if the concerned configs are enabled.
File src/arch/x86/include/arch/null_breakpoint.h:
https://review.coreboot.org/c/coreboot/+/63657/comment/5744004d_bb015101
PS5, Line 5: #if CONFIG(DEBUG_NULL_DEREF_BREAKPOINTS)
I dont think this is required. This is included only in null_breakpoint.c which is compiled only when CONFIG(DEBUG_NULL_DEREF_BREAKPOINTS) is enabled.
--
To view, visit https://review.coreboot.org/c/coreboot/+/63657
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I113590689046a13c2a552741bbfe7668a834354a
Gerrit-Change-Number: 63657
Gerrit-PatchSet: 5
Gerrit-Owner: Robert Zieba <robertzieba(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Robert Zieba <robertzieba(a)google.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Attention: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Comment-Date: Fri, 15 Apr 2022 20:58:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment