Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39005 )
Change subject: [WIP]coreboot_tables: Support multiple framebuffers ......................................................................
[WIP]coreboot_tables: Support multiple framebuffers
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 23 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/1
diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h index 5bebd4a..3887a29 100644 --- a/src/include/boot/coreboot_tables.h +++ b/src/include/boot/coreboot_tables.h @@ -18,14 +18,11 @@ void uart_fill_lb(void *data); void lb_add_serial(struct lb_serial *serial, void *data); void lb_add_console(uint16_t consoletype, void *data); +void lb_framebuffer(struct lb_header *header);
/* Define this in mainboard.c to add board-specific table entries. */ void lb_board(struct lb_header *header);
-/* Define this function to fill in the frame buffer returning 0 on success and - < 0 on error. */ -int fill_lb_framebuffer(struct lb_framebuffer *framebuffer); - /* Allow arch to add records. */ void lb_arch_add_records(struct lb_header *header);
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index e42cb3b..3f9b2dc 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -133,28 +133,6 @@ console->type = consoletype; }
-static void lb_framebuffer(struct lb_header *header) -{ - struct lb_framebuffer *framebuffer; - struct lb_framebuffer fb = {0}; - - if (!CONFIG(LINEAR_FRAMEBUFFER) || fill_lb_framebuffer(&fb)) - return; - - framebuffer = (struct lb_framebuffer *)lb_new_record(header); - memcpy(framebuffer, &fb, sizeof(*framebuffer)); - framebuffer->tag = LB_TAG_FRAMEBUFFER; - framebuffer->size = sizeof(*framebuffer); - - if (CONFIG(BOOTSPLASH)) { - uint8_t *fb_ptr = (uint8_t *)(uintptr_t)framebuffer->physical_address; - unsigned int width = framebuffer->x_resolution; - unsigned int height = framebuffer->y_resolution; - unsigned int depth = framebuffer->bits_per_pixel; - set_bootsplash(fb_ptr, width, height, depth); - } -} - void lb_add_gpios(struct lb_gpios *gpios, const struct lb_gpio *gpio_table, size_t count) { @@ -531,8 +509,10 @@ /* Record our various random string information */ lb_strings(head); lb_record_version_timestamp(head); + /* Record our framebuffer */ - lb_framebuffer(head); + if (CONFIG(LINEAR_FRAMEBUFFER)) + lb_framebuffer(head);
#if CONFIG(CHROMEOS) /* Record our GPIO settings (ChromeOS specific) */ diff --git a/src/lib/edid_fill_fb.c b/src/lib/edid_fill_fb.c index 3abcdd0..1928335 100644 --- a/src/lib/edid_fill_fb.c +++ b/src/lib/edid_fill_fb.c @@ -36,6 +36,8 @@
/* * Allocate a new framebuffer info struct on heap. + * The caller must not free the returned pointer. + * * Returns NULL on error. */ struct edid_fb_info *fb_new_framebuffer_info(void) @@ -147,13 +149,25 @@ return info; }
-int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) +void lb_framebuffer(struct lb_header *header) { + struct lb_framebuffer *framebuffer; + for (struct edid_fb_info *i = list; i != NULL; i = i->next) { - if (i->valid) { - *framebuffer = i->edid_fb; - return 0; + if (!i->valid) + continue; + + framebuffer = (struct lb_framebuffer *)lb_new_record(header); + memcpy(framebuffer, &i->edid_fb, sizeof(*framebuffer)); + framebuffer->tag = LB_TAG_FRAMEBUFFER; + framebuffer->size = sizeof(*framebuffer); + + if (CONFIG(BOOTSPLASH)) { + uint8_t *fb_ptr = (uint8_t *)(uintptr_t)framebuffer->physical_address; + unsigned int width = framebuffer->x_resolution; + unsigned int height = framebuffer->y_resolution; + unsigned int depth = framebuffer->bits_per_pixel; + set_bootsplash(fb_ptr, width, height, depth); } } - return -1; }
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#2).
Change subject: [WIP]coreboot_tables: Support multiple framebuffers ......................................................................
[WIP]coreboot_tables: Support multiple framebuffers
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 23 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#3).
Change subject: [TESTME]coreboot_tables: Support multiple framebuffers ......................................................................
[TESTME]coreboot_tables: Support multiple framebuffers
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 23 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/3
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#4).
Change subject: [TESTME]coreboot_tables: Support multiple framebuffers ......................................................................
[TESTME]coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 23 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/4
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#5).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
Tested on: * QEMU VGA cirrus * QEMU VGA bochs * Aspeed AST2500 NGI * Lenovo X220 using libgfxinit * Intel FSP2.0 GOP
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 23 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/5
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39005 )
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39005/6/src/lib/edid_fill_fb.c File src/lib/edid_fill_fb.c:
https://review.coreboot.org/c/coreboot/+/39005/6/src/lib/edid_fill_fb.c@190 PS6, Line 190: set_bootsplash(fb_ptr, width, height, depth); It would be good to make set_bootsplash cache the mapped CBFS file now that it can be called more than once.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#7).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 21 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/7
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#10).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 24 insertions(+), 35 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/10
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#13).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 21 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/13
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#15).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 22 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/15
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39005 )
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
Patch Set 15:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39005/6/src/lib/edid_fill_fb.c File src/lib/edid_fill_fb.c:
https://review.coreboot.org/c/coreboot/+/39005/6/src/lib/edid_fill_fb.c@190 PS6, Line 190: set_bootsplash(fb_ptr, width, height, depth);
It would be good to make set_bootsplash cache the mapped CBFS file now that it can be called more th […]
Added a FIXME.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#16).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 22 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/16
Hello build bot (Jenkins), Christian Walter, Angel Pons, Arthur Heymans,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39005
to look at the new patch set (#26).
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
coreboot_tables: Support multiple framebuffers
Currently it's not possible to add multiple graphics driver into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics driver can use.
This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks.
The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple indepent framebuffers in coreboot tables, and better runtime/build time graphic configuration options.
Advertise each framebuffer in a seperate CB table and get rid of fill_lb_framebuffer.
TODO: Payloads only supporting a single FB will likely use the first or last advertised here. This should become a Kconfig which one is to be advertised.
TianoCore and SeaBIOS still work with a single framebuffer advertised in coreboot tables.
Change-Id: I31c3da71ca0b96fb25219d6125c5f89d12157f74 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/boot/coreboot_tables.h M src/lib/coreboot_table.c M src/lib/edid_fill_fb.c 3 files changed, 22 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/39005/26
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39005 )
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
Patch Set 26: Code-Review+1
Attention is currently required from: Patrick Rudolph. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39005 )
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
Patch Set 26:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/39005/comment/11f66a59_641f173b PS26, Line 21: seperate separate
Martin L Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/39005?usp=email )
Change subject: coreboot_tables: Support multiple framebuffers ......................................................................
Abandoned
This patch has not been touched in over 12 months. Anyone who wants to take over work on this patch, please feel free to restore it and do any work needed to get it merged. If you create a new patch based on this work, please credit the original author.