Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36596 )
Change subject: include: introduce update* for mmio operations
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36596/1/src/include/mmio.h
File src/include/mmio.h:
https://review.coreboot.org/c/coreboot/+/36596/1/src/include/mmio.h@19
PS1, Line 19: static __always_inline void update8(const volatile void *addr, uint8_t mask, uint8_t or)
> I'm a bit lost now as my parser doesn't seem to work today... […]
Yes, that's fine.
--
To view, visit https://review.coreboot.org/c/coreboot/+/36596
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9f188d586c09ee9f1e17290563f68970603204fb
Gerrit-Change-Number: 36596
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Niewöhner
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Michael Niewöhner
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 18:41:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Aaron Durbin <adurbin(a)chromium.org>
Comment-In-Reply-To: Michael Niewöhner
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34089 )
Change subject: src/soc/intel/common/itss: Add support to get IRQ configuration for PCI devices
......................................................................
Patch Set 20:
> Patch Set 20:
>
> > Patch Set 20:
> >
> > > Patch Set 20:
> > >
> > > > Patch Set 20:
> > > >
> > > > > Patch Set 20:
> > > > > Ok, But this code already creates a irq info data , I am using the same to generate the ACPI code too, I do not need to re-populate the irq matrix.
> > > >
> > > > This argument sounds to me as if you don't want to use the common facilities we already have because you already wrote your own reimplementation of them. I hope I misunderstand you because that's not very convincing.
> > > >
> > > > What is missing in acpi_pirq_gen that is present in your code (and can't be added there to avoid having all the common parts twice in our code base)?
> > >
> > > The intent of this code was to populate irq info based on the device tree selection and pass it to FSP for IRQ configuration based on the irq assignment rules, this implementation is added new(does not exist in acpi_pirq_gen(neither should be scoped in ACPI module)), I think
> > > Arthur made a point to re-use APCI generation part from acpi_pirq_gen, to which my response was I did not want to re-populate the irq matrix again, since this code already creates that info.
> >
> > You don't have to repopulate anything, the matrix is a local structure of that code. You just have to provide a callback function called 'intel_common_map_pirq' which returns a route for a given pin on a given PCI device. Given your current code that should be easy or even trivial to implement. Give the FSP what it needs using this code(and please document it first!) and use the common southbridge code create ACPI _PIR tables.
> >
> > Your code potentially has multiple entries for the same PCI device and pin in the _PIR table. That needs to be avoided. The best way to avoid that is by populating a matrix[MAX_PCI_DEV][4] '4' being pin[A-D] otherwise you have to keep track of what device and what pin already have an entry. You end up needing a 'matrix' anyway as the data FSP needs does not fully match what ACPI _PIR expects.
> >
> > Please consider that reusing common code usually means avoiding pitfalls someone else fell into in the past.
>
> Hi Arthur, I wanted to understand more on you below comment:
>
> [Arthur]Your code potentially has multiple entries for the same PCI device and pin in the _PIR table. That needs to be avoided. The best way to avoid that is by populating a matrix[MAX_PCI_DEV][4] '4' being pin[A-D] otherwise you have to keep track of what device and what pin already have an entry. You end up needing a 'matrix' anyway as the data FSP needs does not fully match what ACPI _PIR expects.
>
> [Aamir] I do not see multiple entries with same PCI device and int pin mapping , below is the ACPI package that is currently generated with this implementation:
>
> Name (PIRX, Package (0x11)
> {
> Package (0x04)
> {
> 0x0012FFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x0014FFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x0014FFFF,
> 0x01,
> Zero,
> 0x11
> },
>
> Package (0x04)
> {
> 0x0014FFFF,
> 0x02,
> Zero,
> 0x12
> },
>
> Package (0x04)
> {
> 0x0015FFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x0015FFFF,
> 0x01,
> Zero,
> 0x11
> },
>
> Package (0x04)
> {
> 0x0015FFFF,
> 0x02,
> Zero,
> 0x12
> },
>
> Package (0x04)
> {
> 0x0016FFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x0017FFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x0019FFFF,
> 0x03,
> Zero,
> 0x13
> },
>
> Package (0x04)
> {
> 0x001DFFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x001DFFFF,
> 0x01,
> Zero,
> 0x11
> },
>
> Package (0x04)
> {
> 0x001EFFFF,
> 0x00,
> Zero,
> 0x14
> },
>
> Package (0x04)
> {
> 0x001EFFFF,
> 0x01,
> Zero,
> 0x15
> },
>
> Package (0x04)
> {
> 0x001EFFFF,
> 0x02,
> Zero,
> 0x16
> },
>
> Package (0x04)
> {
> 0x001FFFFF,
> 0x00,
> Zero,
> 0x10
> },
>
> Package (0x04)
> {
> 0x001FFFFF,
> 0x01,
> Zero,
> 0x11
> }
> })
>
This lacks entries of device 2, 4, 5 and 8 which you wouldn't have if you use CB:36437.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34089
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib7066432ff5f0d7017ac5a44922ca69f07da9556
Gerrit-Change-Number: 34089
Gerrit-PatchSet: 20
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Lean Sheng Tan <lean.sheng.tan(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg(a)chromium.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 17:55:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34089 )
Change subject: src/soc/intel/common/itss: Add support to get IRQ configuration for PCI devices
......................................................................
Patch Set 20:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34089/20/src/soc/intel/common/bloc…
File src/soc/intel/common/block/itss/irq.c:
https://review.coreboot.org/c/coreboot/+/34089/20/src/soc/intel/common/bloc…
PS20, Line 50: irq_entry->int_line = int_line++;
> The IRQ assignments for F0:f7 can range from 16:23(shareable IRQs, expect for LPSS controllers), current implementation can allocate IRQ ranging from 16-23
You forget the additional requirement that a int_pin can only have one int_line.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34089
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib7066432ff5f0d7017ac5a44922ca69f07da9556
Gerrit-Change-Number: 34089
Gerrit-PatchSet: 20
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Lean Sheng Tan <lean.sheng.tan(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg(a)chromium.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 17:39:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Comment-In-Reply-To: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-MessageType: comment
Aamir Bohra has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34089 )
Change subject: src/soc/intel/common/itss: Add support to get IRQ configuration for PCI devices
......................................................................
Patch Set 20:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34089/20/src/soc/intel/common/bloc…
File src/soc/intel/common/block/itss/irq.c:
https://review.coreboot.org/c/coreboot/+/34089/20/src/soc/intel/common/bloc…
PS20, Line 50: irq_entry->int_line = int_line++;
> This seems bad. For a slot you can have up to 7 functions. […]
The IRQ assignments for F0:f7 can range from 16:23(shareable IRQs, expect for LPSS controllers), current implementation can allocate IRQ ranging from 16-23
--
To view, visit https://review.coreboot.org/c/coreboot/+/34089
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib7066432ff5f0d7017ac5a44922ca69f07da9556
Gerrit-Change-Number: 34089
Gerrit-PatchSet: 20
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Lean Sheng Tan <lean.sheng.tan(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg(a)chromium.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 17:17:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: comment
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34089 )
Change subject: src/soc/intel/common/itss: Add support to get IRQ configuration for PCI devices
......................................................................
Patch Set 20:
(1 comment)
> Patch Set 20:
>
> > Patch Set 20:
> >
> > > Patch Set 20:
> > >
> > > > Patch Set 20:
> > > >
> > > > > Patch Set 20:
> > > > >
> > > > > > Patch Set 20:
> > > > > >
> > > > > > > Patch Set 20:
> > > > > > >
> > > > > > > > Patch Set 20:
> > > > > > > > Ok, But this code already creates a irq info data , I am using the same to generate the ACPI code too, I do not need to re-populate the irq matrix.
> > > > > > >
> > > > > > > This argument sounds to me as if you don't want to use the common facilities we already have because you already wrote your own reimplementation of them. I hope I misunderstand you because that's not very convincing.
> > > > > > >
> > > > > > > What is missing in acpi_pirq_gen that is present in your code (and can't be added there to avoid having all the common parts twice in our code base)?
> > > > > >
> > > > > > The intent of this code was to populate irq info based on the device tree selection and pass it to FSP for IRQ configuration based on the irq assignment rules, this implementation is added new(does not exist in acpi_pirq_gen(neither should be scoped in ACPI module)), I think
> > > > > > Arthur made a point to re-use APCI generation part from acpi_pirq_gen, to which my response was I did not want to re-populate the irq matrix again, since this code already creates that info.
> > > > >
> > > > > You don't have to repopulate anything, the matrix is a local structure of that code. You just have to provide a callback function called 'intel_common_map_pirq' which returns a route for a given pin on a given PCI device. Given your current code that should be easy or even trivial to implement. Give the FSP what it needs using this code(and please document it first!) and use the common southbridge code create ACPI _PIR tables.
> > > > >
> > > > > Your code potentially has multiple entries for the same PCI device and pin in the _PIR table. That needs to be avoided. The best way to avoid that is by populating a matrix[MAX_PCI_DEV][4] '4' being pin[A-D] otherwise you have to keep track of what device and what pin already have an entry. You end up needing a 'matrix' anyway as the data FSP needs does not fully match what ACPI _PIR expects.
> > > > >
> > > > > Please consider that reusing common code usually means avoiding pitfalls someone else fell into in the past.
> > > >
> > > > Hi Arthur, I wanted to understand more on you below comment:
> > > >
> > > > [Arthur]Your code potentially has multiple entries for the same PCI device and pin in the _PIR table. That needs to be avoided. The best way to avoid that is by populating a matrix[MAX_PCI_DEV][4] '4' being pin[A-D] otherwise you have to keep track of what device and what pin already have an entry. You end up needing a 'matrix' anyway as the data FSP needs does not fully match what ACPI _PIR expects.
> > > >
> > > > [Aamir] I do not see multiple entries with same PCI device and int pin mapping , below is the ACPI package that is currently generated with this implementation:
> > > >
> > > > Name (PIRX, Package (0x11)
> > > > {
> > > > Package (0x04)
> > > > {
> > > > 0x0012FFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0014FFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0014FFFF,
> > > > 0x01,
> > > > Zero,
> > > > 0x11
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0014FFFF,
> > > > 0x02,
> > > > Zero,
> > > > 0x12
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0015FFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0015FFFF,
> > > > 0x01,
> > > > Zero,
> > > > 0x11
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0015FFFF,
> > > > 0x02,
> > > > Zero,
> > > > 0x12
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0016FFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0017FFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x0019FFFF,
> > > > 0x03,
> > > > Zero,
> > > > 0x13
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001DFFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001DFFFF,
> > > > 0x01,
> > > > Zero,
> > > > 0x11
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001EFFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x14
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001EFFFF,
> > > > 0x01,
> > > > Zero,
> > > > 0x15
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001EFFFF,
> > > > 0x02,
> > > > Zero,
> > > > 0x16
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001FFFFF,
> > > > 0x00,
> > > > Zero,
> > > > 0x10
> > > > },
> > > >
> > > > Package (0x04)
> > > > {
> > > > 0x001FFFFF,
> > > > 0x01,
> > > > Zero,
> > > > 0x11
> > > > }
> > > > })
> > > >
> > > > And this is the IRQ table passed to FSP for configuration.(LPSS would not share same IRQs)
> > > > https://review.coreboot.org/c/coreboot/+/34089/13/src/soc/intel/common/bloc…
> > > >
> > > > Both aligns and do not mismatch, that is the advantage of using the same irq data for creating the APCI package as well.
> > >
> > > Hi Arthur, did you get a chance to review the acpi package, if no concerns, can you please review your -2 vote?
> > > Anyways this CL is needed to populate irq table for FSP to consume. ACPI CL is here: https://review.coreboot.org/c/coreboot/+/34658/6
> >
> > No, you are just 'lucky' that there are no double entries.
> >
> > Please try https://review.coreboot.org/c/coreboot/+/36437 and use that to generate acpi _PRT entries. It should be trivial to extend to use other settings you provide fsp.
>
> Disagree on that. This implementation runs for all SOC IRQ participating devices just once, for all unique device instances. So there is no scope of getting a double entry for same device and same IRQ pin.
You can have multiple functions sharing the same pin, but they *must* share the same route. This code does indeed make sure, like you say all routes are unique, but in a way that is even more wrong than having multiple of the same entries.
https://review.coreboot.org/c/coreboot/+/34089/20/src/soc/intel/common/bloc…
File src/soc/intel/common/block/itss/irq.c:
https://review.coreboot.org/c/coreboot/+/34089/20/src/soc/intel/common/bloc…
PS20, Line 50: irq_entry->int_line = int_line++;
This seems bad. For a slot you can have up to 7 functions. You can however only have only 4 pins per slot. You end up with multiple lines for for the same pin, which is invalid afaik.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34089
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib7066432ff5f0d7017ac5a44922ca69f07da9556
Gerrit-Change-Number: 34089
Gerrit-PatchSet: 20
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Lean Sheng Tan <lean.sheng.tan(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg(a)chromium.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 16:59:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Aamir Bohra has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34089 )
Change subject: src/soc/intel/common/itss: Add support to get IRQ configuration for PCI devices
......................................................................
Patch Set 20:
> Patch Set 20:
>
> > Patch Set 20:
> >
> > > Patch Set 20:
> > >
> > > > Patch Set 20:
> > > >
> > > > > Patch Set 20:
> > > > >
> > > > > > Patch Set 20:
> > > > > >
> > > > > > > Patch Set 20:
> > > > > > > Ok, But this code already creates a irq info data , I am using the same to generate the ACPI code too, I do not need to re-populate the irq matrix.
> > > > > >
> > > > > > This argument sounds to me as if you don't want to use the common facilities we already have because you already wrote your own reimplementation of them. I hope I misunderstand you because that's not very convincing.
> > > > > >
> > > > > > What is missing in acpi_pirq_gen that is present in your code (and can't be added there to avoid having all the common parts twice in our code base)?
> > > > >
> > > > > The intent of this code was to populate irq info based on the device tree selection and pass it to FSP for IRQ configuration based on the irq assignment rules, this implementation is added new(does not exist in acpi_pirq_gen(neither should be scoped in ACPI module)), I think
> > > > > Arthur made a point to re-use APCI generation part from acpi_pirq_gen, to which my response was I did not want to re-populate the irq matrix again, since this code already creates that info.
> > > >
> > > > You don't have to repopulate anything, the matrix is a local structure of that code. You just have to provide a callback function called 'intel_common_map_pirq' which returns a route for a given pin on a given PCI device. Given your current code that should be easy or even trivial to implement. Give the FSP what it needs using this code(and please document it first!) and use the common southbridge code create ACPI _PIR tables.
> > > >
> > > > Your code potentially has multiple entries for the same PCI device and pin in the _PIR table. That needs to be avoided. The best way to avoid that is by populating a matrix[MAX_PCI_DEV][4] '4' being pin[A-D] otherwise you have to keep track of what device and what pin already have an entry. You end up needing a 'matrix' anyway as the data FSP needs does not fully match what ACPI _PIR expects.
> > > >
> > > > Please consider that reusing common code usually means avoiding pitfalls someone else fell into in the past.
> > >
> > > Hi Arthur, I wanted to understand more on you below comment:
> > >
> > > [Arthur]Your code potentially has multiple entries for the same PCI device and pin in the _PIR table. That needs to be avoided. The best way to avoid that is by populating a matrix[MAX_PCI_DEV][4] '4' being pin[A-D] otherwise you have to keep track of what device and what pin already have an entry. You end up needing a 'matrix' anyway as the data FSP needs does not fully match what ACPI _PIR expects.
> > >
> > > [Aamir] I do not see multiple entries with same PCI device and int pin mapping , below is the ACPI package that is currently generated with this implementation:
> > >
> > > Name (PIRX, Package (0x11)
> > > {
> > > Package (0x04)
> > > {
> > > 0x0012FFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0014FFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0014FFFF,
> > > 0x01,
> > > Zero,
> > > 0x11
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0014FFFF,
> > > 0x02,
> > > Zero,
> > > 0x12
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0015FFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0015FFFF,
> > > 0x01,
> > > Zero,
> > > 0x11
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0015FFFF,
> > > 0x02,
> > > Zero,
> > > 0x12
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0016FFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0017FFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x0019FFFF,
> > > 0x03,
> > > Zero,
> > > 0x13
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001DFFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001DFFFF,
> > > 0x01,
> > > Zero,
> > > 0x11
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001EFFFF,
> > > 0x00,
> > > Zero,
> > > 0x14
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001EFFFF,
> > > 0x01,
> > > Zero,
> > > 0x15
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001EFFFF,
> > > 0x02,
> > > Zero,
> > > 0x16
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001FFFFF,
> > > 0x00,
> > > Zero,
> > > 0x10
> > > },
> > >
> > > Package (0x04)
> > > {
> > > 0x001FFFFF,
> > > 0x01,
> > > Zero,
> > > 0x11
> > > }
> > > })
> > >
> > > And this is the IRQ table passed to FSP for configuration.(LPSS would not share same IRQs)
> > > https://review.coreboot.org/c/coreboot/+/34089/13/src/soc/intel/common/bloc…
> > >
> > > Both aligns and do not mismatch, that is the advantage of using the same irq data for creating the APCI package as well.
> >
> > Hi Arthur, did you get a chance to review the acpi package, if no concerns, can you please review your -2 vote?
> > Anyways this CL is needed to populate irq table for FSP to consume. ACPI CL is here: https://review.coreboot.org/c/coreboot/+/34658/6
>
> No, you are just 'lucky' that there are no double entries.
>
> Please try https://review.coreboot.org/c/coreboot/+/36437 and use that to generate acpi _PRT entries. It should be trivial to extend to use other settings you provide fsp.
Disagree on that. This implementation runs for all SOC IRQ participating devices just once, for all unique device instances. So there is no scope of getting a double entry for same device and same IRQ pin.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34089
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib7066432ff5f0d7017ac5a44922ca69f07da9556
Gerrit-Change-Number: 34089
Gerrit-PatchSet: 20
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Lean Sheng Tan <lean.sheng.tan(a)intel.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg(a)chromium.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 16:34:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36341 )
Change subject: security/vboot: Build vboot library with same .a that depthcharge uses
......................................................................
Patch Set 18:
> Patch Set 18:
>
> > > This is all good but it still leaves the problem that we need to deal with the TLCL duplicate references (see my comment early on). Are you guys clear on who's going to deal with that (Tim or Joel)?
>
> Ah, it's only after seeing this CL that I realize the purpose is for handling the duplicate references. Might want to mention that in the vboot_reference CL.
Will do
--
To view, visit https://review.coreboot.org/c/coreboot/+/36341
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I905b781c3596965ec7ef45a2a7eafe15fdd4d9cc
Gerrit-Change-Number: 36341
Gerrit-PatchSet: 18
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Joel Kitching <kitching(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 07 Nov 2019 16:06:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment