From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW6nj-00048h-UX for qemu-devel@nongnu.org; Wed, 17 Feb 2016 13:26:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aW6nf-0001y3-Id for qemu-devel@nongnu.org; Wed, 17 Feb 2016 13:26:11 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:23861 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW6nf-0001wY-5F for qemu-devel@nongnu.org; Wed, 17 Feb 2016 13:26:07 -0500 From: Roman Kagan Date: Wed, 17 Feb 2016 21:25:31 +0300 Message-Id: <1455733533-12030-3-git-send-email-rkagan@virtuozzo.com> In-Reply-To: <1455733533-12030-1-git-send-email-rkagan@virtuozzo.com> References: <1455733533-12030-1-git-send-email-rkagan@virtuozzo.com> Subject: [Qemu-devel] [PATCH v8 2/4] i386: expose floppy drive CMOS type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Laszlo Ersek , Kevin O'Connor , Roman Kagan , Igor Mammedov , Marcel Apfelbaum , Denis Lunev , John Snow Make it possible to query the CMOS type of a floppy drive outside of the source file where it's defined. It will allow to properly populate the corresponding ACPI objects and thus enable Windows on BIOS-less systems to access the floppy drives. Signed-off-by: Roman Kagan Cc: Igor Mammedov Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: John Snow Cc: Laszlo Ersek Cc: Kevin O'Connor --- changes since v7: - split out from a bigger patch hw/i386/pc.c | 2 +- include/hw/i386/pc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 0aeefd2..d7fea61 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -200,7 +200,7 @@ static void pic_irq_request(void *opaque, int irq, int level) #define REG_EQUIPMENT_BYTE 0x14 -static int cmos_get_fd_drive_type(FloppyDriveType fd0) +int cmos_get_fd_drive_type(FloppyDriveType fd0) { int val; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 8b3546e..472754c 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -265,6 +265,7 @@ typedef void (*cpu_set_smm_t)(int smm, void *arg); void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name); ISADevice *pc_find_fdc0(void); +int cmos_get_fd_drive_type(FloppyDriveType fd0); /* acpi_piix.c */ -- 2.5.0