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 4/5] x86: efi-x86_payload: Enumerate PCI bus during early boot
Date: Thu, 21 Jun 2018 19:19:13 +0800	[thread overview]
Message-ID: <CAEUhbmUFw6i5+T21dg13HzdeyyvxDyTzy+Kiz2aG8oX+bXfESg@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ3W1shqgTbT=sGHDC1NWikAg9M_qnQvy7vO2sRE+JDHYg@mail.gmail.com>

Hi Simon,

On Thu, Jun 21, 2018 at 1:51 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 17 June 2018 at 06:57, Bin Meng <bmeng.cn@gmail.com> wrote:
>> The generic efi payload currently does not enumerate the PCI bus,
>> which means peripherals on the PCI bus are not discovered by their
>> drivers. This uses board_early_init_r() to do the PCI enumeration.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  board/efi/efi-x86_payload/Kconfig   |  1 +
>>  board/efi/efi-x86_payload/Makefile  |  2 +-
>>  board/efi/efi-x86_payload/payload.c | 18 ++++++++++++++++++
>>  3 files changed, 20 insertions(+), 1 deletion(-)
>>  create mode 100644 board/efi/efi-x86_payload/payload.c
>
> I would like to consider adding a mechanism to indicate that a uclass
> should be inited (and its devices probed) on startup. This would be
> used for things which provide essential peripherals, which otherwise
> would not be visible in the initial driver-model bind process.
>

Good to know!

> I am not sure whether this should be:
>
> - a flag in the uclass

Only adding a flag to the uclass driver seems not working. On some
systems like x86 UCLASS_PCI may be init at boot up, but on other
systems this might not be the case. So we need find a place to tell DM
to init the uclass driver if the uclass driver has the flag, but
where?

> - a flag in the BOARD driver (assuming we have a BOARD uclass soon)

The concept of BOARD driver sounds interesting. So does the BOARD
uclass driver intend to replace various config options like
CONFIG_BOARD_EARLY_INIT_F, CONFIG_BOARD_EARLY_INIT_R,
CONFIG_BOARD_LATE_INIT, etc? If we do that, how do we guarantee the
init order with other components in board_f.c and board_r.c?

> - a function call into DM

Like uclass_first_device()?

> - something else
>
> But I think it is justified in the case of PCI, since some systems
> cannot find all their devices without scanning it.
>

Yes, this makes sense for PCI on x86.

> What do you think?
>

Regards,
Bin

  reply	other threads:[~2018-06-21 11:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17 12:57 [U-Boot] [PATCH 1/5] x86: qemu: Change default vesa mode to 1024x768x32 Bin Meng
2018-06-17 12:57 ` [U-Boot] [PATCH 2/5] board_r: Do not initialize IDE when DM BLK is on Bin Meng
2018-06-20 17:51   ` Simon Glass
2018-06-22  4:24     ` Bin Meng
2018-06-17 12:57 ` [U-Boot] [PATCH 3/5] efi: stub: Move the use_uart assignment immediately after exit_boot_services() call Bin Meng
2018-06-17 12:57 ` [U-Boot] [PATCH 4/5] x86: efi-x86_payload: Enumerate PCI bus during early boot Bin Meng
2018-06-20 17:51   ` Simon Glass
2018-06-21 11:19     ` Bin Meng [this message]
2018-06-21 19:45       ` Simon Glass
2018-06-22  4:24         ` Bin Meng
2018-06-17 12:57 ` [U-Boot] [PATCH 5/5] x86: efi-x86_payload: Enable usb keyboard during boot Bin Meng
2018-06-20 17:51   ` Simon Glass
2018-06-22  4:24     ` Bin Meng
2018-06-20 17:51 ` [U-Boot] [PATCH 1/5] x86: qemu: Change default vesa mode to 1024x768x32 Simon Glass
2018-06-22  4:24   ` 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=CAEUhbmUFw6i5+T21dg13HzdeyyvxDyTzy+Kiz2aG8oX+bXfESg@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.