From d39efcdcda5a6a07fb7aa91b53ee43ac93823175 Mon Sep 17 00:00:00 2001 From: Jonathan Teh <30538043+jonathan-teh@users.noreply.github.com> Date: Mon, 19 Jan 2026 00:09:58 +0000 Subject: [PATCH] hwquirks: Detect cache on VIA VP/VPX (#576) Extend the existing quirk for VP3/MVP3 to VP/VPX. --- system/hwquirks.c | 15 ++++++++------- system/hwquirks.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/system/hwquirks.c b/system/hwquirks.c index 359209a..06ea211 100644 --- a/system/hwquirks.c +++ b/system/hwquirks.c @@ -79,7 +79,7 @@ static void get_m1541_l2_cache_size(void) if (reg == 0b10) { l2_cache = 1024; } } -static void get_vt82c597_mb_cache_size(void) +static void get_vt82c585_597_mb_cache_size(void) { int *const mb_cache = get_motherboard_cache(); if (!mb_cache) { @@ -198,14 +198,15 @@ void quirks_init(void) quirk.process = get_m1541_l2_cache_size; } - // ----------------------------------------------- - // -- VIA VP3 (VT82C597), MVP3 (VT82C598) Quirk -- - // ----------------------------------------------- + // ------------------------------------------------------------------- + // -- VIA VP1/VPX (VT82C585), VP3 (VT82C597), MVP3 (VT82C598) Quirk -- + // ------------------------------------------------------------------- // Motherboard cache detection - else if (quirk.root_vid == PCI_VID_VIA && (quirk.root_did == 0x0597 || quirk.root_did == 0x0598)) { // VIA VT82C597/8 - quirk.id = QUIRK_VIA_VP3; + else if (quirk.root_vid == PCI_VID_VIA && (quirk.root_did == 0x0585 // VIA VT82C585 + || quirk.root_did == 0x0597 || quirk.root_did == 0x0598)) { // VIA VT82C597/8 + quirk.id = QUIRK_VIA_VP; quirk.type |= QUIRK_TYPE_MEM_SIZE; - quirk.process = get_vt82c597_mb_cache_size; + quirk.process = get_vt82c585_597_mb_cache_size; } // ------------------------ diff --git a/system/hwquirks.h b/system/hwquirks.h index 89ca686..6bd7c33 100644 --- a/system/hwquirks.h +++ b/system/hwquirks.h @@ -29,7 +29,7 @@ typedef enum { QUIRK_K8_BSTEP_NOTEMP, QUIRK_K8_REVFG_TEMP, QUIRK_AMD_ERRATA_319, - QUIRK_VIA_VP3, + QUIRK_VIA_VP, QUIRK_LOONGSON7A00_EHCI_WORKARD, QUIRK_UNHIDE_ICH05, QUIRK_UNHIDE_ASUS_SMBUS,