[SeaBIOS] Compiling SeaBIOS for coreboot has problems with its ACPI code
Moore, Robert
robert.moore at intel.com
Tue Aug 7 21:34:37 CEST 2012
This is very interesting. If I understand correctly, you are using a utility plus various directives to generate tables of AML offsets -- presumably in order to dynamically change AML values, correct?
I have to say that I have not seen anything like this, from any BIOS vendor.
> By the way, is there interest in adding some of the functionality that
> we get by parsing the listing to iasl directly?
We are always interested in adding features to make the compiler more useful. What would you suggest?
Bob
> -----Original Message-----
> From: Michael S. Tsirkin [mailto:mst at redhat.com]
> Sent: Sunday, August 05, 2012 1:45 PM
> To: Moore, Robert
> Cc: Idwer Vollering; Kevin O'Connor; seabios at seabios.org; Tang, Feng
> Subject: Re: [SeaBIOS] Compiling SeaBIOS for coreboot has problems with
> its ACPI code
>
> On Sun, Aug 05, 2012 at 11:36:15PM +0300, Michael S. Tsirkin wrote:
> > On Mon, Jul 30, 2012 at 07:42:48PM +0000, Moore, Robert wrote:
> > > Yes, you are correct, the listing no longer includes the comments.
> > >
> > > Sorry for causing you a problem.
> > >
> > > What is happening is that the preprocessor parser is stripping the
> comments during the creation of the .i file. Then, the compiler is
> invoked on the .i file -- thus, the comments are gone.
> > >
> > > This is going to take a bit of work to correct, but we will do it.
> > >
> > > In the meantime, try using the -Pn flag to disable the
> preprocessor. When this flag is set, the preprocessor is completely
> bypassed and the compiler should function as it did previously.
> >
> >
> > So we are doing it this way meanwhile. If you change this
> > preprocessor behaviour like you indicated you would, please let us
> > know so e can test.
> >
> > Thanks!
>
> By the way, is there interest in adding some of the functionality that
> we get by parsing the listing to iasl directly?
> Here's what our tool currently supports:
>
> # Process mixed ASL/AML listing (.lst file) produced by iasl -l #
> Locate and execute ACPI_EXTRACT directives, output offset info # #
> Documentation of ACPI_EXTRACT_* directive tags:
> #
> # These directive tags output offset information from AML for BIOS
> runtime # table generation.
> # Each directive is of the form:
> # ACPI_EXTRACT_<TYPE> <array_name> <Operator> (...) # and causes the
> extractor to create an array # named <array_name> with offset, in the
> generated AML, # of an object of a given type in the following
> <Operator>.
> #
> # A directive must fit on a single code line.
> #
> # Object type in AML is verified, a mismatch causes a build failure.
> #
> # Directives and operators currently supported are:
> # ACPI_EXTRACT_NAME_DWORD_CONST - extract a Dword Const object from
> Name() # ACPI_EXTRACT_NAME_WORD_CONST - extract a Word Const object
> from Name() # ACPI_EXTRACT_NAME_BYTE_CONST - extract a Byte Const
> object from Name() # ACPI_EXTRACT_METHOD_STRING - extract a NameString
> from Method() # ACPI_EXTRACT_NAME_STRING - extract a NameString from
> Name() # ACPI_EXTRACT_PROCESSOR_START - start of Processor() block #
> ACPI_EXTRACT_PROCESSOR_STRING - extract a NameString from Processor() #
> ACPI_EXTRACT_PROCESSOR_END - offset at last byte of Processor() + 1 #
> ACPI_EXTRACT_PKG_START - start of Package block # #
> ACPI_EXTRACT_ALL_CODE - create an array storing the generated AML
> bytecode # # ACPI_EXTRACT is not allowed anywhere else in code, except
> in comments.
>
>
> Example:
>
> ACPI_EXTRACT_NAME_DWORD_CONST aml_adr_dword
> Name (_ADR, 0x00010000)
>
> adds the offset of 0x00010000 constant to array aml_adr_dword
>
> Example:
>
> ACPI_EXTRACT_METHOD_STRING aml_ej0_name
> Method (_EJ0, 1) { Return(PCEJ(0x0001)) }
>
> adds the offset of _EJ0 string to array aml_ej0_name
>
> ACPI_EXTRACT_ALL_CODE ssdp_pcihp_aml
>
> names the array to include the generated AML code
>
> --
> MST
More information about the SeaBIOS
mailing list