[SeaBIOS] [PATCH] acpi: parse Alias object

Igor Mammedov posted 1 patch 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20221118142755.3879231-1-imammedo@redhat.com
src/fw/dsdt_parser.c | 4 ++++
1 file changed, 4 insertions(+)
[SeaBIOS] [PATCH] acpi: parse Alias object
Posted by Igor Mammedov 1 week, 3 days ago
Since QEMU commit
  dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)
SeaBIOS fails to parse ISA bridge AML with:

   parse_termlist: parse error, skip from 92/517
   ...
   ACPI: no PS/2 keyboard present

due to Alias term in DSDT which isn't handled by SeaBIOS properly.
Add dumb Alias parsing which just skips over term,
so the rest of AML could be parsed successfully.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reported-by: Volker Rümelin <vr_qemu@t-online.de>
---
 src/fw/dsdt_parser.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/fw/dsdt_parser.c b/src/fw/dsdt_parser.c
index eb5496f3..2ac82821 100644
--- a/src/fw/dsdt_parser.c
+++ b/src/fw/dsdt_parser.c
@@ -417,6 +417,10 @@ static int parse_termobj(struct parse_state *s,
         break;
     case 0x01: /* one */
         break;
+    case 0x06: /* AliasOp */
+        offset += parse_namestring(s, ptr + offset, "SourceObject");
+        offset += parse_namestring(s, ptr + offset, "AliasObject");
+        break;
     case 0x08: /* name op */
         offset += parse_namestring(s, ptr + offset, "name");
         offset += parse_termobj(s, ptr + offset);
-- 
2.31.1

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Volker Rümelin 6 days, 9 hours ago
> Since QEMU commit
>    dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)

The commit dbce582a119 doesn't exist in the QEMU repository. It's commit 
47a373faa6.

With best regards,
Volker

> SeaBIOS fails to parse ISA bridge AML with:
>
>     parse_termlist: parse error, skip from 92/517
>     ...
>     ACPI: no PS/2 keyboard present
>
> due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> Add dumb Alias parsing which just skips over term,
> so the rest of AML could be parsed successfully.
>
> Signed-off-by: Igor Mammedov<imammedo@redhat.com>
> Reported-by: Volker Rümelin<vr_qemu@t-online.de>
> ---
>   src/fw/dsdt_parser.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/src/fw/dsdt_parser.c b/src/fw/dsdt_parser.c
> index eb5496f3..2ac82821 100644
> --- a/src/fw/dsdt_parser.c
> +++ b/src/fw/dsdt_parser.c
> @@ -417,6 +417,10 @@ static int parse_termobj(struct parse_state *s,
>           break;
>       case 0x01: /* one */
>           break;
> +    case 0x06: /* AliasOp */
> +        offset += parse_namestring(s, ptr + offset, "SourceObject");
> +        offset += parse_namestring(s, ptr + offset, "AliasObject");
> +        break;
>       case 0x08: /* name op */
>           offset += parse_namestring(s, ptr + offset, "name");
>           offset += parse_termobj(s, ptr + offset);

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Igor Mammedov 4 days, 16 hours ago
On Tue, 22 Nov 2022 20:05:38 +0100
Volker Rümelin <vr_qemu@t-online.de> wrote:

> > Since QEMU commit
> >    dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)  
> 
> The commit dbce582a119 doesn't exist in the QEMU repository. It's commit 
> 47a373faa6.

Right, I must have grabbed id from another branch

Gerd,
Can you fix up commit message when applying or should I respin patch?

> 
> With best regards,
> Volker
> 
> > SeaBIOS fails to parse ISA bridge AML with:
> >
> >     parse_termlist: parse error, skip from 92/517
> >     ...
> >     ACPI: no PS/2 keyboard present
> >
> > due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> > Add dumb Alias parsing which just skips over term,
> > so the rest of AML could be parsed successfully.
> >
> > Signed-off-by: Igor Mammedov<imammedo@redhat.com>
> > Reported-by: Volker Rümelin<vr_qemu@t-online.de>
> > ---
> >   src/fw/dsdt_parser.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/src/fw/dsdt_parser.c b/src/fw/dsdt_parser.c
> > index eb5496f3..2ac82821 100644
> > --- a/src/fw/dsdt_parser.c
> > +++ b/src/fw/dsdt_parser.c
> > @@ -417,6 +417,10 @@ static int parse_termobj(struct parse_state *s,
> >           break;
> >       case 0x01: /* one */
> >           break;
> > +    case 0x06: /* AliasOp */
> > +        offset += parse_namestring(s, ptr + offset, "SourceObject");
> > +        offset += parse_namestring(s, ptr + offset, "AliasObject");
> > +        break;
> >       case 0x08: /* name op */
> >           offset += parse_namestring(s, ptr + offset, "name");
> >           offset += parse_termobj(s, ptr + offset);  
> 

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Gerd Hoffmann 4 days, 15 hours ago
On Thu, Nov 24, 2022 at 01:51:44PM +0100, Igor Mammedov wrote:
> On Tue, 22 Nov 2022 20:05:38 +0100
> Volker Rümelin <vr_qemu@t-online.de> wrote:
> 
> > > Since QEMU commit
> > >    dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)  
> > 
> > The commit dbce582a119 doesn't exist in the QEMU repository. It's commit 
> > 47a373faa6.
> 
> Right, I must have grabbed id from another branch
> 
> Gerd,
> Can you fix up commit message when applying or should I respin patch?

It's already committed (with id fixed).

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Gerd Hoffmann 1 week ago
On Fri, Nov 18, 2022 at 03:27:55PM +0100, Igor Mammedov wrote:
> Since QEMU commit
>   dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)
> SeaBIOS fails to parse ISA bridge AML with:
> 
>    parse_termlist: parse error, skip from 92/517
>    ...
>    ACPI: no PS/2 keyboard present
> 
> due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> Add dumb Alias parsing which just skips over term,
> so the rest of AML could be parsed successfully.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> Reported-by: Volker Rümelin <vr_qemu@t-online.de>

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Kevin O'Connor 6 days, 10 hours ago
On Mon, Nov 21, 2022 at 11:12:55AM +0100, Gerd Hoffmann wrote:
> On Fri, Nov 18, 2022 at 03:27:55PM +0100, Igor Mammedov wrote:
> > Since QEMU commit
> >   dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)
> > SeaBIOS fails to parse ISA bridge AML with:
> > 
> >    parse_termlist: parse error, skip from 92/517
> >    ...
> >    ACPI: no PS/2 keyboard present
> > 
> > due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> > Add dumb Alias parsing which just skips over term,
> > so the rest of AML could be parsed successfully.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > Reported-by: Volker Rümelin <vr_qemu@t-online.de>
> 
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

Thanks.  Looks fine to me as well.

Gerd - feel free to commit this (and the virtio changes as well) when
you feel they are ready.

FWIW, if we want a release in the short term, I'd suggest making a
v1.16.1 "stable" release.

-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Gerd Hoffmann 5 days, 18 hours ago
On Tue, Nov 22, 2022 at 01:32:20PM -0500, Kevin O'Connor wrote:
> On Mon, Nov 21, 2022 at 11:12:55AM +0100, Gerd Hoffmann wrote:
> > On Fri, Nov 18, 2022 at 03:27:55PM +0100, Igor Mammedov wrote:
> > > Since QEMU commit
> > >   dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)
> > > SeaBIOS fails to parse ISA bridge AML with:
> > > 
> > >    parse_termlist: parse error, skip from 92/517
> > >    ...
> > >    ACPI: no PS/2 keyboard present
> > > 
> > > due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> > > Add dumb Alias parsing which just skips over term,
> > > so the rest of AML could be parsed successfully.
> > > 
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > > Reported-by: Volker Rümelin <vr_qemu@t-online.de>
> > 
> > Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
> 
> Thanks.  Looks fine to me as well.
> 
> Gerd - feel free to commit this (and the virtio changes as well) when
> you feel they are ready.

Done.

> FWIW, if we want a release in the short term, I'd suggest making a
> v1.16.1 "stable" release.

Well.  Currently we have ...

    # git log --oneline rel-1.16.0..
    3208b098f51a virtio: finalize features before using device
    5ea5c64c20e9 virtio-mmio: read/write the hi 32 features for mmio
    61e901bbaadf acpi: parse Alias object
    85d56f812f4d virtio-blk: Fix incorrect type conversion in virtio_blk_op()
    46de2eec93bf virtio-blk: use larger default request size
    dc88f9b72df5 malloc: use large ZoneHigh when there is enough memory
    3b91e8e9fe93 malloc: use variable for ZoneHigh size
    01774004c7f7 reset: force standard PCI configuration access
    d24f42b0d819 pci: refactor the pci_config_*() functions

... where most changes (all except the two 'malloc' patches)
are bugfixes.  Cherry-picking 7/9 patches into 1.16.1 feels
somewhat silly.  Just grabbing a master branch snapshot looks
like the simpler solution here.

Independent from that I think it makes sense to plan a new 1.17.0
release.

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Kevin O'Connor 5 days, 12 hours ago
On Wed, Nov 23, 2022 at 11:11:03AM +0100, Gerd Hoffmann wrote:
> On Tue, Nov 22, 2022 at 01:32:20PM -0500, Kevin O'Connor wrote:
> > FWIW, if we want a release in the short term, I'd suggest making a
> > v1.16.1 "stable" release.
> 
> Well.  Currently we have ...
> 
>     # git log --oneline rel-1.16.0..
>     3208b098f51a virtio: finalize features before using device
>     5ea5c64c20e9 virtio-mmio: read/write the hi 32 features for mmio
>     61e901bbaadf acpi: parse Alias object
>     85d56f812f4d virtio-blk: Fix incorrect type conversion in virtio_blk_op()
>     46de2eec93bf virtio-blk: use larger default request size
>     dc88f9b72df5 malloc: use large ZoneHigh when there is enough memory
>     3b91e8e9fe93 malloc: use variable for ZoneHigh size
>     01774004c7f7 reset: force standard PCI configuration access
>     d24f42b0d819 pci: refactor the pci_config_*() functions
> 
> ... where most changes (all except the two 'malloc' patches)
> are bugfixes.  Cherry-picking 7/9 patches into 1.16.1 feels
> somewhat silly.  Just grabbing a master branch snapshot looks
> like the simpler solution here.

Well, FWIW, I don't see an issue with tagging the master branch as
v1.16.1 .

> Independent from that I think it makes sense to plan a new 1.17.0
> release.

I'm also fine with making a v1.17.0 release.  I'd prefer to schedule
that though and I'm not sure the timeframe would meet the qemu release
goals.

Cheers,
-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Gerd Hoffmann 4 days, 15 hours ago
On Wed, Nov 23, 2022 at 11:52:29AM -0500, Kevin O'Connor wrote:
> On Wed, Nov 23, 2022 at 11:11:03AM +0100, Gerd Hoffmann wrote:
> > 
> > Well.  Currently we have ...
> > 
> >     # git log --oneline rel-1.16.0..
> >     3208b098f51a virtio: finalize features before using device
> >     5ea5c64c20e9 virtio-mmio: read/write the hi 32 features for mmio
> >     61e901bbaadf acpi: parse Alias object
> >     85d56f812f4d virtio-blk: Fix incorrect type conversion in virtio_blk_op()
> >     46de2eec93bf virtio-blk: use larger default request size
> >     dc88f9b72df5 malloc: use large ZoneHigh when there is enough memory
> >     3b91e8e9fe93 malloc: use variable for ZoneHigh size
> >     01774004c7f7 reset: force standard PCI configuration access
> >     d24f42b0d819 pci: refactor the pci_config_*() functions
> > 
> > ... where most changes (all except the two 'malloc' patches)
> > are bugfixes.  Cherry-picking 7/9 patches into 1.16.1 feels
> > somewhat silly.  Just grabbing a master branch snapshot looks
> > like the simpler solution here.
> 
> Well, FWIW, I don't see an issue with tagging the master branch as
> v1.16.1 .

Ok, lets do that then.  I'll go tag 1.16.1 next monday unless someone
raises objections.  Next qemu -rc is planned for tuesday.

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Michael S. Tsirkin 1 week ago
On Mon, Nov 21, 2022 at 11:12:55AM +0100, Gerd Hoffmann wrote:
> On Fri, Nov 18, 2022 at 03:27:55PM +0100, Igor Mammedov wrote:
> > Since QEMU commit
> >   dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)
> > SeaBIOS fails to parse ISA bridge AML with:
> > 
> >    parse_termlist: parse error, skip from 92/517
> >    ...
> >    ACPI: no PS/2 keyboard present
> > 
> > due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> > Add dumb Alias parsing which just skips over term,
> > so the rest of AML could be parsed successfully.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > Reported-by: Volker Rümelin <vr_qemu@t-online.de>
> 
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

Gerd do you think this is doable for this QEMU release?
Or do we need a workaround in QEMU?

-- 
MST

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] acpi: parse Alias object
Posted by Igor Mammedov 1 week ago
On Mon, 21 Nov 2022 05:22:40 -0500
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Nov 21, 2022 at 11:12:55AM +0100, Gerd Hoffmann wrote:
> > On Fri, Nov 18, 2022 at 03:27:55PM +0100, Igor Mammedov wrote:  
> > > Since QEMU commit
> > >   dbce582a119 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML)
> > > SeaBIOS fails to parse ISA bridge AML with:
> > > 
> > >    parse_termlist: parse error, skip from 92/517
> > >    ...
> > >    ACPI: no PS/2 keyboard present
> > > 
> > > due to Alias term in DSDT which isn't handled by SeaBIOS properly.
> > > Add dumb Alias parsing which just skips over term,
> > > so the rest of AML could be parsed successfully.
> > > 
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > > Reported-by: Volker Rümelin <vr_qemu@t-online.de>  
> > 
> > Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>  
> 
> Gerd do you think this is doable for this QEMU release?
> Or do we need a workaround in QEMU?

I saw that there was another fix which you wanted in qemu-7.2,
perhaps having to fixes pending it might justify unplanned
release to go with qemu-7.2.

PS:
I have workaround almost ready for posting,
but if we can ship fixed SeaBIOS it would be better.

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org