Skip to contentSkip to conversation

Ignore sgabios rom in case sercon is enabled.

PATCH In review Gerd Hoffmann 3 participants 3 messages Nov 3, 2017 – Nov 4, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ignore sgabios rom in case sercon is enabled.

We don't want them both be active.

---
 src/optionroms.c | 5 +++++
 1 file changed, 5 insertions(+)
src/optionroms.c +5 -0
index 092393a56c..a5ecd4cd11 100644
@@ -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);
Signature · 1 line
2.9.3
#1 lore raw

src/optionroms.c run_file_roms(const char *prefix, int isvga, u64 *sources) · line 200

Quoted 10 lines · Gerd Hoffmann

+++ b/src/optionroms.c

src/optionroms.c +5 -0
@@ -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

#2 lore raw
Quoted 7 lines · Peter Stuge

src/optionroms.c run_file_roms(const char *prefix, int isvga, u64 *sources) · line 200

Quoted 5 lines
src/optionroms.c +5 -0
+        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