]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
gfxboard: rewind Picasso IV flash before autoconfig
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 26 May 2026 01:14:33 +0000 (18:14 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Sun, 31 May 2026 07:33:15 +0000 (00:33 -0700)
Picasso IV autoconfig is read from the flash image, but the
initializer can run more than once while the expansion list is
scanned and sorted. loadp4rom() leaves the flash zfile positioned
later in the image, so a later dry scan read all-0xff data and the
board looked like it had no autoconfig block.

Seek back to the beginning before reading the Picasso IV
autoconfig bytes so repeated scans see the same board data.

gfxboard.cpp

index faf33b21de510c2c851ac2ace189a1b18c6f8563..174a3795031e0878cd42b02f8091e98fef636071 100644 (file)
@@ -5003,6 +5003,7 @@ bool gfxboard_init_memory (struct autoconfig_info *aci)
                                gb->p4rom = flashromfile_open(_T("picasso_iv_flash.rom"));
                }
                if (gb->p4rom) {
+                       zfile_fseek (gb->p4rom, 0, SEEK_SET);
                        zfile_fread (gb->p4autoconfig, sizeof gb->p4autoconfig, 1, gb->p4rom);
                        copyp4autoconfig (gb, gb->board->configtype == 3 ? 192 : 0);
                        if (gb->board->configtype == 3) {