Thanks for info,
So I guess yours ICH10 AHCI controller can probably withstand an NULL pointer access in hardware. Unlike my ICH7, which had problems with the same situation, as described here:
https://www.mail-archive.com/seabios@seabios.org/msg12950.html>> if (type0 || type 1)
>> rtc_write(CMOS_FLOPPY_DRIVE_TYPE, type0 <<4 | type1);
Oh BTW I was looking how/if the code meanwhile changed and I think it should be:
if (!type0 || !type 1)
rtc_write(CMOS_FLOPPY_DRIVE_TYPE, type0 <<4 | type1);
or something as in "if none romfile_loadint() set type, use CMOS values".
But on the other hand, if CMOS load is allowed even on a real hardware, then the entire "if (CONFIG_QEMU) .. else ..." block can be optimized out.
BTW^2 I completely forgot to ask. What are you trying to use the floppy for, some retro project?
Best regards,
Petr
Dne 03. 04. 24 v 0:45 Eduardo Batalha napsal(a):
>
> Hi,
>
> Yes, booting from a SATA DVD drive with the controller configured as AHCI worked fine for me.
>
> Cheers,
> Ed
>
> On Tuesday, 2 April 2024 at 02:19:42 BST, Petr Cvek <
petrcvekcz@gmail.com> wrote:
>
>
> And I agree ;-)
>
> it worked on Kontron 986LCD, but I don't have time to play with it (and I upgraded to a ryzen board). But actually I'm planing to use all semi-standard CMOS addresses for legacy/retro boards.
>
> BTW does a boot from SATA CD/DVD works for you with seabios? (native IDE CD/DVD on PATA is in question too)
>
> Petr
>
> Dne 02. 04. 24 v 2:59 Eduardo Batalha via SeaBIOS napsal(a):
>> Hi all,
>>
>> I own an ASUS P5Q and had the same problem that Petr Cvek mentioned in his previous emails.
>> I was configuring the floppy type using the the etc/floppy0 value in cbfs but took me quite a while to figure out that why linux was not showing it.
>> I haven't tested it myself yet, but I think the solution to the floppy configuration issue may be to continue using etc/floppyX and change these lines in floppy.c from
>>
>> } else {
>> u8 type = romfile_loadint("etc/floppy0", 0);
>> if (type)
>> addFloppy(0, type);
>> type = romfile_loadint("etc/floppy1", 0);
>> if (type)
>> addFloppy(1, type);
>> }
>>
>> to
>>
>> } else {
>> u8 type0 = romfile_loadint("etc/floppy0", 0);
>> if (type0)
>> addFloppy(0, type);
>> u8 type1 = romfile_loadint("etc/floppy1", 0);
>> if (type1)
>> addFloppy(1, type1);
>> if (type0 || type 1)
>> rtc_write(CMOS_FLOPPY_DRIVE_TYPE, type0 <<4 | type1);
>> }
>>
>> Quoting from osdev.org :
>> "The first 14 CMOS registers access and control the Real-Time Clock. In fact, the only truly useful registers remaining in CMOS are the Real-Time Clock registers, and register 0x10. All other registers in CMOS are almost entirely obsolete (or are not standardized), and are therefore useless. "
>> So, register 0x10, the floppy drive type, is, conversely, pretty much standardised...
>>
>> Hope this makes sense...
>>
>> Cheers,
>> Ed
>> _______________________________________________
>> SeaBIOS mailing list --
seabios@seabios.org <mailto:seabios@seabios.org>
>> To unsubscribe send an email to
seabios-leave@seabios.org <mailto:seabios-leave@seabios.org>
>
> _______________________________________________
> SeaBIOS mailing list --
seabios@seabios.org <mailto:seabios@seabios.org>