public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Arvind Chauhan <Arvind.Chauhan@arm.com>,
	 Daniil Egranov <Daniil.Egranov@arm.com>,
	Thomas Abraham <thomas.abraham@arm.com>,
	 Leif Lindholm <leif.lindholm@linaro.org>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	 Alexei Fedorov <Alexei.Fedorov@arm.com>,
	Matteo Carlini <Matteo.Carlini@arm.com>,
	 Stephanie Hughes-Fitt <Stephanie.Hughes-Fitt@arm.com>,
	nd <nd@arm.com>
Subject: Re: [PATCH edk2-platforms v1 5/6] Platform/ARM: Add OEM CPU generator for FVP
Date: Tue, 22 Jan 2019 10:21:55 +0100	[thread overview]
Message-ID: <CAKv+Gu-DwU+wmyhLgQhYmy3pzHW7eC8xQTwiQ8HfJh6b_GoADw@mail.gmail.com> (raw)
In-Reply-To: <DB6PR0802MB23756D1F5AD07D4B048D889784B80@DB6PR0802MB2375.eurprd08.prod.outlook.com>

On Fri, 21 Dec 2018 at 19:14, Sami Mujawar <Sami.Mujawar@arm.com> wrote:
>
> Hi Ard,
>
> Please see my response inline.
>
> Regards,
>
> Sami Mujawar
>
> -----Original Message-----
> From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Sent: 21 December 2018 05:08 PM
> To: Sami Mujawar <Sami.Mujawar@arm.com>
> Cc: edk2-devel@lists.01.org; Arvind Chauhan <Arvind.Chauhan@arm.com>; Daniil Egranov <Daniil.Egranov@arm.com>; Thomas Abraham <thomas.abraham@arm.com>; Leif Lindholm <leif.lindholm@linaro.org>; Kinney, Michael D <michael.d.kinney@intel.com>; Alexei Fedorov <Alexei.Fedorov@arm.com>; Matteo Carlini <Matteo.Carlini@arm.com>; Stephanie Hughes-Fitt <Stephanie.Hughes-Fitt@arm.com>; nd <nd@arm.com>
> Subject: Re: [PATCH edk2-platforms v1 5/6] Platform/ARM: Add OEM CPU generator for FVP
>
> Hi Sami,
>
> On Fri, 21 Dec 2018 at 18:01, Sami Mujawar <sami.mujawar@arm.com> wrote:
> >
> > Add support for dynamic generation of ACPI CPU device information.
> > This generator uses the compiled data from a template asl file and
> > patches it at runtime to generate the CPU information based on the
> > number of CPUs and their ACPI UID. This patched data is then installed
> > as a SSDT table.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
> > ---
> >  Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/AcpiOemCpuASLLib.inf       |  27 ++
> >  Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/AcpiOemCpuGeneratorLib.inf |  42 ++
> >  Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/OemCpuGenerator.c          | 403 ++++++++++++++++++++
> >  Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/OemCpuGenerator.h          |  23 ++
> >  Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib/SsdtCpuTemplate.asl        |  25 ++
> >  5 files changed, 520 insertions(+)
> >
> ...
> > diff --git
> > a/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib
> > /OemCpuGenerator.c
> > b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGeneratorLib
> > /OemCpuGenerator.c
> > new file mode 100644
> > index
> > 0000000000000000000000000000000000000000..d544244bfbd566c128b57d80b0c8
> > c2bdc0cca374
> > --- /dev/null
> > +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/AcpiOemCpuGenerato
> > +++ rLib/OemCpuGenerator.c
> > @@ -0,0 +1,403 @@
> > +/** @file
> > +  OEM CPU Table Generator
> > +
> > +  Copyright (c) 2018, ARM Limited. All rights reserved.
> > +  This program and the accompanying materials  are licensed and made
> > + available under the terms and conditions of the BSD License  which
> > + accompanies this distribution.  The full text of the license may be
> > + found at  http://opensource.org/licenses/bsd-license.php
> > +
> > +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> > +BASIS,
> > +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> > +**/
> > +
> > +#include <Library/AcpiLib.h>
> > +#include <Library/BaseLib.h>
> > +#include <Library/BaseMemoryLib.h>
> > +#include <Library/DebugLib.h>
> > +#include <Library/MemoryAllocationLib.h> #include
> > +<Library/UefiBootServicesTableLib.h>
> > +#include <Protocol/AcpiTable.h>
> > +
> > +// Module specific include files.
> > +#include <AcpiTableGenerator.h>
> > +#include <ConfigurationManagerObject.h> #include
> > +<ConfigurationManagerHelper.h> #include <Library/TableHelperLib.h>
> > +#include <Protocol/ConfigurationManagerProtocol.h>
> > +#include <Protocol/DynamicTableFactoryProtocol.h>
> > +
> > +#include <OemCpuGenerator.h>
> > +
> > +// AML Code Include files generated by iASL Compiler #include
> > +<SsdtCpuTemplate.hex>
> > +
> > +// AML Code offsets file generated by iASL Compiler #include
> > +<SsdtCpuTemplate.offset.h>
> > +
>
> Apologies if I should have spotted this before, but this is a no-go.
> We are relying on intermediate output of some version of the IASL compiler here, which [AFAIK] is not formally specified or documented.
> We cannot base an elaborate framework like DynamicTables on this.
>
> I guess this only affects DSDT/SSDT generation, right?
> [SAMI] Yes. The last 2 patches in this series add this feature. We probably need more discussion on this topic.
> Until then can we proceed with review of the remaining patches, or should I submit a new patch series that drops the last 2 patches?
>

Could you look into whether EFI's ACPI SDT protocol has what you need
to manipulate AML at runtime?


  parent reply	other threads:[~2019-01-22  9:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21 17:00 [PATCH edk2-platforms v1 0/6] Platform/ARM: Platform support for Dynamic Tables Framework Sami Mujawar
2018-12-21 17:00 ` [PATCH edk2-platforms v1 1/6] Platform/ARM: Configuration Manager for Juno Sami Mujawar
2018-12-21 17:00 ` [PATCH edk2-platforms v1 2/6] Platform/ARM: Dynamic Tables support " Sami Mujawar
2018-12-21 17:00 ` [PATCH edk2-platforms v1 3/6] Platform/ARM: Configuration Manager for FVP Sami Mujawar
2019-01-02 14:45   ` Sami Mujawar
2018-12-21 17:00 ` [PATCH edk2-platforms v1 4/6] Platform/ARM: Dynamic Tables support " Sami Mujawar
2018-12-21 17:00 ` [PATCH edk2-platforms v1 5/6] Platform/ARM: Add OEM CPU generator " Sami Mujawar
2018-12-21 17:08   ` Ard Biesheuvel
2018-12-21 18:13     ` Sami Mujawar
2018-12-22 11:09       ` Ard Biesheuvel
2019-01-22  9:21       ` Ard Biesheuvel [this message]
2019-01-22  9:56         ` Sami Mujawar
2018-12-21 17:00 ` [PATCH edk2-platforms v1 6/6] Platform/ARM: Dynamic CPU Device info " Sami Mujawar
2019-01-14 11:40 ` [PATCH edk2-platforms v1 0/6] Platform/ARM: Platform support for Dynamic Tables Framework Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu-DwU+wmyhLgQhYmy3pzHW7eC8xQTwiQ8HfJh6b_GoADw@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox