[SeaBIOS] [PATCH] Ignore sgabios rom in case sercon is enabled.

Gerd Hoffmann posted 1 patch 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20171103075753.23217-1-kraxel@redhat.com
src/optionroms.c | 5 +++++
1 file changed, 5 insertions(+)
[SeaBIOS] [PATCH] Ignore sgabios rom in case sercon is enabled.
Posted by Gerd Hoffmann 6 years, 5 months ago
We don't want them both be active.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 src/optionroms.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/optionroms.c b/src/optionroms.c
index 092393a56c..a5ecd4cd11 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -193,6 +193,11 @@ run_file_roms(const char *prefix, int isvga, u64 *sources)
         file = romfile_findprefix(prefix, file);
         if (!file)
             break;
+        if (strcmp(file->name, "vgaroms/sgabios.bin") == 0 &&
+            CONFIG_SERCON && romfile_loadint("etc/sercon-port", 0)) {
+            dprintf(1, "sercon: is enabled, not loading sgabios rom.\n");
+            continue;
+        }
         struct rom_header *rom = deploy_romfile(file);
         if (rom) {
             setRomSource(sources, rom, (u32)file);
-- 
2.9.3


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Ignore sgabios rom in case sercon is enabled.
Posted by Peter Stuge 6 years, 5 months ago
Gerd Hoffmann wrote:
> +++ b/src/optionroms.c
> @@ -193,6 +193,11 @@ run_file_roms(const char *prefix, int isvga, u64 *sources)
>          file = romfile_findprefix(prefix, file);
>          if (!file)
>              break;
> +        if (strcmp(file->name, "vgaroms/sgabios.bin") == 0 &&
> +            CONFIG_SERCON && romfile_loadint("etc/sercon-port", 0)) {
> +            dprintf(1, "sercon: is enabled, not loading sgabios rom.\n");
> +            continue;
> +        }

This heuristic isn't very reliable. Is there nothing in the sgabios.bin
option ROM itself that can be used instead?


//Peter

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Ignore sgabios rom in case sercon is enabled.
Posted by Paolo Bonzini 6 years, 5 months ago
On 04/11/2017 11:09, Peter Stuge wrote:
>> +        if (strcmp(file->name, "vgaroms/sgabios.bin") == 0 &&
>> +            CONFIG_SERCON && romfile_loadint("etc/sercon-port", 0)) {
>> +            dprintf(1, "sercon: is enabled, not loading sgabios rom.\n");
>> +            continue;
>> +        }
> This heuristic isn't very reliable. Is there nothing in the sgabios.bin
> option ROM itself that can be used instead?

In what sense it is not very reliable?

Paolo

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios