All of lore.kernel.org
 help / color / mirror / Atom feed
* overriding ACPI _CRS method
@ 2015-11-29 10:58 Daniel J Blueman
  2015-11-30  3:09   ` Zheng, Lv
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel J Blueman @ 2015-11-29 10:58 UTC (permalink / raw)
  To: linux-acpi, LKML; +Cc: Steffen Persvold, Myron Stowe

In firmware that is loaded after the BIOS, I need to trim the root bus 
resource (0x40000000-0xdfffffff) covering the MMIO window [1], so I can 
attach further PCI domains.

One strategy is to override the BIOS's DSDT [2] _SB.PCI0._CRS method; 
even when my firmware appends the bytecode for a new _CRS method [3], 
alas I see AE_ALREADY_EXISTS [4].

I understood methods were overrideable within the same table (eg not 
from an SSDT), but perhaps am missing something? Or any better approach 
to reduce the scope of the PCI domain 0000 root bus?

Thanks!
  Daniel

-- [1]

pci_bus 0000:00: root bus resource [io  0x0000-0x03af window]
pci_bus 0000:00: root bus resource [io  0x03e0-0x0cf7 window]
pci_bus 0000:00: root bus resource [io  0x03b0-0x03bb window]
pci_bus 0000:00: root bus resource [io  0x03c0-0x03df window]
pci_bus 0000:00: root bus resource [io  0x8000-0xdfff window]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: root bus resource [mem 0xf0000000-0xffffffff window]
pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff window]
pci_bus 0000:00: root bus resource [mem 0x40000000-0xdfffffff window]
pci_bus 0000:00: root bus resource [bus 00-04]

[2] https://resources.numascale.com/DSDT.dsl
[3] https://resources.numascale.com/DSDT-extra.dsl

-- [4]

ACPI: Core revision 20150930
ACPI Error: [_CRS] Namespace lookup failure, AE_ALREADY_EXISTS 
(20150930/dswload-378)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog 
(20150930/psobject-227)
ACPI Exception: AE_ALREADY_EXISTS, [DSDT] table load failed 
(20150930/tbxfload-163)
ACPI Error: [\_PR_.P001] Namespace lookup failure, AE_NOT_FOUND 
(20150930/dswload-210)
ACPI Exception: AE_NOT_FOUND, During name lookup/catalog 
(20150930/psobject-227)
ACPI Exception: AE_NOT_FOUND, (SSDT:POWERNOW) while loading table 
(20150930/tbxfload-193)
ACPI Error: 2 table load failures, 0 successful (20150930/tbxfload-214)
-- 
Daniel J Blueman
Principal Software Engineer, Numascale


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: overriding ACPI _CRS method
  2015-11-29 10:58 overriding ACPI _CRS method Daniel J Blueman
@ 2015-11-30  3:09   ` Zheng, Lv
  0 siblings, 0 replies; 5+ messages in thread
From: Zheng, Lv @ 2015-11-30  3:09 UTC (permalink / raw)
  To: Daniel J Blueman, linux-acpi, LKML; +Cc: Steffen Persvold, Myron Stowe

Hi,

IMO, if you want the new _CRS to be applied during the Linux early boot stage, you can override the table using initrd override or DSDT override mechanism.
Please see Documentation/acpi/initrd_table_override.txt or Documentation/acpi/dsdt-override.txt.

If you want the new _CRS to be applied during Linux runtime, you can override it using method customization mechanism.
Please see Documentation/acpi/method-customizing.txt

Thanks and best regards
-Lv

-----Original Message-----
From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Daniel J Blueman
Sent: Sunday, November 29, 2015 6:59 PM
To: linux-acpi@vger.kernel.org; LKML <linux-kernel@vger.kernel.org>
Cc: Steffen Persvold <sp@numascale.com>; Myron Stowe <myron.stowe@redhat.com>
Subject: overriding ACPI _CRS method

In firmware that is loaded after the BIOS, I need to trim the root bus resource (0x40000000-0xdfffffff) covering the MMIO window [1], so I can attach further PCI domains.

One strategy is to override the BIOS's DSDT [2] _SB.PCI0._CRS method; even when my firmware appends the bytecode for a new _CRS method [3], alas I see AE_ALREADY_EXISTS [4].

I understood methods were overrideable within the same table (eg not from an SSDT), but perhaps am missing something? Or any better approach to reduce the scope of the PCI domain 0000 root bus?

Thanks!
  Daniel

-- [1]

pci_bus 0000:00: root bus resource [io  0x0000-0x03af window] pci_bus 0000:00: root bus resource [io  0x03e0-0x0cf7 window] pci_bus 0000:00: root bus resource [io  0x03b0-0x03bb window] pci_bus 0000:00: root bus resource [io  0x03c0-0x03df window] pci_bus 0000:00: root bus resource [io  0x8000-0xdfff window] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xffffffff window] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff window] pci_bus 0000:00: root bus resource [mem 0x40000000-0xdfffffff window] pci_bus 0000:00: root bus resource [bus 00-04]

[2] https://resources.numascale.com/DSDT.dsl
[3] https://resources.numascale.com/DSDT-extra.dsl

-- [4]

ACPI: Core revision 20150930
ACPI Error: [_CRS] Namespace lookup failure, AE_ALREADY_EXISTS
(20150930/dswload-378)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog
(20150930/psobject-227)
ACPI Exception: AE_ALREADY_EXISTS, [DSDT] table load failed
(20150930/tbxfload-163)
ACPI Error: [\_PR_.P001] Namespace lookup failure, AE_NOT_FOUND
(20150930/dswload-210)
ACPI Exception: AE_NOT_FOUND, During name lookup/catalog
(20150930/psobject-227)
ACPI Exception: AE_NOT_FOUND, (SSDT:POWERNOW) while loading table
(20150930/tbxfload-193)
ACPI Error: 2 table load failures, 0 successful (20150930/tbxfload-214)
--
Daniel J Blueman
Principal Software Engineer, Numascale

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: overriding ACPI _CRS method
@ 2015-11-30  3:09   ` Zheng, Lv
  0 siblings, 0 replies; 5+ messages in thread
From: Zheng, Lv @ 2015-11-30  3:09 UTC (permalink / raw)
  To: Daniel J Blueman, linux-acpi, LKML; +Cc: Steffen Persvold, Myron Stowe

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3163 bytes --]

Hi,

IMO, if you want the new _CRS to be applied during the Linux early boot stage, you can override the table using initrd override or DSDT override mechanism.
Please see Documentation/acpi/initrd_table_override.txt or Documentation/acpi/dsdt-override.txt.

If you want the new _CRS to be applied during Linux runtime, you can override it using method customization mechanism.
Please see Documentation/acpi/method-customizing.txt

Thanks and best regards
-Lv

-----Original Message-----
From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Daniel J Blueman
Sent: Sunday, November 29, 2015 6:59 PM
To: linux-acpi@vger.kernel.org; LKML <linux-kernel@vger.kernel.org>
Cc: Steffen Persvold <sp@numascale.com>; Myron Stowe <myron.stowe@redhat.com>
Subject: overriding ACPI _CRS method

In firmware that is loaded after the BIOS, I need to trim the root bus resource (0x40000000-0xdfffffff) covering the MMIO window [1], so I can attach further PCI domains.

One strategy is to override the BIOS's DSDT [2] _SB.PCI0._CRS method; even when my firmware appends the bytecode for a new _CRS method [3], alas I see AE_ALREADY_EXISTS [4].

I understood methods were overrideable within the same table (eg not from an SSDT), but perhaps am missing something? Or any better approach to reduce the scope of the PCI domain 0000 root bus?

Thanks!
  Daniel

-- [1]

pci_bus 0000:00: root bus resource [io  0x0000-0x03af window] pci_bus 0000:00: root bus resource [io  0x03e0-0x0cf7 window] pci_bus 0000:00: root bus resource [io  0x03b0-0x03bb window] pci_bus 0000:00: root bus resource [io  0x03c0-0x03df window] pci_bus 0000:00: root bus resource [io  0x8000-0xdfff window] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xffffffff window] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff window] pci_bus 0000:00: root bus resource [mem 0x40000000-0xdfffffff window] pci_bus 0000:00: root bus resource [bus 00-04]

[2] https://resources.numascale.com/DSDT.dsl
[3] https://resources.numascale.com/DSDT-extra.dsl

-- [4]

ACPI: Core revision 20150930
ACPI Error: [_CRS] Namespace lookup failure, AE_ALREADY_EXISTS
(20150930/dswload-378)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog
(20150930/psobject-227)
ACPI Exception: AE_ALREADY_EXISTS, [DSDT] table load failed
(20150930/tbxfload-163)
ACPI Error: [\_PR_.P001] Namespace lookup failure, AE_NOT_FOUND
(20150930/dswload-210)
ACPI Exception: AE_NOT_FOUND, During name lookup/catalog
(20150930/psobject-227)
ACPI Exception: AE_NOT_FOUND, (SSDT:POWERNOW) while loading table
(20150930/tbxfload-193)
ACPI Error: 2 table load failures, 0 successful (20150930/tbxfload-214)
--
Daniel J Blueman
Principal Software Engineer, Numascale

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: overriding ACPI _CRS method
  2015-11-30  3:09   ` Zheng, Lv
  (?)
@ 2015-11-30  3:23   ` Daniel J Blueman
  2015-12-21  7:59     ` Jon Masters
  -1 siblings, 1 reply; 5+ messages in thread
From: Daniel J Blueman @ 2015-11-30  3:23 UTC (permalink / raw)
  To: Zheng, Lv; +Cc: linux-acpi, LKML, Steffen Persvold, Myron Stowe

On Mon, Nov 30, 2015 at 11:09 AM, Zheng, Lv <lv.zheng@intel.com> wrote:
> Hi,
> 
> IMO, if you want the new _CRS to be applied during the Linux early 
> boot stage, you can override the table using initrd override or DSDT 
> override mechanism.
> Please see Documentation/acpi/initrd_table_override.txt or 
> Documentation/acpi/dsdt-override.txt.
> 
> If you want the new _CRS to be applied during Linux runtime, you can 
> override it using method customization mechanism.
> Please see Documentation/acpi/method-customizing.txt

The reason I'm trying to adjust this in firmware, is to deliver the 
right behaviour with pre-built/distro kernels, so I can't use that 
approach.

Thanks Lv,
  Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: overriding ACPI _CRS method
  2015-11-30  3:23   ` Daniel J Blueman
@ 2015-12-21  7:59     ` Jon Masters
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Masters @ 2015-12-21  7:59 UTC (permalink / raw)
  To: Daniel J Blueman, Zheng, Lv
  Cc: linux-acpi, LKML, Steffen Persvold, Myron Stowe

On 11/29/15, 10:23 PM, Daniel J Blueman wrote:
> On Mon, Nov 30, 2015 at 11:09 AM, Zheng, Lv <lv.zheng@intel.com> wrote:
>> Hi,
>>
>> IMO, if you want the new _CRS to be applied during the Linux early
>> boot stage, you can override the table using initrd override or DSDT
>> override mechanism.
>> Please see Documentation/acpi/initrd_table_override.txt or
>> Documentation/acpi/dsdt-override.txt.
>>
>> If you want the new _CRS to be applied during Linux runtime, you can
>> override it using method customization mechanism.
>> Please see Documentation/acpi/method-customizing.txt
>
> The reason I'm trying to adjust this in firmware, is to deliver the
> right behaviour with pre-built/distro kernels, so I can't use that
> approach.

The initrd method prepends an override initrd so you can use the stock 
distro one (obviously any such modification might impact whether a 
system vendor will support you in any case). This is in fact why I use 
an initrd override method on ARM servers to test ACPI fixes.

The other option you have is to use the "acpi" command in GRUB to 
provide an override set of tables pre-OS boot. Depending upon your OS, 
you might need to regenerate your (dracut) initramfs with that via the 
GRUB configuration file(s).

Jon.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-21  7:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-29 10:58 overriding ACPI _CRS method Daniel J Blueman
2015-11-30  3:09 ` Zheng, Lv
2015-11-30  3:09   ` Zheng, Lv
2015-11-30  3:23   ` Daniel J Blueman
2015-12-21  7:59     ` Jon Masters

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.