All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] x86: qemu: qfw: Implement acpi_get_rsdp_addr()
Date: Mon, 5 Feb 2018 17:02:18 +0800	[thread overview]
Message-ID: <CAEUhbmW_08v_U4imJE+QCpXunR0_6kCbC-Xd3N2OV+BxKwrjjg@mail.gmail.com> (raw)
In-Reply-To: <CAPc5xaOiJ172r=L3vfa866H5O+BYWgEtFhJZQErO_u83qOZADg@mail.gmail.com>

Hi Miao,

On Mon, Feb 5, 2018 at 2:00 PM, Miao Yan <yanmiaobest@gmail.com> wrote:
> On Tue, Jan 30, 2018 at 9:01 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> U-Boot on QEMU does not build ACPI table by ourself, instead it uses
>> the prebuilt ACPI table via the qfw interface. This implements the
>> qfw version of acpi_get_rsdp_addr() for setup_zimage().
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  drivers/misc/qfw.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
>> index a8af9e0..9a54803 100644
>> --- a/drivers/misc/qfw.c
>> +++ b/drivers/misc/qfw.c
>> @@ -222,6 +222,14 @@ out:
>>         free(table_loader);
>>         return addr;
>>  }
>> +
>> +ulong acpi_get_rsdp_addr(void)
>> +{
>> +       struct fw_file *file;
>> +
>> +       file = qemu_fwcfg_find_file("etc/acpi/rsdp");
>> +       return file->addr;
>
> qemu_fwcfg_find_file() can return NULL. Don't we need to check that ? Or
> can we assume etc/acpi/rsdp is always present ?
>
> Sorry for the late response.
>

I think you are correct. If file is NULL, we should return 0.

Regards,
Bin

  reply	other threads:[~2018-02-05  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 13:01 [U-Boot] [PATCH 1/2] x86: acpi: Use an API to get the ACPI RSDP table address Bin Meng
2018-01-30 13:01 ` [U-Boot] [PATCH 2/2] x86: qemu: qfw: Implement acpi_get_rsdp_addr() Bin Meng
2018-01-30 13:05   ` Andy Shevchenko
2018-01-30 14:42     ` Bin Meng
2018-02-05  6:00   ` Miao Yan
2018-02-05  9:02     ` Bin Meng [this message]
2018-01-30 14:42 ` [U-Boot] [PATCH 1/2] x86: acpi: Use an API to get the ACPI RSDP table address Bin Meng

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=CAEUhbmW_08v_U4imJE+QCpXunR0_6kCbC-Xd3N2OV+BxKwrjjg@mail.gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.