[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 11/11] hw/isa/vt82c686: Implement relocation and toggling
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v5 11/11] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions |
Date: |
Mon, 29 Jul 2024 11:27:02 +0200 |
User-agent: |
Mozilla Thunderbird |
On 14/1/24 13:39, Bernhard Beschow wrote:
The VIA south bridges are able to relocate and toggle (enable or disable) their
SuperI/O functions. So far this is hardcoded such that all functions are always
enabled and are located at fixed addresses.
Some PC BIOSes seem to probe for I/O occupancy before activating such a function
and issue an error in case of a conflict. Since the functions are currently
enabled on reset, conflicts are always detected. Prevent that by implementing
relocation and toggling of the SuperI/O functions.
Note that all SuperI/O functions are now deactivated upon reset (except for
VT82C686B's serial ports where Fuloong 2e's rescue-yl seems to expect them to be
enabled by default). Rely on firmware to configure the functions accordingly.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
---
hw/isa/vt82c686.c | 65 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 55 insertions(+), 10 deletions(-)
+static void via_superio_devices_enable(ViaSuperIOState *s, uint8_t data)
+{
+ ISASuperIOClass *ic = ISA_SUPERIO_GET_CLASS(s);
+
memory_region_transaction_begin();
+ isa_parallel_set_enabled(s->superio.parallel[0], (data & 0x3) != 3);
+ for (int i = 0; i < ic->serial.count; i++) {
+ isa_serial_set_enabled(s->superio.serial[i], data & BIT(i + 2));
+ }
+ isa_fdc_set_enabled(s->superio.floppy, data & BIT(4));
memory_region_transaction_commit();
+}
+
- Re: [PATCH v5 11/11] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions,
Philippe Mathieu-Daudé <=