[PATCH v2 7/9] x86: coreboot: Add IDE and SATA

Bin Meng bmeng.cn at gmail.com
Thu Aug 3 12:27:45 CEST 2023


Hi Simon,

On Mon, Jul 31, 2023 at 10:50 AM Simon Glass <sjg at chromium.org> wrote:
>
> Hi Bin,
>
> On Sun, 30 Jul 2023 at 20:03, Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg at chromium.org> wrote:
> > >
> > > Add these options to permit access to more disk types.
> > >
> > > Add some documentation as well.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > >  configs/coreboot64_defconfig    |  1 +
> > >  configs/coreboot_defconfig      |  9 +++++++++
> > >  doc/board/coreboot/coreboot.rst | 20 ++++++++++++++++++++
> > >  3 files changed, 30 insertions(+)
> > >
> > > diff --git a/configs/coreboot64_defconfig b/configs/coreboot64_defconfig
> > > index 8aadaa68c279..ded0e6f2422d 100644
> > > --- a/configs/coreboot64_defconfig
> > > +++ b/configs/coreboot64_defconfig
> > > @@ -26,6 +26,7 @@ CONFIG_SYS_PBSIZE=532
> > >  CONFIG_CMD_IDE=y
> > >  CONFIG_CMD_MMC=y
> > >  CONFIG_CMD_PART=y
> > > +CONFIG_CMD_SATA=y
> > >  CONFIG_CMD_USB=y
> > >  # CONFIG_CMD_SETEXPR is not set
> > >  CONFIG_CMD_DHCP=y
> > > diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig
> > > index 8e11de663819..56cc542df6c6 100644
> > > --- a/configs/coreboot_defconfig
> > > +++ b/configs/coreboot_defconfig
> > > @@ -22,8 +22,10 @@ CONFIG_LOGF_FUNC=y
> > >  CONFIG_DISPLAY_BOARDINFO_LATE=y
> > >  CONFIG_LAST_STAGE_INIT=y
> > >  CONFIG_PCI_INIT_R=y
> > > +CONFIG_CMD_IDE=y
> > >  CONFIG_CMD_MMC=y
> > >  CONFIG_CMD_PART=y
> > > +CONFIG_CMD_SATA=y
> > >  CONFIG_CMD_USB=y
> > >  # CONFIG_CMD_SETEXPR is not set
> > >  CONFIG_CMD_DHCP=y
> > > @@ -48,6 +50,13 @@ CONFIG_USE_ROOTPATH=y
> > >  CONFIG_REGMAP=y
> > >  CONFIG_SYSCON=y
> > >  # CONFIG_ACPIGEN is not set
> > > +CONFIG_SYS_IDE_MAXDEVICE=4
> > > +CONFIG_SYS_ATA_DATA_OFFSET=0
> > > +CONFIG_SYS_ATA_REG_OFFSET=0
> > > +CONFIG_SYS_ATA_ALT_OFFSET=0
> > > +CONFIG_ATAPI=y
> > > +CONFIG_LBA48=y
> > > +CONFIG_SYS_64BIT_LBA=y
> > >  CONFIG_NVME_PCI=y
> > >  # CONFIG_PCI_PNP is not set
> > >  CONFIG_SOUND=y
> > > diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst
> > > index 0fe95af56d2d..8e638a3c74cf 100644
> > > --- a/doc/board/coreboot/coreboot.rst
> > > +++ b/doc/board/coreboot/coreboot.rst
> > > @@ -41,6 +41,26 @@ At present it seems that for Minnowboard Max, coreboot does not pass through
> > >  the video information correctly (it always says the resolution is 0x0). This
> > >  works correctly for link though.
> > >
> > > +You can run via QEMU using::
> > > +
> > > +  qemu-system-x86_64 -bios build/coreboot.rom -serial mon:stdio
> > > +
> > > +The `-serial mon:stdio` part shows both output in the display and on the
> > > +console. It is optional. You can add `nographic` as well to *only* get console
> > > +output.
> > > +
> > > +To run with a SATA drive called `$DISK`::
> >
> > It is unclear what this is. It should clearly say this is the disk image file?
> >
> > > +
> > > +  qemu-system-x86_64 -bios build/coreboot.rom -serial mon:stdio \
> > > +       -drive id=disk,file=$DISK,if=none \
> > > +       -device ahci,id=ahci \
> > > +       -device ide-hd,drive=disk,bus=ahci.0
> >
> > Can we use AHCI directly, instead of the legacy IDE driver?
> >
>
> Probably...do you know the QEMU incantation for that?
>

If you are using "-M q35", an AHCI controller is automatically instantiated.

If you omit "-M q35", then you can add "-device ich9-ahci".

Regards,
Bin


More information about the U-Boot mailing list