qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] CMOS file support


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] CMOS file support
Date: Thu, 16 Sep 2010 18:49:57 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100805 Iceowl/1.0b1 Icedove/3.0.6

Am 16.09.2010 15:58, schrieb Mathias Krause:
In contrast to the BIOS and Option ROMs the CMOS content cannot be
predefined by the user. Also the amount of useable CMOS ARM is pretty
limited, even though the amount of CMOS bytes emulated by qemu is
already twice as much as of the original MC146818. Nevertheless those
limitations are pretty annoying when testing different BIOS replacement
implementations like coreboot in combination with FILO that use CMOS
values above the basic RTC range for its own purpose to, e.g., control
the boot device order using a string containing the boot devices to
probe.

This patch adds support to specify a file to read the initial CMOS
content from. It also increases the CMOS size to 256 bytes and
implements access to the extended memory range via I/O ports 0x72 and
0x73.

Use it like: `qemu -global mc146818rtc.file=cmos.bin ...' where cmos.bin
is a binary file, sized 256 bytes containing the CMOS RAM.

Signed-off-by: Mathias Krause<address@hidden>
---
  hw/mc146818rtc.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++-----
  1 files changed, 56 insertions(+), 6 deletions(-)


[snip]

The intention of this patch is ok. Loading CMOS with initial data
is needed. I just want to add two questions / remarks how the
implementation might be improved.

Are there use cases where having a smaller CMOS size is better?
For example, when I want to emulate a system with 128 byte CMOS?
The size of CMOS could be derived from the size of the data
or specified by an additional parameter.

Using QEMU's block devices instead of a simple file would be
more consistent with the rest of QEMU and allow reading the
CMOS data not only from a file but also from an URL or other
sources.

Regards
Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]