All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Conrad Kostecki <ck@conrad-kostecki.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	devel@acpica.org
Subject: Re: AW: AW: [PATCH] x86: HPET force enable for Soekris net6501
Date: Mon, 17 Feb 2014 19:23:10 +0100	[thread overview]
Message-ID: <1678556.oPQNyVF84j@skinner> (raw)
In-Reply-To: <09d1230f-a261-4858-a390-72df138aaa34@email.android.com>

On Monday, February 17, 2014 09:19:03 AM H. Peter Anvin wrote:
> What I gather is that they want to add tables where there are none, and that
> the ACPI code doesn't play along because there is no RSDP nor any
> RSDT/XSDT.
Yep, this does currently not work.

Easiest I can think of instead of trying to modify RSDP or similar, is
to still pass the tables via unzipped, glued cpio which the kernel
can access early. The same way it is done for current ACPI table overriding
and early microcode passing.

Also find them via:
file = find_cpio_data(cpio_path, data, size, &offset);
(compare with drivers/acpi/osl.c)

and add them to (compare with drivers/acpi/acpica/acglobal.h):
/*
 * acpi_gbl_root_table_list is the master list of ACPI tables that were
 * found in the RSDT/XSDT.
 */
ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list;

But right now, this is acpica internal only.
Most elegant way should be that ACPICA people would add another OS
callback:

acpi_status
acpi_os_physical_table_add(acpi_physical_address *address,
                                u32 *table_length));

which is called right after acpi_os_physical_table_override.

Implementation of it should be in osl.c again where it can easily
be tracked whether a table has been replaced already and need not to
be added, for example something like:
__initdata struct cpio_data overridden_tables[ACPI_OVERRIDE_TABLES];

ACPICA part should not be hard as well. It's some time ago, but it
may be a simple call to:
        /* Add the table to the global root table list */

        status = acpi_tb_store_table(table_desc->address, table_desc->pointer,
                                     table_desc->length, table_desc->flags,
                                     table_index);

if acpi_os_physical_table_add() has returned a valid address/length.
This would then add the table to acpica internal:

/*
 * acpi_gbl_root_table_list is the master list of ACPI tables that were
 * found in the RSDT/XSDT.
 */
ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list;

and later all the tables in there get loaded and set up as if they
were passed from BIOS.

       Thomas


> On February 17, 2014 8:28:05 AM PST, Thomas Renninger <trenn@suse.de> wrote:
> >On Friday, February 14, 2014 10:16:41 PM Thomas Gleixner wrote:
> >> On Fri, 14 Feb 2014, H. Peter Anvin wrote:
> >> > On 02/14/2014 11:59 AM, Thomas Gleixner wrote:
> >> > > On Fri, 14 Feb 2014, H. Peter Anvin wrote:
> >> > >> On 02/14/2014 11:15 AM, Thomas Gleixner wrote:
> >> > >>> I'm fine with ACPI tables if we can provide simple means for
> >
> >embedded
> >
> >> > >>> users to load one via grub or just attach it to the kernel
> >
> >image.
> >
> >> > >> That already exists, see
> >
> >Documentation/acpi/initrd_table_override.txt.
> >
> >> > > That requires, that you have already ACPI tables.
> >> > > 
> >> > > ACPI_SIG_RSDP cannot be overridden and that's the base table you
> >
> >need
> >
> >> > > to get ACPI going in the first place. So we need support for that
> >
> >and
> >
> >> > > probably for storing the tables at some non canonical place.
> >> > 
> >> > Well, the RSDP and RSDT/XSDT are nothing but pointers to other
> >
> >tables,
> >
> >> > so if explicitly overridden I'm not sure if one actually would need
> >> > them.  That doesn't mean our current code will work without them,
> >
> >though.
> >
> >> I tried once to overload all of the tables, but failed miserably in
> >> the ACPI dungeon. RSDP was the major pain point IIRC.
> >
> >What exactly do you try to achieve?
> >I cannot imagine a use-case where RSDP  and XSDT overriding would help
> >you.
> >
> >Have you tried the current mechanism to override tables?
> >What is missing and for what do you need it for?
> >
> >I need more context, maybe I can help then.
> >
> >   Thomas


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Renninger <trenn at suse.de>
To: devel@acpica.org
Subject: Re: [Devel] [PATCH] x86: HPET force enable for Soekris net6501
Date: Mon, 17 Feb 2014 19:23:10 +0100	[thread overview]
Message-ID: <1678556.oPQNyVF84j@skinner> (raw)
In-Reply-To: 09d1230f-a261-4858-a390-72df138aaa34@email.android.com

[-- Attachment #1: Type: text/plain, Size: 3919 bytes --]

On Monday, February 17, 2014 09:19:03 AM H. Peter Anvin wrote:
> What I gather is that they want to add tables where there are none, and that
> the ACPI code doesn't play along because there is no RSDP nor any
> RSDT/XSDT.
Yep, this does currently not work.

Easiest I can think of instead of trying to modify RSDP or similar, is
to still pass the tables via unzipped, glued cpio which the kernel
can access early. The same way it is done for current ACPI table overriding
and early microcode passing.

Also find them via:
file = find_cpio_data(cpio_path, data, size, &offset);
(compare with drivers/acpi/osl.c)

and add them to (compare with drivers/acpi/acpica/acglobal.h):
/*
 * acpi_gbl_root_table_list is the master list of ACPI tables that were
 * found in the RSDT/XSDT.
 */
ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list;

But right now, this is acpica internal only.
Most elegant way should be that ACPICA people would add another OS
callback:

acpi_status
acpi_os_physical_table_add(acpi_physical_address *address,
                                u32 *table_length));

which is called right after acpi_os_physical_table_override.

Implementation of it should be in osl.c again where it can easily
be tracked whether a table has been replaced already and need not to
be added, for example something like:
__initdata struct cpio_data overridden_tables[ACPI_OVERRIDE_TABLES];

ACPICA part should not be hard as well. It's some time ago, but it
may be a simple call to:
        /* Add the table to the global root table list */

        status = acpi_tb_store_table(table_desc->address, table_desc->pointer,
                                     table_desc->length, table_desc->flags,
                                     table_index);

if acpi_os_physical_table_add() has returned a valid address/length.
This would then add the table to acpica internal:

/*
 * acpi_gbl_root_table_list is the master list of ACPI tables that were
 * found in the RSDT/XSDT.
 */
ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list;

and later all the tables in there get loaded and set up as if they
were passed from BIOS.

       Thomas


> On February 17, 2014 8:28:05 AM PST, Thomas Renninger <trenn(a)suse.de> wrote:
> >On Friday, February 14, 2014 10:16:41 PM Thomas Gleixner wrote:
> >> On Fri, 14 Feb 2014, H. Peter Anvin wrote:
> >> > On 02/14/2014 11:59 AM, Thomas Gleixner wrote:
> >> > > On Fri, 14 Feb 2014, H. Peter Anvin wrote:
> >> > >> On 02/14/2014 11:15 AM, Thomas Gleixner wrote:
> >> > >>> I'm fine with ACPI tables if we can provide simple means for
> >
> >embedded
> >
> >> > >>> users to load one via grub or just attach it to the kernel
> >
> >image.
> >
> >> > >> That already exists, see
> >
> >Documentation/acpi/initrd_table_override.txt.
> >
> >> > > That requires, that you have already ACPI tables.
> >> > > 
> >> > > ACPI_SIG_RSDP cannot be overridden and that's the base table you
> >
> >need
> >
> >> > > to get ACPI going in the first place. So we need support for that
> >
> >and
> >
> >> > > probably for storing the tables at some non canonical place.
> >> > 
> >> > Well, the RSDP and RSDT/XSDT are nothing but pointers to other
> >
> >tables,
> >
> >> > so if explicitly overridden I'm not sure if one actually would need
> >> > them.  That doesn't mean our current code will work without them,
> >
> >though.
> >
> >> I tried once to overload all of the tables, but failed miserably in
> >> the ACPI dungeon. RSDP was the major pain point IIRC.
> >
> >What exactly do you try to achieve?
> >I cannot imagine a use-case where RSDP  and XSDT overriding would help
> >you.
> >
> >Have you tried the current mechanism to override tables?
> >What is missing and for what do you need it for?
> >
> >I need more context, maybe I can help then.
> >
> >   Thomas


  reply	other threads:[~2014-02-17 18:23 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 10:23 [PATCH] x86: HPET force enable for Soekris net6501 Conrad Kostecki
2014-02-14 17:46 ` H. Peter Anvin
2014-02-14 18:06   ` AW: " Conrad Kostecki
2014-02-14 18:08     ` H. Peter Anvin
2014-02-14 18:13       ` AW: " Conrad Kostecki
2014-02-14 18:16         ` H. Peter Anvin
2014-02-14 18:21           ` Thomas Gleixner
2014-02-14 18:22             ` H. Peter Anvin
2014-02-14 18:38               ` Thomas Gleixner
2014-02-14 18:39                 ` H. Peter Anvin
2014-02-14 19:15                   ` Thomas Gleixner
2014-02-14 19:26                     ` H. Peter Anvin
2014-02-14 19:59                       ` Thomas Gleixner
2014-02-14 20:06                         ` H. Peter Anvin
2014-02-14 21:16                           ` Thomas Gleixner
2014-02-14 21:18                             ` H. Peter Anvin
2014-02-14 21:47                               ` Thomas Gleixner
2014-02-14 21:48                                 ` H. Peter Anvin
2014-02-17 16:28                             ` Thomas Renninger
2014-02-17 17:19                               ` H. Peter Anvin
2014-02-17 18:23                                 ` Thomas Renninger [this message]
2014-02-17 18:23                                   ` [Devel] " Thomas Renninger
2014-02-17 18:47                                   ` AW: AW: " H. Peter Anvin
2014-02-17 19:25                                     ` Thomas Renninger
2014-02-17 19:25                                       ` [Devel] " Thomas Renninger
2014-02-17 19:40                                       ` AW: AW: " H. Peter Anvin
2014-02-18 18:22                                         ` ACPI: Also allow ACPI table adding via initrd not only overriding Thomas Renninger
2014-02-18 18:22                                           ` [Devel] " Thomas Renninger
2014-02-18 18:22                                           ` [PATCH 1/4] ACPI: Provide support for ACPI table adding via OS Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:27                                             ` H. Peter Anvin
2014-02-18 18:44                                               ` Thomas Renninger
2014-02-18 18:44                                                 ` [Devel] " Thomas Renninger
2014-02-18 20:51                                                 ` H. Peter Anvin
2014-02-19 11:22                                                   ` Thomas Renninger
2014-02-19 11:22                                                     ` [Devel] " Thomas Renninger
2014-02-21  7:24                                                     ` Zheng, Lv
2014-02-21  7:24                                                       ` Zheng, Lv
2014-02-21  7:28                                                 ` Zheng, Lv
2014-02-21  7:28                                                   ` Zheng, Lv
2014-02-18 18:22                                           ` [PATCH 2/4] ACPICA: Introduce new acpi_os_physical_table_add OS callback Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:22                                           ` [PATCH 3/4] ACPICA: Add BGRT signature to known signatures Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:22                                           ` [PATCH 4/4] ACPI: Add new table signatures that can be overridden/added Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:38                                           ` [Devel] ACPI: Also allow ACPI table adding via initrd not only overriding Moore, Robert
2014-02-18 18:38                                             ` Moore, Robert
2014-02-18 18:52                                             ` Thomas Renninger
2014-02-18 18:52                                               ` Thomas Renninger
2014-02-18 19:59                                               ` Moore, Robert
2014-02-18 19:59                                                 ` Moore, Robert
2014-02-19 11:14                                                 ` Thomas Renninger
2014-02-19 11:14                                                   ` Thomas Renninger
2014-02-19 13:03                                                   ` Thomas Gleixner
2014-02-14 18:28           ` AW: AW: AW: [PATCH] x86: HPET force enable for Soekris net6501 Conrad Kostecki
2014-09-09 13:56             ` Eric Sesterhenn
2014-09-09 14:54               ` Thomas Gleixner
2014-09-09 15:26                 ` H. Peter Anvin
2014-09-09 15:41                   ` Thomas Gleixner
2014-09-12  9:41                   ` Eric Sesterhenn
2014-09-12 10:37                     ` Thomas Gleixner
2014-09-12 11:06                       ` [PATCH] x86: HPET force enable for e6xx based systems Eric Sesterhenn
2014-09-16  0:58                         ` [tip:x86/platform] " tip-bot for Peter Neubauer

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-all 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=1678556.oPQNyVF84j@skinner \
    --to=trenn@suse.de \
    --cc=ck@conrad-kostecki.de \
    --cc=devel@acpica.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.