Jason Glenesk has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47726 )
Change subject: soc/amd/picasso: Add data fabric read helper function
......................................................................
Patch Set 3:
(8 comments)
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/data_f…
File src/soc/amd/picasso/data_fabric.c:
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/data_f…
PS2, Line 176: return pci_read_config32(_SOC_DEV(DF_DEV, function), reg);
> it might be useful to add a comment that the macros will apply a bit mask to the values, so no bit m […]
Done
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/data_f…
PS2, Line 180: * requested offset.*/
> Remove leading asterisk and add space in front of */ to match the short multi-line style. […]
Done
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/data_f…
PS2, Line 181: reg
> reg is the byte address and the two last bits get masked off, since the access is always dword/qword […]
Yes, this is always aligned so they omit the last bits
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/includ…
File src/soc/amd/picasso/include/soc/data_fabric.h:
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/includ…
PS2, Line 10: 0xFF
> Use lower case for hex numbers here, line 31, 37, etc.
Done
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/includ…
PS2, Line 28: #define D18F0_DRAM_HOLE_CTL 0x104
> Unless I'm mistaken, lines 28-56 are unrelated to the "add data fabric helper". […]
Done
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/includ…
PS2, Line 28: #define D18F0_DRAM_HOLE_CTL 0x104
: #define DRAM_HOLE_CTL_VALID BIT(0)
: #define DRAM_HOLE_CTL_BASE_SHFT 24
: #define DRAM_HOLE_CTL_BASE (0xFF << DRAM_HOLE_CTL_BASE_SHFT)
:
: #define D18F0_DRAM_BASE0 0x110
: #define DRAM_BASE_REG_VALID BIT(0)
: #define DRAM_BASE_HOLE_EN BIT(1)
: #define DRAM_BASE_INTLV_CH_SHFT 4
: #define DRAM_BASE_INTLV_CH (0xF << DRAM_BASE_INTLV_CH_SHFT)
: #define DRAM_BASE_INTLV_SEL_SHFT 8
: #define DRAM_BASE_INTLV_SEL (0x7 << DRAM_BASE_INTLV_SEL_SHFT)
: #define DRAM_BASE_ADDR_SHFT 12
: #define DRAM_BASE_ADDR (0xFFFFF << DRAM_BASE_ADDR_SHFT)
:
: #define D18F0_DRAM_LIMIT0 0x114
: #define DRAM_LIMIT_DST_ID_SHFT 0
: #define DRAM_LIMIT_DST_ID (0xFF << DRAM_LIMIT_DST_ID_SHFT)
: #define DRAM_LIMIT_INTLV_NUM_SOCK_SHFT 8
: #define DRAM_LIMIT_INTLV_NUM_SOCK (0x1 << DRAM_LIMIT_INTLV_NUM_SOCK_SHFT)
: #define DRAM_LIMIT_INTLV_NUM_DIE_SHFT 10
: #define DRAM_LIMIT_INTLV_NUM_DIE (0x3 << DRAM_LIMIT_INTLV_NUM_DIE_SHFT)
: #define DRAM_LIMIT_ADDR_SHFT 12
: #define DRAM_LIMIT_ADDR (0xFFFFF << DRAM_LIMIT_ADDR_SHFT)
:
: #define DF_DRAM_BASE(dram_map_pair) ((dram_map_pair) * 2 * sizeof(uint32_t) \
: + D18F0_DRAM_BASE0)
: #define DF_DRAM_LIMIT(dram_map_pair) ((dram_map_pair) * 2 * sizeof(uint32_t) \
: + D18F0_DRAM_LIMIT0)
> i'd add those in the next commit, since they aren't needed or used for what this patch adds
Done
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/includ…
PS2, Line 62: BIT(0)
> i'd prefer (1 << 0) over BIT(0), but both will work. your call.
Done
https://review.coreboot.org/c/coreboot/+/47726/2/src/soc/amd/picasso/includ…
PS2, Line 70: DF_IND_CFG_INST_ID
> is this a mask? if so, i'dd ad _MASK as suffix
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/47726
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If0dc72063fbb99efaeea3fccef16cc1b5b8526f1
Gerrit-Change-Number: 47726
Gerrit-PatchSet: 3
Gerrit-Owner: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Justin Frodsham <justin.frodsham(a)protonmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Matt Papageorge <matthewpapa07(a)gmail.com>
Gerrit-Reviewer: Nikolai Vyssotski <nikolai.vyssotski(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 10 Dec 2020 12:58:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment
Hello build bot (Jenkins), Bao Zheng, Marshall Dawson, Jason Glenesk, Nikolai Vyssotski, Matt Papageorge, Justin Frodsham, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47727
to look at the new patch set (#4).
Change subject: soc/amd/picasso: Generate ACPI CRAT objects in cb
......................................................................
soc/amd/picasso: Generate ACPI CRAT objects in cb
Add code to collect all required information and generate ACPI CRAT
table entries. Publish tables generated from cb, rather than use the
tables created by FSP binary.
BUG=b:155307433
TEST=Boot trembyle and compare coreboot generated tables with tables
that FSP published previously.
BRANCH=Zork
Change-Id: If64fd624597b2ced014ba7f0332a6a48143c0e8c
Signed-off-by: Jason Glenesk <jason.glenesk(a)amd.corp-partner.google.com>
---
M src/include/cpu/amd/cpuid.h
M src/soc/amd/picasso/agesa_acpi.c
M src/soc/amd/picasso/include/soc/data_fabric.h
3 files changed, 674 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/47727/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/47727
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If64fd624597b2ced014ba7f0332a6a48143c0e8c
Gerrit-Change-Number: 47727
Gerrit-PatchSet: 4
Gerrit-Owner: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Justin Frodsham <justin.frodsham(a)protonmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Matt Papageorge <matthewpapa07(a)gmail.com>
Gerrit-Reviewer: Nikolai Vyssotski <nikolai.vyssotski(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Hello build bot (Jenkins), Bao Zheng, Marshall Dawson, Jason Glenesk, Nikolai Vyssotski, Matt Papageorge, Justin Frodsham, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47726
to look at the new patch set (#3).
Change subject: soc/amd/picasso: Add data fabric read helper function
......................................................................
soc/amd/picasso: Add data fabric read helper function
Add new helper function to support reading a register from the data
fabric.
BUG=b:155307433
TEST=Boot trembyle with If64fd624597b2ced014ba7f0332a6a48143c0e8c and
confirm read values match expected values.
BRANCH=Zork
Change-Id: If0dc72063fbb99efaeea3fccef16cc1b5b8526f1
Signed-off-by: Jason Glenesk <jason.glenesk(a)amd.corp-partner.google.com>
---
M src/soc/amd/picasso/data_fabric.c
M src/soc/amd/picasso/include/soc/data_fabric.h
2 files changed, 36 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/47726/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/47726
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If0dc72063fbb99efaeea3fccef16cc1b5b8526f1
Gerrit-Change-Number: 47726
Gerrit-PatchSet: 3
Gerrit-Owner: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Justin Frodsham <justin.frodsham(a)protonmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Matt Papageorge <matthewpapa07(a)gmail.com>
Gerrit-Reviewer: Nikolai Vyssotski <nikolai.vyssotski(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48385 )
Change subject: soc/intel/common/block/uart: rework to use dummy device
......................................................................
Patch Set 3:
> Patch Set 3:
>
> > > > You really should check the history of drivers/wifi/generic, commit d436750 for example...
> > >
> > > Well, the history is one thing. The current code is what
> > > matters however. How about you read that?
> >
> > I did ;) Actually I meant that one change, the wording is just misleading
>
> One major difference in the way UART driver is being handled in this CL and how CNVi device is handled is:
> For CNVi:
> - PCI operations are still performed as part of the PCI driver for the CNVi controller
> - ACPI operations are performed as part of the chip driver written for the dummy device under CNVi controller
>
> For UART:
> - This change performs PCI and ACPI operations on the parent of the dummy device. This does not work for the platforms that do not add the dummy device in devicetree/overridetree.
So, that's actually what I had marked here already, right? https://review.coreboot.org/c/coreboot/+/48385/1/src/soc/intel/common/block…
>
> There are other drivers in coreboot that handle this in a similar way. Example: ISH. PCI operations are handled by PCI driver (either default PCI ops or by the special PCI driver provided in soc/intel) and ACPI operations are handled by chip driver implemented as part of src/drivers.
>
> One way to handle the UART situation in a similar way would be to provide only the PCI operations in PCI driver provided by soc/intel/common/block/uart and implement a chip driver in drivers/intel_lpss_uart or something similar that generates the required ACPI tables.
>
> >
> >
> > Well, if we rework the driver/chip modeling like you proposed, we indeed can get rid of any fake devices. Also I'm not sure if we want to mix "drivers" and "chips" then, because it's not always certain which model needs to be used. Or would we keep chips for real devices then and only use "driver" when the port is the device?
> >
> > Where would we place driver options then?
>
> I would be curious to understand how the new model would work too.
--
To view, visit https://review.coreboot.org/c/coreboot/+/48385
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic9c9398829b52e6b0523504b862aae9aff559bc7
Gerrit-Change-Number: 48385
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 10 Dec 2020 12:47:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment