From nobody Tue Sep 22 06:52:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1783971537532825.7229514126591; Mon, 13 Jul 2026 12:38:57 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 71E7554EB56; Mon, 13 Jul 2026 19:38:55 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (nx238.node02.secure-mailgate.com [192.162.87.238]) by coreboot.org (Postfix) with ESMTP id E2DF054EB5B for ; Mon, 13 Jul 2026 19:38:01 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by node02.secure-mailgate.com with esmtps (TLS1.2) tls TLS_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1wjMTW-007eD6-Gu; Mon, 13 Jul 2026 21:37:59 +0200 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (Authenticated sender: christian@quante.one) by web279.dogado.net (Postfix) with ESMTPSA id C12A5282416; Mon, 13 Jul 2026 21:37:57 +0200 (CEST) X-SecureMailgate-Identity: christian@quante.one;web279.dogado.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quante.one; s=cloudpit; t=1783971478; bh=e/ZIoc+Kqy77EEc5W/TAlezn/86rOR9wTDAXVmJW1lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=3F9f7s7PHQn16E+7Z9ZVeUkd1pvHqzrCBtzAOHk286L6qgmPreTNrhwpjhGbVSjpX OMChAbyQk2uGpQTz9zGgo+Ay3+5a3l8KPdtnjnjB1O+qJ5lH+VyJpYw9I18s54B9Em /IRcSAWtU784nwLtrLJ3tR7hAnHCKaBKQ+tuY8rU= X-SecureMailgate-Identity: christian@quante.one;web279.dogado.net From: Christian Quante To: seabios@seabios.org Date: Mon, 13 Jul 2026 21:35:29 +0200 Message-ID: <20260713193529.13004-4-christian@quante.one> In-Reply-To: <20260713193529.13004-1-christian@quante.one> References: <20260710131853.59862-1-christian@quante.one> <20260713193529.13004-1-christian@quante.one> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-PPP-Message-ID: <178397147832.1149961.4375737404124841662@web279.dogado.net> X-PPP-Vhost: quante.one X-SecureMailgate-Domain: web279.dogado.net X-SecureMailgate-Username: 31.47.255.59 X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.02) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuXIdtfYTR1iemm2DmkhO5v6DduMCr2e/mR1 62ZcfdBkTyu2SmbhJN1U9FKs8X3+Nt1HOctZ5X+40a9IXddeG3M38JQYgcgjsac3uQcQdCX4ROfH zJ6mVE7ewsipSVIfs4bwdbtsmP7rt7XcJ/WVJ6mQS5+h1uiHzk/Rfxfh461YLyu3RZI1CD15pCOE 1vk99RPdEorPfEdXy94XZtjluxSTdOtYechJ/ikE1WgRg4cS6A6B6pTstltS07kaQJ8I9sYal0h7 43VOpKNY+4MjijihZK0EMmf3P50Ajf/tIX00Fuu2beRqilmjgQ6jA3UwYgnsj5xBssn0tIIHA3aH QzCq60l8YRpcxCjc2gcMa3Btw+OTpzU5Yy8oe2B0dJEHaEmA56XdPYm3xWZdE/EXCl5gDnvd4gRp ujraUEUfoKObmOu2raPunNKcwzm+dw4UpUCm2a3kP4TQGBPHghFkFxouUaYdjR+R3ZWRuox4844j AQbbxw9GNmy7K0lh0AXXFT3Pt46BhqiWcJ5qC0lG/2bs31/E3ahF5MMcDI7KdpjQKYY3HuMkbxpI KUQzfI6KxMWMxCeGr8LQquCYCjDePNNRIK/1NH5THMtlYvyHAYGOGuNMcrA92rKKXukX8XVo3f3/ JxUPJR+t5nhiYvfdCx1TkJ59fZW/mXUxWFsIstcuEAdT+LecEOC2wM8oSA+doCR7/SwklPUY7Ama 0PmZY+iQB5hQ6nsDvccjqgmDvD9Wh/kSAu/CYcJOqIre05CguE1tP1nlenXa+GbjPeTU+gvuQJaj R4vlXL102p8rhkGjhZ9ohu/ssAude8XOICjh4eA+JR6TZt6YzE5PhY7dbccpibLJp6LroPqK4pWA eyFKR6XCaxMc6jly+EEBzFhEQhOL+GAm1jM1Gi5QnHfxs2W06Rji2DxFyu/6+X2y/XkQ2Fz1pRXW hjh9fdbl44I0Df2BjPaKNO06KKJk593MMhOyNrM+RC/lTZnd7uJwgfOEv3poOl5JC4PE6jS4VuAW zIVI5e+cwgZZ/3rN1z/ww35mJXkVVPSc006zUgMG2KMDF/AZcJMXyXxXG5oZWE62IcEA7tYVzdXe EJDLX5L5N+U6PvwWy5OBXdqEG7TBtqXgwifoiMstty+iVRobalIoISR2PyW5cLuSbbpC1c/2zTYs X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Complaints-To: abuse@node01.secure-mailgate.com Message-ID-Hash: 7ESYUK72HWXODHUC5M3FPLGKJCH5P5VQ X-Message-ID-Hash: 7ESYUK72HWXODHUC5M3FPLGKJCH5P5VQ X-MailFrom: christian@quante.one X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header Cc: Gerd Hoffmann , Christian Quante X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH v2 3/3] floppy: report an empty drive as not ready List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: --- X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1783971539560158500 An empty drive and an unreadable diskette are different failures, and until the previous patch SeaBIOS could not tell them apart: both ended up in floppy_media_sense() exhausting the data rates and returning DISK_RET_EMEDIA (0xC0). Now that the disk change line identifies an absent medium, report it as DISK_RET_ETIMEOUT (0x80), the code the INT 13h documentation gives for "time out, drive not ready". floppy_media_sense() keeps DISK_RET_EMEDIA for a medium it cannot read. 0xC0 does not appear in the classic INT 13h status tables at all, and guests treat it accordingly. Measured on an empty drive, with SeaBIOS patched to return each code in turn. The guests here are German-language, so their messages are quoted as they appear, with the English sense in brackets: PC-DOS 7, "dir a:" 0x80 "Nicht bereit beim Lesen von Laufwerk A" [not ready reading drive A] 0xC0 "Allgemeiner Fehler beim Lesen von Laufwerk A" [general failure reading drive A] 0xAA same message as 0xC0 0x99 same message as 0xC0 <- invented, not a real code 0x06 no message at all; DOS retries forever Windows for Workgroups 3.11, File Manager, drive A: 0x80 "In Laufwerk A ist kein Datentr=C3=A4ger eingelegt. Legen Sie ei= nen Datentr=C3=A4ger ein, und versuchen Sie es erneut." [Wiederhole= n] [there is no disk in drive A; insert one and try again] 0xC0 "Der Datentr=C3=A4ger in Laufwerk A ist nicht formatiert. M=C3= =B6chten Sie, da=C3=9F der Datentr=C3=A4ger jetzt formatiert wird?" [Ja]= [Nein] [the disk in drive A is not formatted; format it now?] DOS gives 0xC0 the same message as the invented code 0x99, which is to say it does not recognise it. Windows does recognise it, and offers to format a diskette that is not there. Both are correct with 0x80. Bochs BIOS, from which SeaBIOS descends, returns 0x80 here as well ("SET_AH(0x80); // drive not ready (timeout)"). It has no READ ID media sensing; that arrived in SeaBIOS with commit e7c5a7ef, and DISK_RET_EMEDIA came with it. OS/2 2.11 and Linux are unaffected: both drive the controller through their own drivers rather than INT 13h. Not verified against real hardware -- I have none with a floppy drive. Signed-off-by: Christian Quante --- src/hw/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw/floppy.c b/src/hw/floppy.c index 20033fa3..d7249df4 100644 --- a/src/hw/floppy.c +++ b/src/hw/floppy.c @@ -498,7 +498,7 @@ floppy_check_media(struct drive_s *drive_gf, u8 floppyi= d) return DISK_RET_SUCCESS; =20 dprintf(2, "Floppy_check_media %d: no medium\n", floppyid); - return DISK_RET_EMEDIA; + return DISK_RET_ETIMEOUT; } =20 static int --=20 2.53.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org