* [PATCH v2 1/9] fs: fat: Support reading from a larger block size
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-08-03 9:47 ` Bin Meng
2023-07-30 17:15 ` [PATCH v2 2/9] usb: Return -ENOENT when no devices are found Simon Glass
` (7 subsequent siblings)
8 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Mattijs Korpershoek, Bin Meng, Simon Glass,
Benoît Thébaudeau, Heinrich Schuchardt,
Ilias Apalodimas, Stefan Herbrechtsmeier
At present it is not possible to read from some CDROM drives since the
FAT sector size does not match the media's block size. Add a conversion
option for this, so that reading is possible.
This does increase SPL size for read-only FAT support by 25 bytes but
all but 6 are covered by the previous patch. We could reduce the
overhead of this feature to 0 bytes by making the code uglier (using
a static variable).
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Use log_warning() for the warning
fs/fat/Kconfig | 13 ++++++
fs/fat/fat.c | 107 ++++++++++++++++++++++++++++++++++++++++-----
fs/fat/fat_write.c | 8 ++--
3 files changed, 114 insertions(+), 14 deletions(-)
diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig
index 9bb11eac9f7a..b0aa888c6cc4 100644
--- a/fs/fat/Kconfig
+++ b/fs/fat/Kconfig
@@ -22,3 +22,16 @@ config FS_FAT_MAX_CLUSTSIZE
is the smallest amount of disk space that can be used to hold a
file. Unless you have an extremely tight memory memory constraints,
leave the default.
+
+config FAT_BLK_XLATE
+ bool "Enable FAT filesystem on a device with a larger block size"
+ depends on FS_FAT
+ help
+ This provides a simple translation mechanism for reading FAT
+ filesystems which don't use the same sector size as the underlying
+ media. For example, the FAT filesystem may use 512 bytes but the
+ media uses 2048, e.g. on a CDROM drive.
+
+ This only supports the case where the FAT filesystem's sector size is
+ smaller than the media's block size. It does not support creating or
+ writing files.
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index d1476aa433d6..686b321163fb 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -45,13 +45,93 @@ static struct disk_partition cur_part_info;
#define DOS_FS_TYPE_OFFSET 0x36
#define DOS_FS32_TYPE_OFFSET 0x52
-static int disk_read(__u32 block, __u32 nr_blocks, void *buf)
+/**
+ * disk_read_conv() - Read blocks and break them into smaller ones
+ *
+ * This is used when the FAT filesystem is hosted on a block device with a
+ * block size greated than 512 bytes, e.g. the 2048 bytes of a CDROM drive. It
+ * reads the blocks into a buffer and pulls out what is requested by the calling
+ * function.
+ *
+ * It uses an internal 2KB buffer on the stack.
+ *
+ * @mydata: Filesystem information
+ * @block: Block number to read, in terms of mydata->sect_size
+ * @nr_blocks: Number of blocks to read, in terms of mydata->sect_size
+ * @buf: Buffer for data
+ */
+static int disk_read_conv(fsdata *mydata, __u32 block, __u32 nr_blocks,
+ void *buf)
+{
+ uint factor, whole, remain, upto;
+ ulong base, index;
+ uint to_copy;
+ u8 tbuf[2048];
+ int ret;
+
+ log_debug("mydata %x, cur_dev %lx, block %x, nr_block %x\n",
+ mydata->sect_size, cur_dev->blksz, block, nr_blocks);
+ if (mydata->sect_size > cur_dev->blksz ||
+ cur_dev->blksz > sizeof(tbuf)) {
+ log_err("Block size %lx not supported\n", cur_dev->blksz);
+ return -EIO;
+ }
+ factor = cur_dev->blksz / mydata->sect_size;
+
+ /* get the first partial block */
+ base = cur_part_info.start + block / factor;
+ index = block % factor;
+ log_debug("cur_part_info.start %llx, block %x, base %lx, index %lx\n",
+ (unsigned long long)cur_part_info.start, block, base, index);
+ ret = blk_dread(cur_dev, base, 1, tbuf);
+ if (ret != 1)
+ return -EIO;
+
+ to_copy = min((ulong)nr_blocks, factor - index);
+ log_debug("to_copy %x\n", to_copy);
+ memcpy(buf, tbuf + index * mydata->sect_size,
+ to_copy * mydata->sect_size);
+ upto = to_copy;
+
+ /* load any whole blocks */
+ remain = nr_blocks - upto;
+ whole = remain / factor;
+ log_debug("factor %x, whole %x, remain %x\n", factor, whole, remain);
+ if (whole) {
+ ret = blk_dread(cur_dev, base + 1, whole,
+ buf + upto * mydata->sect_size);
+ if (ret != whole)
+ return -EIO;
+ upto += whole * factor;
+ remain = nr_blocks - upto;
+ }
+
+ /* load any blocks at the end */
+ log_debug("end: remain %x\n", remain);
+ if (remain) {
+ ret = blk_dread(cur_dev, base + 1 + whole, 1, tbuf);
+ if (ret != 1)
+ return -EIO;
+ memcpy(buf + upto * mydata->sect_size, tbuf,
+ remain * mydata->sect_size);
+ upto += remain;
+ }
+
+ return upto;
+}
+
+static int disk_read(fsdata *mydata, __u32 block, __u32 nr_blocks, void *buf)
{
ulong ret;
if (!cur_dev)
return -1;
+ /* support converting from a larger block size */
+ if (IS_ENABLED(CONFIG_FAT_BLK_XLATE) && mydata &&
+ mydata->sect_size != cur_dev->blksz)
+ return disk_read_conv(mydata, block, nr_blocks, buf);
+
ret = blk_dread(cur_dev, cur_part_info.start + block, nr_blocks, buf);
if (ret != nr_blocks)
@@ -68,7 +148,7 @@ int fat_set_blk_dev(struct blk_desc *dev_desc, struct disk_partition *info)
cur_part_info = *info;
/* Make sure it has a valid FAT header */
- if (disk_read(0, 1, buffer) != 1) {
+ if (disk_read(NULL, 0, 1, buffer) != 1) {
cur_dev = NULL;
return -1;
}
@@ -213,7 +293,7 @@ static __u32 get_fatent(fsdata *mydata, __u32 entry)
if (flush_dirty_fat_buffer(mydata) < 0)
return -1;
- if (disk_read(startblock, getsize, bufptr) < 0) {
+ if (disk_read(mydata, startblock, getsize, bufptr) < 0) {
debug("Error reading FAT blocks\n");
return ret;
}
@@ -267,7 +347,7 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
debug("FAT: Misaligned buffer address (%p)\n", buffer);
while (size >= mydata->sect_size) {
- ret = disk_read(startsect++, 1, tmpbuf);
+ ret = disk_read(mydata, startsect++, 1, tmpbuf);
if (ret != 1) {
debug("Error reading data (got %d)\n", ret);
return -1;
@@ -281,7 +361,7 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
__u32 bytes_read;
__u32 sect_count = size / mydata->sect_size;
- ret = disk_read(startsect, sect_count, buffer);
+ ret = disk_read(mydata, startsect, sect_count, buffer);
if (ret != sect_count) {
debug("Error reading data (got %d)\n", ret);
return -1;
@@ -294,7 +374,7 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
if (size) {
ALLOC_CACHE_ALIGN_BUFFER(__u8, tmpbuf, mydata->sect_size);
- ret = disk_read(startsect, 1, tmpbuf);
+ ret = disk_read(mydata, startsect, 1, tmpbuf);
if (ret != 1) {
debug("Error reading data (got %d)\n", ret);
return -1;
@@ -506,7 +586,7 @@ read_bootsectandvi(boot_sector *bs, volume_info *volinfo, int *fatsize)
return -1;
}
- if (disk_read(0, 1, block) < 0) {
+ if (disk_read(NULL, 0, 1, block) < 0) {
debug("Error: reading block\n");
goto fail;
}
@@ -588,9 +668,14 @@ static int get_fs_info(fsdata *mydata)
mydata->sect_size = (bs.sector_size[1] << 8) + bs.sector_size[0];
mydata->clust_size = bs.cluster_size;
if (mydata->sect_size != cur_part_info.blksz) {
- log_err("FAT sector size mismatch (fs=%u, dev=%lu)\n",
- mydata->sect_size, cur_part_info.blksz);
- return -1;
+ if (IS_ENABLED(CONFIG_FAT_BLK_XLATE)) {
+ log_warning("FAT sector size mismatch (fs=%u, dev=%lu): translating for read-only\n",
+ mydata->sect_size, cur_part_info.blksz);
+ } else {
+ log_err("FAT sector size mismatch (fs=%u, dev=%lu), see CONFIG_FAT_BLK_XLATE\n",
+ mydata->sect_size, cur_part_info.blksz);
+ return -1;
+ }
}
if (mydata->clust_size == 0) {
log_err("FAT cluster size not set\n");
@@ -848,7 +933,7 @@ void *fat_next_cluster(fat_itr *itr, unsigned int *nbytes)
* dent at a time and iteratively constructing the vfat long
* name.
*/
- ret = disk_read(sect, read_size, itr->block);
+ ret = disk_read(itr->fsdata, sect, read_size, itr->block);
if (ret < 0) {
debug("Error: reading block\n");
return NULL;
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index e2a9913f807a..95f7a60caa2b 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -477,7 +477,7 @@ static int set_fatent_value(fsdata *mydata, __u32 entry, __u32 entry_value)
startblock += mydata->fat_sect;
- if (disk_read(startblock, getsize, bufptr) < 0) {
+ if (disk_read(NULL, startblock, getsize, bufptr) < 0) {
debug("Error reading FAT blocks\n");
return -1;
}
@@ -712,7 +712,8 @@ get_set_cluster(fsdata *mydata, __u32 clustnum, loff_t pos, __u8 *buffer,
/* partial write at beginning */
if (pos) {
wsize = min(bytesperclust - pos, size);
- ret = disk_read(startsect, mydata->clust_size, tmpbuf_cluster);
+ ret = disk_read(NULL, startsect, mydata->clust_size,
+ tmpbuf_cluster);
if (ret != mydata->clust_size) {
debug("Error reading data (got %d)\n", ret);
return -1;
@@ -778,7 +779,8 @@ get_set_cluster(fsdata *mydata, __u32 clustnum, loff_t pos, __u8 *buffer,
/* partial write at end */
if (size) {
wsize = size;
- ret = disk_read(startsect, mydata->clust_size, tmpbuf_cluster);
+ ret = disk_read(NULL, startsect, mydata->clust_size,
+ tmpbuf_cluster);
if (ret != mydata->clust_size) {
debug("Error reading data (got %d)\n", ret);
return -1;
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 1/9] fs: fat: Support reading from a larger block size
2023-07-30 17:15 ` [PATCH v2 1/9] fs: fat: Support reading from a larger block size Simon Glass
@ 2023-08-03 9:47 ` Bin Meng
0 siblings, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 9:47 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Mattijs Korpershoek,
Benoît Thébaudeau, Heinrich Schuchardt,
Ilias Apalodimas, Stefan Herbrechtsmeier
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> At present it is not possible to read from some CDROM drives since the
> FAT sector size does not match the media's block size. Add a conversion
> option for this, so that reading is possible.
>
> This does increase SPL size for read-only FAT support by 25 bytes but
> all but 6 are covered by the previous patch. We could reduce the
> overhead of this feature to 0 bytes by making the code uglier (using
> a static variable).
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Use log_warning() for the warning
>
> fs/fat/Kconfig | 13 ++++++
> fs/fat/fat.c | 107 ++++++++++++++++++++++++++++++++++++++++-----
> fs/fat/fat_write.c | 8 ++--
> 3 files changed, 114 insertions(+), 14 deletions(-)
>
As discussed in another thread [1], this patch will not be accepted
due to invalid use case of using -cdrom on isohybrid images.
[1] https://patchwork.ozlabs.org/project/uboot/patch/20230619125956.v4.32.Ia13846500fab3d5a1d5573db11a040d233994fa6@changeid/
Regards,
Bin
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 2/9] usb: Return -ENOENT when no devices are found
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
2023-07-30 17:15 ` [PATCH v2 1/9] fs: fat: Support reading from a larger block size Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 2:05 ` Bin Meng
2023-07-30 17:15 ` [PATCH v2 3/9] lib: Suppress E when writing error-string output Simon Glass
` (6 subsequent siblings)
8 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Mattijs Korpershoek, Bin Meng, Simon Glass, Fabrice Gasnier,
Marek Vasut, Patrice Chotard, Patrick Delaunay
When USB finds no devices it currently returns -EPERM which bootstd does
not understand. This causes other bootdevs of the same priority to be
skipped.
Fix this by returning the correct error code.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
drivers/usb/host/usb-uclass.c | 2 +-
include/usb.h | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 02c0138a2065..7a03435ba773 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -346,7 +346,7 @@ int usb_init(void)
if (controllers_initialized == 0)
printf("No working controllers found\n");
- return usb_started ? 0 : -1;
+ return usb_started ? 0 : -ENOENT;
}
int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
diff --git a/include/usb.h b/include/usb.h
index 42b001c3dd5e..09e3f0cb309c 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -257,7 +257,14 @@ int usb_kbd_deregister(int force);
#endif
/* routines */
-int usb_init(void); /* initialize the USB Controller */
+
+/*
+ * usb_init() - initialize the USB Controllers
+ *
+ * Returns: 0 if OK, -ENOENT if there are no USB devices
+ */
+int usb_init(void);
+
int usb_stop(void); /* stop the USB Controller */
int usb_detect_change(void); /* detect if a USB device has been (un)plugged */
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 2/9] usb: Return -ENOENT when no devices are found
2023-07-30 17:15 ` [PATCH v2 2/9] usb: Return -ENOENT when no devices are found Simon Glass
@ 2023-07-31 2:05 ` Bin Meng
2023-07-31 2:50 ` Simon Glass
2023-08-03 9:55 ` Bin Meng
0 siblings, 2 replies; 32+ messages in thread
From: Bin Meng @ 2023-07-31 2:05 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Mattijs Korpershoek, Fabrice Gasnier,
Marek Vasut, Patrice Chotard, Patrick Delaunay
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> When USB finds no devices it currently returns -EPERM which bootstd does
The code returns -1, not -EPERM
> not understand. This causes other bootdevs of the same priority to be
> skipped.
>
> Fix this by returning the correct error code.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
> drivers/usb/host/usb-uclass.c | 2 +-
> include/usb.h | 9 ++++++++-
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
> index 02c0138a2065..7a03435ba773 100644
> --- a/drivers/usb/host/usb-uclass.c
> +++ b/drivers/usb/host/usb-uclass.c
> @@ -346,7 +346,7 @@ int usb_init(void)
> if (controllers_initialized == 0)
> printf("No working controllers found\n");
>
> - return usb_started ? 0 : -1;
> + return usb_started ? 0 : -ENOENT;
> }
>
> int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
> diff --git a/include/usb.h b/include/usb.h
> index 42b001c3dd5e..09e3f0cb309c 100644
> --- a/include/usb.h
> +++ b/include/usb.h
> @@ -257,7 +257,14 @@ int usb_kbd_deregister(int force);
>
> #endif
> /* routines */
> -int usb_init(void); /* initialize the USB Controller */
> +
> +/*
> + * usb_init() - initialize the USB Controllers
> + *
> + * Returns: 0 if OK, -ENOENT if there are no USB devices
> + */
> +int usb_init(void);
> +
> int usb_stop(void); /* stop the USB Controller */
> int usb_detect_change(void); /* detect if a USB device has been (un)plugged */
>
> --
Otherwise,
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 2/9] usb: Return -ENOENT when no devices are found
2023-07-31 2:05 ` Bin Meng
@ 2023-07-31 2:50 ` Simon Glass
2023-08-03 9:55 ` Bin Meng
1 sibling, 0 replies; 32+ messages in thread
From: Simon Glass @ 2023-07-31 2:50 UTC (permalink / raw)
To: Bin Meng
Cc: U-Boot Mailing List, Mattijs Korpershoek, Fabrice Gasnier,
Marek Vasut, Patrice Chotard, Patrick Delaunay
Hi Bin,
On Sun, 30 Jul 2023 at 20:05, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > When USB finds no devices it currently returns -EPERM which bootstd does
>
> The code returns -1, not -EPERM
Yes, I mean that -1 is -EPERM.
Regards,
Simon
>
> > not understand. This causes other bootdevs of the same priority to be
> > skipped.
> >
> > Fix this by returning the correct error code.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > (no changes since v1)
> >
> > drivers/usb/host/usb-uclass.c | 2 +-
> > include/usb.h | 9 ++++++++-
> > 2 files changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
> > index 02c0138a2065..7a03435ba773 100644
> > --- a/drivers/usb/host/usb-uclass.c
> > +++ b/drivers/usb/host/usb-uclass.c
> > @@ -346,7 +346,7 @@ int usb_init(void)
> > if (controllers_initialized == 0)
> > printf("No working controllers found\n");
> >
> > - return usb_started ? 0 : -1;
> > + return usb_started ? 0 : -ENOENT;
> > }
> >
> > int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
> > diff --git a/include/usb.h b/include/usb.h
> > index 42b001c3dd5e..09e3f0cb309c 100644
> > --- a/include/usb.h
> > +++ b/include/usb.h
> > @@ -257,7 +257,14 @@ int usb_kbd_deregister(int force);
> >
> > #endif
> > /* routines */
> > -int usb_init(void); /* initialize the USB Controller */
> > +
> > +/*
> > + * usb_init() - initialize the USB Controllers
> > + *
> > + * Returns: 0 if OK, -ENOENT if there are no USB devices
> > + */
> > +int usb_init(void);
> > +
> > int usb_stop(void); /* stop the USB Controller */
> > int usb_detect_change(void); /* detect if a USB device has been (un)plugged */
> >
> > --
>
> Otherwise,
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 2/9] usb: Return -ENOENT when no devices are found
2023-07-31 2:05 ` Bin Meng
2023-07-31 2:50 ` Simon Glass
@ 2023-08-03 9:55 ` Bin Meng
1 sibling, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 9:55 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Mattijs Korpershoek, Fabrice Gasnier,
Marek Vasut, Patrice Chotard, Patrick Delaunay
On Mon, Jul 31, 2023 at 10:05 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > When USB finds no devices it currently returns -EPERM which bootstd does
>
> The code returns -1, not -EPERM
>
> > not understand. This causes other bootdevs of the same priority to be
> > skipped.
> >
> > Fix this by returning the correct error code.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > (no changes since v1)
> >
> > drivers/usb/host/usb-uclass.c | 2 +-
> > include/usb.h | 9 ++++++++-
> > 2 files changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
> > index 02c0138a2065..7a03435ba773 100644
> > --- a/drivers/usb/host/usb-uclass.c
> > +++ b/drivers/usb/host/usb-uclass.c
> > @@ -346,7 +346,7 @@ int usb_init(void)
> > if (controllers_initialized == 0)
> > printf("No working controllers found\n");
> >
> > - return usb_started ? 0 : -1;
> > + return usb_started ? 0 : -ENOENT;
> > }
> >
> > int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
> > diff --git a/include/usb.h b/include/usb.h
> > index 42b001c3dd5e..09e3f0cb309c 100644
> > --- a/include/usb.h
> > +++ b/include/usb.h
> > @@ -257,7 +257,14 @@ int usb_kbd_deregister(int force);
> >
> > #endif
> > /* routines */
> > -int usb_init(void); /* initialize the USB Controller */
> > +
> > +/*
> > + * usb_init() - initialize the USB Controllers
> > + *
> > + * Returns: 0 if OK, -ENOENT if there are no USB devices
> > + */
> > +int usb_init(void);
> > +
> > int usb_stop(void); /* stop the USB Controller */
> > int usb_detect_change(void); /* detect if a USB device has been (un)plugged */
> >
> > --
>
> Otherwise,
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 3/9] lib: Suppress E when writing error-string output
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
2023-07-30 17:15 ` [PATCH v2 1/9] fs: fat: Support reading from a larger block size Simon Glass
2023-07-30 17:15 ` [PATCH v2 2/9] usb: Return -ENOENT when no devices are found Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 2:05 ` Bin Meng
2023-07-30 17:15 ` [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk() Simon Glass
` (5 subsequent siblings)
8 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Mattijs Korpershoek, Bin Meng, Simon Glass, Heinrich Schuchardt,
Ramon Fried, Viacheslav Mitrofanov
When CONFIG_ERRNO_STR is not enabled this shows a spurious 'E' from the
format string. Fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7f331941321 ("lib: Support printing an error string")
---
(no changes since v1)
lib/vsprintf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index e87503e41ada..e14c6ca9f966 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -680,8 +680,10 @@ repeat:
break;
case 'd':
- if (fmt[1] == 'E')
+ if (fmt[1] == 'E') {
flags |= ERRSTR;
+ fmt++;
+ }
/* fallthrough */
case 'i':
flags |= SIGN;
@@ -725,7 +727,6 @@ repeat:
ADDCH(str, ' ');
for (p = errno_str(num); *p; p++)
ADDCH(str, *p);
- fmt++;
}
}
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 3/9] lib: Suppress E when writing error-string output
2023-07-30 17:15 ` [PATCH v2 3/9] lib: Suppress E when writing error-string output Simon Glass
@ 2023-07-31 2:05 ` Bin Meng
2023-08-03 9:56 ` Bin Meng
0 siblings, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-07-31 2:05 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Mattijs Korpershoek, Heinrich Schuchardt,
Ramon Fried, Viacheslav Mitrofanov
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> When CONFIG_ERRNO_STR is not enabled this shows a spurious 'E' from the
> format string. Fix this.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Fixes: 7f331941321 ("lib: Support printing an error string")
> ---
>
> (no changes since v1)
>
> lib/vsprintf.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 3/9] lib: Suppress E when writing error-string output
2023-07-31 2:05 ` Bin Meng
@ 2023-08-03 9:56 ` Bin Meng
0 siblings, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 9:56 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Mattijs Korpershoek, Heinrich Schuchardt,
Ramon Fried, Viacheslav Mitrofanov
On Mon, Jul 31, 2023 at 10:05 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > When CONFIG_ERRNO_STR is not enabled this shows a spurious 'E' from the
> > format string. Fix this.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > Fixes: 7f331941321 ("lib: Support printing an error string")
> > ---
> >
> > (no changes since v1)
> >
> > lib/vsprintf.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk()
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
` (2 preceding siblings ...)
2023-07-30 17:15 ` [PATCH v2 3/9] lib: Suppress E when writing error-string output Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 2:05 ` Bin Meng
2023-07-31 17:22 ` Mattijs Korpershoek
2023-07-30 17:15 ` [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling Simon Glass
` (4 subsequent siblings)
8 siblings, 2 replies; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Mattijs Korpershoek, Bin Meng, Simon Glass, Jaehoon Chung,
Marek Vasut, Peng Fan
This name is a little confusing since it suggests that it sets up the
sibling block device. In fact it sets up a bootdev for it. Rename the
function to make this clearer.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Fix the function name in the header as well
boot/bootdev-uclass.c | 8 +++++---
common/usb_storage.c | 2 +-
doc/develop/bootstd.rst | 4 ++--
drivers/mmc/mmc-uclass.c | 2 +-
drivers/nvme/nvme.c | 2 +-
drivers/scsi/scsi.c | 2 +-
drivers/virtio/virtio-uclass.c | 2 +-
include/bootdev.h | 10 +++++-----
8 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 9660ff75676d..114853ffb72a 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -262,7 +262,7 @@ static int bootdev_get_suffix_start(struct udevice *dev, const char *suffix)
return len;
}
-int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name)
+int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name)
{
struct udevice *parent, *dev;
char dev_name[50];
@@ -305,7 +305,9 @@ int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp)
if (device_get_uclass_id(dev) != UCLASS_BOOTDEV)
return -EINVAL;
- /* This should always work if bootdev_setup_sibling_blk() was used */
+ /*
+ * This should always work if bootdev_setup_for_sibling_blk() was used
+ */
len = bootdev_get_suffix_start(dev, ".bootdev");
ret = device_find_child_by_namelen(parent, dev->name, len, &blk);
if (ret) {
@@ -335,7 +337,7 @@ static int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp)
if (device_get_uclass_id(blk) != UCLASS_BLK)
return -EINVAL;
- /* This should always work if bootdev_setup_sibling_blk() was used */
+ /* This should always work if bootdev_setup_for_sibling_blk() was used */
len = bootdev_get_suffix_start(blk, ".blk");
snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name,
"bootdev");
diff --git a/common/usb_storage.c b/common/usb_storage.c
index ac6427577379..85774220ef2a 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -246,7 +246,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
if (ret)
return ret;
- ret = bootdev_setup_sibling_blk(dev, "usb_bootdev");
+ ret = bootdev_setup_for_sibling_blk(dev, "usb_bootdev");
if (ret) {
int ret2;
diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst
index 7a2a69fdfcec..ec3136535783 100644
--- a/doc/develop/bootstd.rst
+++ b/doc/develop/bootstd.rst
@@ -306,7 +306,7 @@ media device::
The bootdev device is typically created automatically in the media uclass'
`post_bind()` method by calling `bootdev_setup_for_dev()` or
-`bootdev_setup_sibling_blk()`. The code typically something like this::
+`bootdev_setup_for_sibling_blk()`. The code typically something like this::
/* dev is the Ethernet device */
ret = bootdev_setup_for_dev(dev, "eth_bootdev");
@@ -316,7 +316,7 @@ The bootdev device is typically created automatically in the media uclass'
or::
/* blk is the block device (child of MMC device)
- ret = bootdev_setup_sibling_blk(blk, "mmc_bootdev");
+ ret = bootdev_setup_for_sibling_blk(blk, "mmc_bootdev");
if (ret)
return log_msg_ret("bootdev", ret);
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 01d9b0201f2c..0e157672eae0 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -421,7 +421,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg)
mmc->cfg = cfg;
mmc->priv = dev;
- ret = bootdev_setup_sibling_blk(bdev, "mmc_bootdev");
+ ret = bootdev_setup_for_sibling_blk(bdev, "mmc_bootdev");
if (ret)
return log_msg_ret("bootdev", ret);
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index a7add66ab4d1..20dc910d8a33 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -910,7 +910,7 @@ int nvme_init(struct udevice *udev)
if (ret)
goto free_id;
- ret = bootdev_setup_sibling_blk(ns_udev, "nvme_bootdev");
+ ret = bootdev_setup_for_sibling_blk(ns_udev, "nvme_bootdev");
if (ret)
return log_msg_ret("bootdev", ret);
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 6caeb3fcdd0d..0a3420b7fbc2 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -607,7 +607,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose)
/* TODO: undo create */
return log_msg_ret("pro", ret);
- ret = bootdev_setup_sibling_blk(bdev, "scsi_bootdev");
+ ret = bootdev_setup_for_sibling_blk(bdev, "scsi_bootdev");
if (ret)
return log_msg_ret("bd", ret);
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 31bb21c534e5..87323ab6d193 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -248,7 +248,7 @@ static int virtio_uclass_post_probe(struct udevice *udev)
device_set_name_alloced(vdev);
if (uc_priv->device == VIRTIO_ID_BLOCK && !IS_ENABLED(CONFIG_SANDBOX)) {
- ret = bootdev_setup_sibling_blk(vdev, "virtio_bootdev");
+ ret = bootdev_setup_for_sibling_blk(vdev, "virtio_bootdev");
if (ret)
return log_msg_ret("bootdev", ret);
}
diff --git a/include/bootdev.h b/include/bootdev.h
index 1533adfe5065..848233187f87 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -371,7 +371,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp);
/**
* bootdev_setup_for_dev() - Bind a new bootdev device (deprecated)
*
- * Please use bootdev_setup_sibling_blk() instead since it supports multiple
+ * Please use bootdev_setup_for_sibling_blk() instead since it supports multiple
* (child) block devices for each media device.
*
* Creates a bootdev device as a child of @parent. This should be called from
@@ -386,7 +386,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp);
int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name);
/**
- * bootdev_setup_for_blk() - Bind a new bootdev device for a blk device
+ * bootdev_setup_for_sibling_blk() - Bind a new bootdev device for a blk device
*
* Creates a bootdev device as a sibling of @blk. This should be called from
* the driver's bind() method or its uclass' post_bind() method, at the same
@@ -398,7 +398,7 @@ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name);
* @drv_name: Name of bootdev driver to bind
* Return: 0 if OK, -ve on error
*/
-int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name);
+int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name);
/**
* bootdev_get_sibling_blk() - Locate the block device for a bootdev
@@ -428,8 +428,8 @@ static inline int bootdev_setup_for_dev(struct udevice *parent,
return 0;
}
-static inline int bootdev_setup_sibling_blk(struct udevice *blk,
- const char *drv_name)
+static inline int bootdev_setup_for_sibling_blk(struct udevice *blk,
+ const char *drv_name)
{
return 0;
}
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk()
2023-07-30 17:15 ` [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk() Simon Glass
@ 2023-07-31 2:05 ` Bin Meng
2023-07-31 17:22 ` Mattijs Korpershoek
1 sibling, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-07-31 2:05 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Mattijs Korpershoek, Jaehoon Chung,
Marek Vasut, Peng Fan
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> This name is a little confusing since it suggests that it sets up the
> sibling block device. In fact it sets up a bootdev for it. Rename the
> function to make this clearer.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Fix the function name in the header as well
>
> boot/bootdev-uclass.c | 8 +++++---
> common/usb_storage.c | 2 +-
> doc/develop/bootstd.rst | 4 ++--
> drivers/mmc/mmc-uclass.c | 2 +-
> drivers/nvme/nvme.c | 2 +-
> drivers/scsi/scsi.c | 2 +-
> drivers/virtio/virtio-uclass.c | 2 +-
> include/bootdev.h | 10 +++++-----
> 8 files changed, 17 insertions(+), 15 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk()
2023-07-30 17:15 ` [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk() Simon Glass
2023-07-31 2:05 ` Bin Meng
@ 2023-07-31 17:22 ` Mattijs Korpershoek
2023-08-03 9:57 ` Bin Meng
1 sibling, 1 reply; 32+ messages in thread
From: Mattijs Korpershoek @ 2023-07-31 17:22 UTC (permalink / raw)
To: Simon Glass, U-Boot Mailing List
Cc: Bin Meng, Simon Glass, Jaehoon Chung, Marek Vasut, Peng Fan
On dim., juil. 30, 2023 at 11:15, Simon Glass <sjg@chromium.org> wrote:
> This name is a little confusing since it suggests that it sets up the
> sibling block device. In fact it sets up a bootdev for it. Rename the
> function to make this clearer.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>
> Changes in v2:
> - Fix the function name in the header as well
>
> boot/bootdev-uclass.c | 8 +++++---
> common/usb_storage.c | 2 +-
> doc/develop/bootstd.rst | 4 ++--
> drivers/mmc/mmc-uclass.c | 2 +-
> drivers/nvme/nvme.c | 2 +-
> drivers/scsi/scsi.c | 2 +-
> drivers/virtio/virtio-uclass.c | 2 +-
> include/bootdev.h | 10 +++++-----
> 8 files changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
> index 9660ff75676d..114853ffb72a 100644
> --- a/boot/bootdev-uclass.c
> +++ b/boot/bootdev-uclass.c
> @@ -262,7 +262,7 @@ static int bootdev_get_suffix_start(struct udevice *dev, const char *suffix)
> return len;
> }
>
> -int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name)
> +int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name)
> {
> struct udevice *parent, *dev;
> char dev_name[50];
> @@ -305,7 +305,9 @@ int bootdev_get_sibling_blk(struct udevice *dev, struct udevice **blkp)
> if (device_get_uclass_id(dev) != UCLASS_BOOTDEV)
> return -EINVAL;
>
> - /* This should always work if bootdev_setup_sibling_blk() was used */
> + /*
> + * This should always work if bootdev_setup_for_sibling_blk() was used
> + */
> len = bootdev_get_suffix_start(dev, ".bootdev");
> ret = device_find_child_by_namelen(parent, dev->name, len, &blk);
> if (ret) {
> @@ -335,7 +337,7 @@ static int bootdev_get_from_blk(struct udevice *blk, struct udevice **bootdevp)
> if (device_get_uclass_id(blk) != UCLASS_BLK)
> return -EINVAL;
>
> - /* This should always work if bootdev_setup_sibling_blk() was used */
> + /* This should always work if bootdev_setup_for_sibling_blk() was used */
> len = bootdev_get_suffix_start(blk, ".blk");
> snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name,
> "bootdev");
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index ac6427577379..85774220ef2a 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -246,7 +246,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
> if (ret)
> return ret;
>
> - ret = bootdev_setup_sibling_blk(dev, "usb_bootdev");
> + ret = bootdev_setup_for_sibling_blk(dev, "usb_bootdev");
> if (ret) {
> int ret2;
>
> diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst
> index 7a2a69fdfcec..ec3136535783 100644
> --- a/doc/develop/bootstd.rst
> +++ b/doc/develop/bootstd.rst
> @@ -306,7 +306,7 @@ media device::
>
> The bootdev device is typically created automatically in the media uclass'
> `post_bind()` method by calling `bootdev_setup_for_dev()` or
> -`bootdev_setup_sibling_blk()`. The code typically something like this::
> +`bootdev_setup_for_sibling_blk()`. The code typically something like this::
>
> /* dev is the Ethernet device */
> ret = bootdev_setup_for_dev(dev, "eth_bootdev");
> @@ -316,7 +316,7 @@ The bootdev device is typically created automatically in the media uclass'
> or::
>
> /* blk is the block device (child of MMC device)
> - ret = bootdev_setup_sibling_blk(blk, "mmc_bootdev");
> + ret = bootdev_setup_for_sibling_blk(blk, "mmc_bootdev");
> if (ret)
> return log_msg_ret("bootdev", ret);
>
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index 01d9b0201f2c..0e157672eae0 100644
> --- a/drivers/mmc/mmc-uclass.c
> +++ b/drivers/mmc/mmc-uclass.c
> @@ -421,7 +421,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg)
> mmc->cfg = cfg;
> mmc->priv = dev;
>
> - ret = bootdev_setup_sibling_blk(bdev, "mmc_bootdev");
> + ret = bootdev_setup_for_sibling_blk(bdev, "mmc_bootdev");
> if (ret)
> return log_msg_ret("bootdev", ret);
>
> diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
> index a7add66ab4d1..20dc910d8a33 100644
> --- a/drivers/nvme/nvme.c
> +++ b/drivers/nvme/nvme.c
> @@ -910,7 +910,7 @@ int nvme_init(struct udevice *udev)
> if (ret)
> goto free_id;
>
> - ret = bootdev_setup_sibling_blk(ns_udev, "nvme_bootdev");
> + ret = bootdev_setup_for_sibling_blk(ns_udev, "nvme_bootdev");
> if (ret)
> return log_msg_ret("bootdev", ret);
>
> diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
> index 6caeb3fcdd0d..0a3420b7fbc2 100644
> --- a/drivers/scsi/scsi.c
> +++ b/drivers/scsi/scsi.c
> @@ -607,7 +607,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose)
> /* TODO: undo create */
> return log_msg_ret("pro", ret);
>
> - ret = bootdev_setup_sibling_blk(bdev, "scsi_bootdev");
> + ret = bootdev_setup_for_sibling_blk(bdev, "scsi_bootdev");
> if (ret)
> return log_msg_ret("bd", ret);
>
> diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
> index 31bb21c534e5..87323ab6d193 100644
> --- a/drivers/virtio/virtio-uclass.c
> +++ b/drivers/virtio/virtio-uclass.c
> @@ -248,7 +248,7 @@ static int virtio_uclass_post_probe(struct udevice *udev)
> device_set_name_alloced(vdev);
>
> if (uc_priv->device == VIRTIO_ID_BLOCK && !IS_ENABLED(CONFIG_SANDBOX)) {
> - ret = bootdev_setup_sibling_blk(vdev, "virtio_bootdev");
> + ret = bootdev_setup_for_sibling_blk(vdev, "virtio_bootdev");
> if (ret)
> return log_msg_ret("bootdev", ret);
> }
> diff --git a/include/bootdev.h b/include/bootdev.h
> index 1533adfe5065..848233187f87 100644
> --- a/include/bootdev.h
> +++ b/include/bootdev.h
> @@ -371,7 +371,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp);
> /**
> * bootdev_setup_for_dev() - Bind a new bootdev device (deprecated)
> *
> - * Please use bootdev_setup_sibling_blk() instead since it supports multiple
> + * Please use bootdev_setup_for_sibling_blk() instead since it supports multiple
> * (child) block devices for each media device.
> *
> * Creates a bootdev device as a child of @parent. This should be called from
> @@ -386,7 +386,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp);
> int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name);
>
> /**
> - * bootdev_setup_for_blk() - Bind a new bootdev device for a blk device
> + * bootdev_setup_for_sibling_blk() - Bind a new bootdev device for a blk device
> *
> * Creates a bootdev device as a sibling of @blk. This should be called from
> * the driver's bind() method or its uclass' post_bind() method, at the same
> @@ -398,7 +398,7 @@ int bootdev_setup_for_dev(struct udevice *parent, const char *drv_name);
> * @drv_name: Name of bootdev driver to bind
> * Return: 0 if OK, -ve on error
> */
> -int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name);
> +int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name);
>
> /**
> * bootdev_get_sibling_blk() - Locate the block device for a bootdev
> @@ -428,8 +428,8 @@ static inline int bootdev_setup_for_dev(struct udevice *parent,
> return 0;
> }
>
> -static inline int bootdev_setup_sibling_blk(struct udevice *blk,
> - const char *drv_name)
> +static inline int bootdev_setup_for_sibling_blk(struct udevice *blk,
> + const char *drv_name)
> {
> return 0;
> }
> --
> 2.41.0.487.g6d72f3e995-goog
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk()
2023-07-31 17:22 ` Mattijs Korpershoek
@ 2023-08-03 9:57 ` Bin Meng
0 siblings, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 9:57 UTC (permalink / raw)
To: Mattijs Korpershoek
Cc: Simon Glass, U-Boot Mailing List, Jaehoon Chung, Marek Vasut,
Peng Fan
On Tue, Aug 1, 2023 at 1:23 AM Mattijs Korpershoek
<mkorpershoek@baylibre.com> wrote:
>
> On dim., juil. 30, 2023 at 11:15, Simon Glass <sjg@chromium.org> wrote:
>
> > This name is a little confusing since it suggests that it sets up the
> > sibling block device. In fact it sets up a bootdev for it. Rename the
> > function to make this clearer.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>
> > ---
> >
> > Changes in v2:
> > - Fix the function name in the header as well
> >
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
` (3 preceding siblings ...)
2023-07-30 17:15 ` [PATCH v2 4/9] bootstd: Rename bootdev_setup_sibling_blk() Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 1:58 ` Bin Meng
2023-08-03 9:58 ` Bin Meng
2023-07-30 17:15 ` [PATCH v2 6/9] bootstd: Add some more debugging in the bootdev uclass Simon Glass
` (3 subsequent siblings)
8 siblings, 2 replies; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Mattijs Korpershoek, Bin Meng, Simon Glass
Use the correct function here, since there may be multiple IDE devices
available.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
---
(no changes since v1)
drivers/block/ide.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 89201dd4d229..c698f9cbd558 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -1059,9 +1059,9 @@ static int ide_probe(struct udevice *udev)
desc->lba48 = pdesc.lba48;
desc->type = pdesc.type;
- ret = bootdev_setup_for_dev(udev, "ide_bootdev");
+ ret = bootdev_setup_for_sibling_blk(blk, "ide_bootdev");
if (ret)
- return log_msg_ret("bootdev", ret);
+ return log_msg_ret("bd", ret);
}
return 0;
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling
2023-07-30 17:15 ` [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling Simon Glass
@ 2023-07-31 1:58 ` Bin Meng
2023-07-31 2:50 ` Simon Glass
2023-08-03 9:58 ` Bin Meng
1 sibling, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-07-31 1:58 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Simon,
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> Use the correct function here, since there may be multiple IDE devices
> available.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>
> (no changes since v1)
>
> drivers/block/ide.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/ide.c b/drivers/block/ide.c
> index 89201dd4d229..c698f9cbd558 100644
> --- a/drivers/block/ide.c
> +++ b/drivers/block/ide.c
> @@ -1059,9 +1059,9 @@ static int ide_probe(struct udevice *udev)
> desc->lba48 = pdesc.lba48;
> desc->type = pdesc.type;
>
> - ret = bootdev_setup_for_dev(udev, "ide_bootdev");
> + ret = bootdev_setup_for_sibling_blk(blk, "ide_bootdev");
> if (ret)
> - return log_msg_ret("bootdev", ret);
> + return log_msg_ret("bd", ret);
Why changes from bootdev to bd here? To me, bd is unclear, and sounds
like "boardinfo" in U-Boot.
> }
>
> return 0;
> --
Regards,
Bin
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling
2023-07-31 1:58 ` Bin Meng
@ 2023-07-31 2:50 ` Simon Glass
2023-07-31 3:37 ` Bin Meng
0 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-31 2:50 UTC (permalink / raw)
To: Bin Meng; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Bin,
On Sun, 30 Jul 2023 at 19:59, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
>
> > }
> >
> > return 0;
> > --
>
> Regards,
> Bin
> > Use the correct function here, since there may be multiple IDE devices
> > available.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> > ---
> >
> > (no changes since v1)
> >
> > drivers/block/ide.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/block/ide.c b/drivers/block/ide.c
> > index 89201dd4d229..c698f9cbd558 100644
> > --- a/drivers/block/ide.c
> > +++ b/drivers/block/ide.c
> > @@ -1059,9 +1059,9 @@ static int ide_probe(struct udevice *udev)
> > desc->lba48 = pdesc.lba48;
> > desc->type = pdesc.type;
> >
> > - ret = bootdev_setup_for_dev(udev, "ide_bootdev");
> > + ret = bootdev_setup_for_sibling_blk(blk, "ide_bootdev");
> > if (ret)
> > - return log_msg_ret("bootdev", ret);
> > + return log_msg_ret("bd", ret);
>
> Why changes from bootdev to bd here? To me, bd is unclear, and sounds
> like "boardinfo" in U-Boot.
I don't need to...the goal is to have the strings be 4 bytes or less,
so they don't use up too much space in the image...but also have them
unique enough that you can look at the function and see which call
site failed.
For this one, I don't mind either way.
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling
2023-07-31 2:50 ` Simon Glass
@ 2023-07-31 3:37 ` Bin Meng
2023-07-31 13:59 ` Simon Glass
0 siblings, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-07-31 3:37 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Simon,
On Mon, Jul 31, 2023 at 10:50 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Bin,
>
> On Sun, 30 Jul 2023 at 19:59, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> > >
>
> >
> > > }
> > >
> > > return 0;
> > > --
> >
> > Regards,
> > Bin
> > > Use the correct function here, since there may be multiple IDE devices
> > > available.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > > drivers/block/ide.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/block/ide.c b/drivers/block/ide.c
> > > index 89201dd4d229..c698f9cbd558 100644
> > > --- a/drivers/block/ide.c
> > > +++ b/drivers/block/ide.c
> > > @@ -1059,9 +1059,9 @@ static int ide_probe(struct udevice *udev)
> > > desc->lba48 = pdesc.lba48;
> > > desc->type = pdesc.type;
> > >
> > > - ret = bootdev_setup_for_dev(udev, "ide_bootdev");
> > > + ret = bootdev_setup_for_sibling_blk(blk, "ide_bootdev");
> > > if (ret)
> > > - return log_msg_ret("bootdev", ret);
> > > + return log_msg_ret("bd", ret);
> >
> > Why changes from bootdev to bd here? To me, bd is unclear, and sounds
> > like "boardinfo" in U-Boot.
>
> I don't need to...the goal is to have the strings be 4 bytes or less,
> so they don't use up too much space in the image...but also have them
> unique enough that you can look at the function and see which call
> site failed.
I see the needs of saving size in TPL, or maybe SPL, but not everywhere, right?
>
> For this one, I don't mind either way.
Regards,
Bin
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling
2023-07-31 3:37 ` Bin Meng
@ 2023-07-31 13:59 ` Simon Glass
0 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2023-07-31 13:59 UTC (permalink / raw)
To: Bin Meng; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Bin,
On Sun, 30 Jul 2023 at 21:37, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Mon, Jul 31, 2023 at 10:50 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Bin,
> >
> > On Sun, 30 Jul 2023 at 19:59, Bin Meng <bmeng.cn@gmail.com> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> > > >
> >
> > >
> > > > }
> > > >
> > > > return 0;
> > > > --
> > >
> > > Regards,
> > > Bin
> > > > Use the correct function here, since there may be multiple IDE devices
> > > > available.
> > > >
> > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> > > > ---
> > > >
> > > > (no changes since v1)
> > > >
> > > > drivers/block/ide.c | 4 ++--
> > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/block/ide.c b/drivers/block/ide.c
> > > > index 89201dd4d229..c698f9cbd558 100644
> > > > --- a/drivers/block/ide.c
> > > > +++ b/drivers/block/ide.c
> > > > @@ -1059,9 +1059,9 @@ static int ide_probe(struct udevice *udev)
> > > > desc->lba48 = pdesc.lba48;
> > > > desc->type = pdesc.type;
> > > >
> > > > - ret = bootdev_setup_for_dev(udev, "ide_bootdev");
> > > > + ret = bootdev_setup_for_sibling_blk(blk, "ide_bootdev");
> > > > if (ret)
> > > > - return log_msg_ret("bootdev", ret);
> > > > + return log_msg_ret("bd", ret);
> > >
> > > Why changes from bootdev to bd here? To me, bd is unclear, and sounds
> > > like "boardinfo" in U-Boot.
> >
> > I don't need to...the goal is to have the strings be 4 bytes or less,
> > so they don't use up too much space in the image...but also have them
> > unique enough that you can look at the function and see which call
> > site failed.
>
> I see the needs of saving size in TPL, or maybe SPL, but not everywhere, right?
The thing is, we only have one knob to control this - CONFIG_LOG_ERROR_RETURN
When you enable it, all of the log_msg_ret() calls in U-Boot produce a
string. So there is quite a big impact.
For example, on coral, the text size increases by about 35KB. So it is
about a 6% increase. If it gets to much then it might not fit, or it
might cause other prolbems. For example, we have fixed-size regions in
binman for U-Boot.
Regards,
Simon
>
> >
> > For this one, I don't mind either way.
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling
2023-07-30 17:15 ` [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling Simon Glass
2023-07-31 1:58 ` Bin Meng
@ 2023-08-03 9:58 ` Bin Meng
1 sibling, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 9:58 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> Use the correct function here, since there may be multiple IDE devices
> available.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>
> (no changes since v1)
>
> drivers/block/ide.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 6/9] bootstd: Add some more debugging in the bootdev uclass
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
` (4 preceding siblings ...)
2023-07-30 17:15 ` [PATCH v2 5/9] bootstd: Correct creating of bootdev sibling Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 2:05 ` Bin Meng
2023-07-30 17:15 ` [PATCH v2 7/9] x86: coreboot: Add IDE and SATA Simon Glass
` (2 subsequent siblings)
8 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Mattijs Korpershoek, Bin Meng, Simon Glass
Add some more output to make it easier to see what is going wrong when
a bootdev hunter fails.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
boot/bootdev-uclass.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 114853ffb72a..a3661b18e28d 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -537,6 +537,8 @@ static int default_get_bootflow(struct udevice *dev, struct bootflow_iter *iter,
int ret;
ret = bootdev_get_sibling_blk(dev, &blk);
+ log_debug("sibling_blk ret=%d, blk=%s\n", ret,
+ ret ? "(none)" : blk->name);
/*
* If there is no media, indicate that no more partitions should be
* checked
@@ -662,7 +664,8 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp)
ret = bootdev_hunt_prio(iter->cur_prio,
iter->flags &
BOOTFLOWIF_SHOW);
- log_debug("- hunt ret %d\n", ret);
+ log_debug("- bootdev_hunt_prio() ret %d\n",
+ ret);
if (ret)
return log_msg_ret("hun", ret);
}
@@ -698,6 +701,7 @@ int bootdev_setup_iter(struct bootflow_iter *iter, const char *label,
/* hunt for any pre-scan devices */
if (iter->flags & BOOTFLOWIF_HUNT) {
ret = bootdev_hunt_prio(BOOTDEVP_1_PRE_SCAN, show);
+ log_debug("- bootdev_hunt_prio() ret %d\n", ret);
if (ret)
return log_msg_ret("pre", ret);
}
@@ -768,6 +772,7 @@ static int bootdev_hunt_drv(struct bootdev_hunter *info, uint seq, bool show)
log_debug("Hunting with: %s\n", name);
if (info->hunt) {
ret = info->hunt(info, show);
+ log_debug(" - hunt result %d\n", ret);
if (ret)
return ret;
}
@@ -833,9 +838,11 @@ int bootdev_hunt_prio(enum bootdev_prio_t prio, bool show)
if (prio != info->prio)
continue;
ret = bootdev_hunt_drv(info, i, show);
+ log_debug("bootdev_hunt_drv() return %d\n", ret);
if (ret && ret != -ENOENT)
result = ret;
}
+ log_debug("exit %d\n", result);
return result;
}
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 6/9] bootstd: Add some more debugging in the bootdev uclass
2023-07-30 17:15 ` [PATCH v2 6/9] bootstd: Add some more debugging in the bootdev uclass Simon Glass
@ 2023-07-31 2:05 ` Bin Meng
2023-08-03 9:59 ` Bin Meng
0 siblings, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-07-31 2:05 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> Add some more output to make it easier to see what is going wrong when
> a bootdev hunter fails.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
> boot/bootdev-uclass.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 6/9] bootstd: Add some more debugging in the bootdev uclass
2023-07-31 2:05 ` Bin Meng
@ 2023-08-03 9:59 ` Bin Meng
0 siblings, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 9:59 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
On Mon, Jul 31, 2023 at 10:05 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Add some more output to make it easier to see what is going wrong when
> > a bootdev hunter fails.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > (no changes since v1)
> >
> > boot/bootdev-uclass.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 7/9] x86: coreboot: Add IDE and SATA
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
` (5 preceding siblings ...)
2023-07-30 17:15 ` [PATCH v2 6/9] bootstd: Add some more debugging in the bootdev uclass Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 2:03 ` Bin Meng
2023-07-30 17:15 ` [PATCH v2 8/9] x86: coreboot: Enable standard boot Simon Glass
2023-07-30 17:15 ` [PATCH v2 9/9] x86: coreboot: Enable support for CBFS Simon Glass
8 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Mattijs Korpershoek, Bin Meng, Simon Glass
Add these options to permit access to more disk types.
Add some documentation as well.
Signed-off-by: Simon Glass <sjg@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`::
+
+ 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
+
+Then you can scan it with `scsi scan` and access it normally.
+
+To use 4GB of memory, typically necessary for booting Linux distros, add
+`-m 4GB`.
+
64-bit U-Boot
-------------
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 7/9] x86: coreboot: Add IDE and SATA
2023-07-30 17:15 ` [PATCH v2 7/9] x86: coreboot: Add IDE and SATA Simon Glass
@ 2023-07-31 2:03 ` Bin Meng
2023-07-31 2:50 ` Simon Glass
0 siblings, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-07-31 2:03 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Simon,
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> Add these options to permit access to more disk types.
>
> Add some documentation as well.
>
> Signed-off-by: Simon Glass <sjg@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?
> +
> +Then you can scan it with `scsi scan` and access it normally.
> +
> +To use 4GB of memory, typically necessary for booting Linux distros, add
> +`-m 4GB`.
> +
> 64-bit U-Boot
> -------------
>
> --
Regards,
Bin
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 7/9] x86: coreboot: Add IDE and SATA
2023-07-31 2:03 ` Bin Meng
@ 2023-07-31 2:50 ` Simon Glass
2023-08-03 10:27 ` Bin Meng
0 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-31 2:50 UTC (permalink / raw)
To: Bin Meng; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Bin,
On Sun, 30 Jul 2023 at 20:03, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Add these options to permit access to more disk types.
> >
> > Add some documentation as well.
> >
> > Signed-off-by: Simon Glass <sjg@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?
> > +
> > +Then you can scan it with `scsi scan` and access it normally.
> > +
> > +To use 4GB of memory, typically necessary for booting Linux distros, add
> > +`-m 4GB`.
> > +
> > 64-bit U-Boot
> > -------------
> >
> > --
>
Regards,
Simon
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 7/9] x86: coreboot: Add IDE and SATA
2023-07-31 2:50 ` Simon Glass
@ 2023-08-03 10:27 ` Bin Meng
0 siblings, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 10:27 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Simon,
On Mon, Jul 31, 2023 at 10:50 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Bin,
>
> On Sun, 30 Jul 2023 at 20:03, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Add these options to permit access to more disk types.
> > >
> > > Add some documentation as well.
> > >
> > > Signed-off-by: Simon Glass <sjg@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
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 8/9] x86: coreboot: Enable standard boot
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
` (6 preceding siblings ...)
2023-07-30 17:15 ` [PATCH v2 7/9] x86: coreboot: Add IDE and SATA Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-30 17:15 ` [PATCH v2 9/9] x86: coreboot: Enable support for CBFS Simon Glass
8 siblings, 0 replies; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Mattijs Korpershoek, Bin Meng, Simon Glass
Enable bootstd options and provide instructions on how to boot a linux
distro using coreboot.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
configs/coreboot64_defconfig | 14 ++------------
configs/coreboot_defconfig | 1 +
doc/board/coreboot/coreboot.rst | 16 ++++++++++++++--
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/configs/coreboot64_defconfig b/configs/coreboot64_defconfig
index ded0e6f2422d..602465175d20 100644
--- a/configs/coreboot64_defconfig
+++ b/configs/coreboot64_defconfig
@@ -10,40 +10,30 @@ CONFIG_VENDOR_COREBOOT=y
CONFIG_TARGET_COREBOOT=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_SYS_MONITOR_BASE=0x01120000
CONFIG_SHOW_BOOT_PROGRESS=y
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro"
-CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
CONFIG_PRE_CONSOLE_BUFFER=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_LAST_STAGE_INIT=y
CONFIG_SPL_NO_BSS_LIMIT=y
-CONFIG_HUSH_PARSER=y
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
CONFIG_BOOTP_BOOTFILESIZE=y
-CONFIG_CMD_PING=y
CONFIG_CMD_TIME=y
CONFIG_CMD_SOUND=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
CONFIG_MAC_PARTITION=y
# CONFIG_SPL_MAC_PARTITION is not set
# CONFIG_SPL_DOS_PARTITION is not set
-CONFIG_ISO_PARTITION=y
-CONFIG_EFI_PARTITION=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig
index 56cc542df6c6..735cd6eb4c22 100644
--- a/configs/coreboot_defconfig
+++ b/configs/coreboot_defconfig
@@ -10,6 +10,7 @@ CONFIG_TARGET_COREBOOT=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_BOOTSTD_FULL=y
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_SYS_MONITOR_BASE=0x01110000
CONFIG_SHOW_BOOT_PROGRESS=y
CONFIG_USE_BOOTARGS=y
diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst
index 8e638a3c74cf..d09dfc553c87 100644
--- a/doc/board/coreboot/coreboot.rst
+++ b/doc/board/coreboot/coreboot.rst
@@ -67,9 +67,21 @@ To use 4GB of memory, typically necessary for booting Linux distros, add
In addition to the 32-bit 'coreboot' build there is a 'coreboot64' build. This
produces an image which can be booted from coreboot (32-bit). Internally it
works by using a 32-bit SPL binary to switch to 64-bit for running U-Boot. It
-can be useful for running UEFI applications, for example.
+can be useful for running UEFI applications, for example with the coreboot
+build in `$CBDIR`::
+
+ DISK=ubuntu-23.04-desktop-amd64.iso
+ CBDIR=~/coreboot/build
+
+ cp $CBDIR/coreboot.rom.in coreboot.rom
+ cbfstool coreboot.rom add-flat-binary -f u-boot-x86-with-spl.bin \
+ -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000
+
+ qemu-system-x86_64 -m 2G -smp 4 -bios coreboot.rom \
+ -drive id=disk,file=$DISK,if=none \
+ -device ahci,id=ahci \
+ -device ide-hd,drive=disk,bus=ahci.0 \
-This has only been lightly tested.
Memory map
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* [PATCH v2 9/9] x86: coreboot: Enable support for CBFS
2023-07-30 17:15 [PATCH v2 0/9] x86: Improve bootstd support Simon Glass
` (7 preceding siblings ...)
2023-07-30 17:15 ` [PATCH v2 8/9] x86: coreboot: Enable standard boot Simon Glass
@ 2023-07-30 17:15 ` Simon Glass
2023-07-31 2:04 ` Bin Meng
8 siblings, 1 reply; 32+ messages in thread
From: Simon Glass @ 2023-07-30 17:15 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Mattijs Korpershoek, Bin Meng, Simon Glass
This is normally used with coreboot, so enable support for it in the
coreboot builds.
Add an example to show how it is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
configs/coreboot64_defconfig | 1 +
configs/coreboot_defconfig | 1 +
doc/board/coreboot/coreboot.rst | 34 +++++++++++++++++++++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/configs/coreboot64_defconfig b/configs/coreboot64_defconfig
index 602465175d20..55064d1ce66f 100644
--- a/configs/coreboot64_defconfig
+++ b/configs/coreboot64_defconfig
@@ -56,3 +56,4 @@ CONFIG_SOUND=y
CONFIG_SOUND_I8254=y
CONFIG_CONSOLE_SCROLL_LINES=5
# CONFIG_GZIP is not set
+CONFIG_CMD_CBFS=y
diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig
index 735cd6eb4c22..77214f1b4c06 100644
--- a/configs/coreboot_defconfig
+++ b/configs/coreboot_defconfig
@@ -66,3 +66,4 @@ CONFIG_CONSOLE_SCROLL_LINES=5
CONFIG_CMD_DHRYSTONE=y
# CONFIG_GZIP is not set
CONFIG_SMBIOS_PARSER=y
+CONFIG_CMD_CBFS=y
diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst
index d09dfc553c87..11e461a2ae0b 100644
--- a/doc/board/coreboot/coreboot.rst
+++ b/doc/board/coreboot/coreboot.rst
@@ -83,6 +83,40 @@ build in `$CBDIR`::
-device ide-hd,drive=disk,bus=ahci.0 \
+CBFS access
+-----------
+
+You can use the 'cbfs' commands to access the Coreboot filesystem::
+
+ => cbfsinit
+ => cbfsinfo
+
+ CBFS version: 0x31313132
+ ROM size: 0x100000
+ Boot block size: 0x4
+ CBFS size: 0xffdfc
+ Alignment: 64
+ Offset: 0x200
+
+ => cbfsls
+ size type name
+ ------------------------------------------
+ 32 cbfs header cbfs master header
+ 16720 17 fallback/romstage
+ 53052 17 fallback/ramstage
+ 398 raw config
+ 715 raw revision
+ 117 raw build_info
+ 4044 raw fallback/dsdt.aml
+ 640 cmos layout cmos_layout.bin
+ 17804 17 fallback/postcar
+ 335797 payload fallback/payload
+ 607000 null (empty)
+ 10752 bootblock bootblock
+
+ 12 file(s)
+
+ =>
Memory map
----------
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 32+ messages in thread* Re: [PATCH v2 9/9] x86: coreboot: Enable support for CBFS
2023-07-30 17:15 ` [PATCH v2 9/9] x86: coreboot: Enable support for CBFS Simon Glass
@ 2023-07-31 2:04 ` Bin Meng
2023-08-03 10:01 ` Bin Meng
0 siblings, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-07-31 2:04 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
>
> This is normally used with coreboot, so enable support for it in the
> coreboot builds.
>
> Add an example to show how it is used.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
> configs/coreboot64_defconfig | 1 +
> configs/coreboot_defconfig | 1 +
> doc/board/coreboot/coreboot.rst | 34 +++++++++++++++++++++++++++++++++
> 3 files changed, 36 insertions(+)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 9/9] x86: coreboot: Enable support for CBFS
2023-07-31 2:04 ` Bin Meng
@ 2023-08-03 10:01 ` Bin Meng
2023-08-03 10:07 ` Bin Meng
0 siblings, 1 reply; 32+ messages in thread
From: Bin Meng @ 2023-08-03 10:01 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
On Mon, Jul 31, 2023 at 10:04 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > This is normally used with coreboot, so enable support for it in the
> > coreboot builds.
> >
> > Add an example to show how it is used.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > (no changes since v1)
> >
> > configs/coreboot64_defconfig | 1 +
> > configs/coreboot_defconfig | 1 +
> > doc/board/coreboot/coreboot.rst | 34 +++++++++++++++++++++++++++++++++
> > 3 files changed, 36 insertions(+)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 9/9] x86: coreboot: Enable support for CBFS
2023-08-03 10:01 ` Bin Meng
@ 2023-08-03 10:07 ` Bin Meng
0 siblings, 0 replies; 32+ messages in thread
From: Bin Meng @ 2023-08-03 10:07 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Mattijs Korpershoek
Hi Simon,
On Thu, Aug 3, 2023 at 6:01 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 31, 2023 at 10:04 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Mon, Jul 31, 2023 at 1:15 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > This is normally used with coreboot, so enable support for it in the
> > > coreboot builds.
> > >
> > > Add an example to show how it is used.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > > configs/coreboot64_defconfig | 1 +
> > > configs/coreboot_defconfig | 1 +
It turns out there is no need to explicitly add CMD_CBFS in the
defconfigs, as it is already implied by SYS_COREBOOT.
> > > doc/board/coreboot/coreboot.rst | 34 +++++++++++++++++++++++++++++++++
> > > 3 files changed, 36 insertions(+)
> > >
> >
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>
> applied to u-boot-x86, thanks!
Commit edited in u-boot-x86.
Regards,
Bin
^ permalink raw reply [flat|nested] 32+ messages in thread