Skip to contentSkip to conversation

Build error iasl/dsdt after commit "hvmloader: also cover PCI MMIO ranges above 4G with UC MTRR ranges"

DISCUSSION Sander Eikelenboom 3 participants 8 messages May 21, 2014 – May 22, 2014

lore
Share & tools
lore
#0 lore raw

Hi Jan,

It seems commit "d06886694328a31369addc1f614cf326728d65a6:
"hvmloader: also cover PCI MMIO ranges above 4G with UC MTRR ranges" causes the build error below.

In case it's relevant it's with iasl from debian wheezy, which is version: iasl 20100528-3 --
Sander

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
sed -e 's/AmlCode/ssdt_tpm/g' ssdt_tpm.hex >ssdt_tpm.h
rm -f ssdt_tpm.hex ssdt_tpm.aml
gcc -O1 -fno-omit-frame-pointer -m32 -march=i686 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -D__XEN_TOOLS__ -MMD -MF .build.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -mno-tls-direct-seg-refs -Werror -fno-stack-protector -fno-exceptions -fno-builtin -msoft-float -I/usr/src/new/xen-unstable/tools/firmware/hvmloader/acpi/../../../../tools/include -c -o build.o build.c
gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/src/new/xen-unstable/tools/firmware/hvmloader/acpi/../../../../tools/include -o mk_dsdt mk_dsdt.c awk 'NR > 1 {print s} {s=$0}' dsdt.asl > dsdt_anycpu.asl
./mk_dsdt --maxcpu any >> dsdt_anycpu.asl
iasl -vs -p dsdt_anycpu -tc dsdt_anycpu.asl
dsdt_anycpu.asl 165: 0x0000000000000000,
Error 4122 - ^ Invalid combination of Length and Min/Max fixed flags

ASL Input: dsdt_anycpu.asl - 10985 lines, 388387 bytes, 7984 keywords Compilation complete. 1 Errors, 0 Warnings, 0 Remarks, 2627 Optimizations make[8]: *** [dsdt_anycpu.c] Error 255

#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 21.05.14 at 20:58, <[email protected]> wrote:

It seems commit "d06886694328a31369addc1f614cf326728d65a6:
"hvmloader: also cover PCI MMIO ranges above 4G with UC MTRR ranges" causes the build error below.

In case it's relevant it's with iasl from debian wheezy, which is version:
iasl 20100528-3

I tried a variety of iasl-s (ranging from 2006 to 2012), with none of them triggering this. So I'm afraid this is a bug of the specific iasl in Wheezy - I'm not sure how to deal with that. Furthermore, as already indicated in a reply to an inquiry on it by Ian C, I'm having a physical machine here with exactly the same QWordMemory() template, so all zeros in there can't be entirely wrong. While we overwrite all three fields (HMIN, HMAX, and HLEN) anyway, I'm not sure putting in some random range deemed valid by that specific tool version is a good idea. But to help with the decision, could you try whether that

                    QWordMemory (
                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
                        NonCacheable, ReadWrite,
                        0x0000000000000000,
                        0x0000000fffffffff,
                        0x0000001000000000,
                        0x0000000000000000,
                        0x0000000000000001,
                        ,, _Y02)

would at least help?

Jan

#2 lore raw
Quoted 11 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 21.05.14 at 20:58, <[email protected]> wrote:

It seems commit "d06886694328a31369addc1f614cf326728d65a6:
"hvmloader: also cover PCI MMIO ranges above 4G with UC MTRR ranges" causes the build error below.

In case it's relevant it's with iasl from debian wheezy, which is version:
iasl 20100528-3

I tried a variety of iasl-s (ranging from 2006 to 2012), with none of them triggering this. So I'm afraid this is a bug of the specific iasl in Wheezy - I'm not sure how to deal with that.

FWIW I can reproduce on a Wheezy machine. The automated tests run under Wheezy so this is probably going to block testing.

I think the chances of getting Wheezy fixed are pretty minimal, at least soon. I think we will probably have to work around it.

Quoted 19 lines

Furthermore, as already
indicated in a reply to an inquiry on it by Ian C, I'm having a physical machine here with exactly the same QWordMemory() template, so all zeros in there can't be entirely wrong. While we overwrite all three fields (HMIN, HMAX, and HLEN) anyway, I'm not sure putting in some random range deemed valid by that specific tool version is a good idea. But to help with the decision, could you try whether that

                    QWordMemory (
                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
                        NonCacheable, ReadWrite,
                        0x0000000000000000,
                        0x0000000fffffffff,
                        0x0000001000000000,
                        0x0000000000000000,
                        0x0000000000000001,
                        ,, _Y02)
Quoted 1 line

would at least help?

Unfortunately not:
dsdt_anycpu.asl 164: 0x0000000000000001,
Error 4118 - Length is not equal to fixed Min/Max window ^

I also tried ...ffffffc + 4 and ..fffff8 + 8 in case it was a alignment requirement or something, but apparently not since it didn't help.

I also tried a 100000000-100000001 span, no joy.

This worked though:

                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000001000000000,
                         0x000000100000000f,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

But this doesn't:

                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000001000000000,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

Ian.

#3 lore raw
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 11:16, <[email protected]> wrote:

This worked though:

                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000001000000000,
                         0x000000100000000f,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

But this doesn't:

Quoted 9 lines
                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000001000000000,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

That last one is one off - the end address ought to be fffffffff. If that works, it would still end up being an alignment issue... (The reason for picking the original numbers was that I want the range as far off as possible, but also not beyond the default 36-bit boundary. Minus eventual alignment requirements I'd like to stick to that.)

Jan

Jan

#4 lore raw
Quoted 23 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 11:16, <[email protected]> wrote:

This worked though:

                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000001000000000,
                         0x000000100000000f,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

But this doesn't:

Quoted 9 lines
                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000001000000000,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)
Quoted 2 lines

That last one is one off - the end address ought to be fffffffff. If that works, it would still end up being an alignment issue...

Ah yes. this works:

                 QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000000fffffffff,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

Ian.

#5 lore raw
Quoted 29 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 11:56, <[email protected]> wrote:
Quoted 23 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 11:16, <[email protected]> wrote:

This worked though:

                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000001000000000,
                         0x000000100000000f,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

But this doesn't:

Quoted 9 lines
                  QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000001000000000,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)
Quoted 2 lines

That last one is one off - the end address ought to be fffffffff. If that works, it would still end up being an alignment issue...

Ah yes. this works:

Quoted 9 lines
                 QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000000fffffffff,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)

Good. Are you okay with an incremental fix (once tested), or should I revert?

Jan

#6 lore raw
Quoted 12 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 11:56, <[email protected]> wrote:

Ah yes. this works:

                 QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000000fffffffff,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)
Quoted 2 lines

Good. Are you okay with an incremental fix (once tested), or should I revert?

Incremental is fine by me. In fact for a patch which changes to the
above: Acked-by: Ian Campbell <[email protected]>

Ian.

#7 lore raw
Quoted 14 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 12:12, <[email protected]> wrote:
Quoted 12 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 22.05.14 at 11:56, <[email protected]> wrote:

Ah yes. this works:

                 QWordMemory (
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         NonCacheable, ReadWrite,
                         0x0000000000000000,
                         0x0000000ffffffff0,
                         0x0000000fffffffff,
                         0x0000000000000000,
                         0x0000000000000010,
                         ,, _Y02)
Quoted 5 lines
Quoted 2 lines

Good. Are you okay with an incremental fix (once tested), or should I revert?

Incremental is fine by me. In fact for a patch which changes to the
above: Acked-by: Ian Campbell <[email protected]>

Thanks, committed and pushed.

Jan