* region size computed incorrectly
@ 2003-08-16 15:56 Albert Cahalan
0 siblings, 0 replies; 3+ messages in thread
From: Albert Cahalan @ 2003-08-16 15:56 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Consider the following chunk of code, produced by
the Intel disassembler:
Device (HPET)
{
Name (_HID, EisaId ("PNP0103"))
Name (_CRS, ResourceTemplate ()
{
IRQNoFlags () {0}
IRQNoFlags () {8}
Memory32Fixed (ReadOnly, 0xFEC01000, 0x00000400)
})
OperationRegion (^LPCR, PCI_Config, 0xA0, 0x04)
Field (^LPCR, AnyAcc, NoLock, Preserve)
{
HPTE, 32
}
Method (_STA, 0, NotSerialized)
{
And (HPTE, 0x01, Local0)
If (Local0)
{
Return (0x0F)
}
Return (0x00)
}
}
There we have a 4-byte OperationRegion with a 32-bit
field called HPTE. That fits. Then, in _STA, HPTE is
read, and linux-2.6.0-test3 spits out errors:
ACPI: Subsystem revision 20030714
tbxface-0117 [03] acpi_load_tables : ACPI Tables successfully acquired
Parsing all Control Methods:.........................................................................................................................................
Table [DSDT](id F004) - 446 Objects with 42 Devices 137 Methods 13 Regions
ACPI Namespace successfully loaded at root ffffffff80590780
evxfevnt-0093 [04] acpi_enable : Transition to ACPI mode successful
evgpeblk-0748 [06] ev_create_gpe_block : GPE 00 to 15 [_GPE] 2 regs at 0000000000005020 on int 9
evgpeblk-0748 [06] ev_create_gpe_block : GPE 16 to 47 [_GPE] 4 regs at 00000000000050B0 on int 9
Completing Region/Field/Buffer/Package initialization:............................................................................................
Initialized 12/14 Regions 26/26 Fields 38/38 Buffers 16/16 Packages (455 nodes)
Executing all Device _STA and_INI methods:...................... exfldio-0129 [23] ex_setup_region : Field [HPTE] access width (1 bytes) too large for region [LPCR] (length 0)
exfldio-0140 [23] ex_setup_region : Field [HPTE] Base+Offset+Width 0+0+1 is beyond end of region [LPCR] (length 0)
dswexec-0422 [15] ds_exec_end_op : [And]: Could not resolve operands, AE_AML_REGION_LIMIT
psparse-1121: *** Error: Method execution failed [\_SB_.PCI0.SBRG.HPET._STA] (Node 00000100081d36f0), AE_AML_REGION_LIMIT
uteval-0098: *** Error: Method execution failed [\_SB_.PCI0.SBRG.HPET._STA] (Node 00000100081d36f0), AE_AML_REGION_LIMIT
.....................
43 Devices found containing: 42 _STA, 0 _INI methods
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
exfldio-0129 [21] ex_setup_region : Field [HPTE] access width (1 bytes) too large for region [LPCR] (length 0)
exfldio-0140 [21] ex_setup_region : Field [HPTE] Base+Offset+Width 0+0+1 is beyond end of region [LPCR] (length 0)
dswexec-0422 [13] ds_exec_end_op : [And]: Could not resolve operands, AE_AML_REGION_LIMIT
psparse-1121: *** Error: Method execution failed [\_SB_.PCI0.SBRG.HPET._STA] (Node 00000100081d36f0), AE_AML_REGION_LIMIT
Somehow, the LPCR region is being seen as length 0.
This is not correct; it is 4 bytes wide. Until the
boundry checking is fixed, it should be disabled.
Even then, a minor overflow should just printk() a
warning and keep on going.
BTW, what is a PNP0103 device?
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: region size computed incorrectly
@ 2003-08-18 19:49 Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A8470255EEDA-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Grover, Andrew @ 2003-08-18 19:49 UTC (permalink / raw)
To: Albert Cahalan, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Moore, Robert
I was able to reproduce this. Putting LPCR in the HPET scope instead of
the parent scope (by removing the ^s) seems to be a temporary
workaround. We appear to be creating 2 LPCR objects, 1 of which is
initialized correctly and 1 which is zeroed out. We look at the
not-initialized one, and throw errors.
BTW PNP0103 is the HPET, High Precision Event Timer. I don't know how
people are supposed to request PNP IDs these days, but the HPET spec
says 0103, so I guess they got it. :)
Regards -- Andy
> -----Original Message-----
> From: Albert Cahalan [mailto:albert-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]
> Sent: Saturday, August 16, 2003 8:57 AM
> To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [ACPI] region size computed incorrectly
>
>
> Consider the following chunk of code, produced by
> the Intel disassembler:
>
> Device (HPET)
> {
> Name (_HID, EisaId ("PNP0103"))
> Name (_CRS, ResourceTemplate ()
> {
> IRQNoFlags () {0}
> IRQNoFlags () {8}
> Memory32Fixed (ReadOnly, 0xFEC01000,
> 0x00000400)
> })
> OperationRegion (^LPCR, PCI_Config, 0xA0, 0x04)
> Field (^LPCR, AnyAcc, NoLock, Preserve)
> {
> HPTE, 32
> }
>
> Method (_STA, 0, NotSerialized)
> {
> And (HPTE, 0x01, Local0)
> If (Local0)
> {
> Return (0x0F)
> }
>
> Return (0x00)
> }
> }
>
>
> There we have a 4-byte OperationRegion with a 32-bit
> field called HPTE. That fits. Then, in _STA, HPTE is
> read, and linux-2.6.0-test3 spits out errors:
>
>
> ACPI: Subsystem revision 20030714
> tbxface-0117 [03] acpi_load_tables : ACPI Tables
> successfully acquired
> Parsing all Control
> Methods:......................................................
> ..............................................................
> .....................
> Table [DSDT](id F004) - 446 Objects with 42 Devices 137
> Methods 13 Regions
> ACPI Namespace successfully loaded at root ffffffff80590780
> evxfevnt-0093 [04] acpi_enable : Transition to ACPI
> mode successful
> evgpeblk-0748 [06] ev_create_gpe_block : GPE 00 to 15
> [_GPE] 2 regs at 0000000000005020 on int 9
> evgpeblk-0748 [06] ev_create_gpe_block : GPE 16 to 47
> [_GPE] 4 regs at 00000000000050B0 on int 9
> Completing Region/Field/Buffer/Package
> initialization:...............................................
> .............................................
> Initialized 12/14 Regions 26/26 Fields 38/38 Buffers 16/16
> Packages (455 nodes)
> Executing all Device _STA and_INI
> methods:...................... exfldio-0129 [23]
> ex_setup_region : Field [HPTE] access width (1 bytes)
> too large for region [LPCR] (length 0)
> exfldio-0140 [23] ex_setup_region : Field [HPTE]
> Base+Offset+Width 0+0+1 is beyond end of region [LPCR] (length 0)
> dswexec-0422 [15] ds_exec_end_op : [And]: Could not
> resolve operands, AE_AML_REGION_LIMIT
> psparse-1121: *** Error: Method execution failed
> [\_SB_.PCI0.SBRG.HPET._STA] (Node 00000100081d36f0),
> AE_AML_REGION_LIMIT
> uteval-0098: *** Error: Method execution failed
> [\_SB_.PCI0.SBRG.HPET._STA] (Node 00000100081d36f0),
> AE_AML_REGION_LIMIT
> .....................
> 43 Devices found containing: 42 _STA, 0 _INI methods
> ACPI: Interpreter enabled
> ACPI: Using IOAPIC for interrupt routing
> ACPI: PCI Root Bridge [PCI0] (00:00)
> PCI: Probing PCI hardware (bus 00)
> ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
> ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
> exfldio-0129 [21] ex_setup_region : Field [HPTE]
> access width (1 bytes) too large for region [LPCR] (length 0)
> exfldio-0140 [21] ex_setup_region : Field [HPTE]
> Base+Offset+Width 0+0+1 is beyond end of region [LPCR] (length 0)
> dswexec-0422 [13] ds_exec_end_op : [And]: Could not
> resolve operands, AE_AML_REGION_LIMIT
> psparse-1121: *** Error: Method execution failed
> [\_SB_.PCI0.SBRG.HPET._STA] (Node 00000100081d36f0),
> AE_AML_REGION_LIMIT
>
>
> Somehow, the LPCR region is being seen as length 0.
> This is not correct; it is 4 bytes wide. Until the
> boundry checking is fixed, it should be disabled.
> Even then, a minor overflow should just printk() a
> warning and keep on going.
>
> BTW, what is a PNP0103 device?
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet
> _072303_01/01
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-09-01 4:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-16 15:56 region size computed incorrectly Albert Cahalan
-- strict thread matches above, loose matches on Subject: below --
2003-08-18 19:49 Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A8470255EEDA-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-09-01 4:19 ` Albert Cahalan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox