Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2232146/?format=api
{ "id": 2232146, "url": "http://patchwork.ozlabs.org/api/patches/2232146/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260503015756.99176-4-54weasels@gmail.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260503015756.99176-4-54weasels@gmail.com>", "list_archive_url": null, "date": "2026-05-03T01:57:52", "name": "[3/7] hw/char/escc: Expose diagnostic RS232 I/O routing", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b13776c8b6aa9ca31f56a7a40c5769ba1c9f0cb4", "submitter": { "id": 93309, "url": "http://patchwork.ozlabs.org/api/people/93309/?format=api", "name": "54weasels", "email": "54weasels@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260503015756.99176-4-54weasels@gmail.com/mbox/", "series": [ { "id": 502564, "url": "http://patchwork.ozlabs.org/api/series/502564/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502564", "date": "2026-05-03T01:57:51", "name": "m68k: Add Sun-3 Machine Emulation", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502564/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2232146/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2232146/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=c+Xkx3SU;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g7Yys0kmYz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 03 May 2026 16:00:05 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wJPr8-0001Aj-A6; Sun, 03 May 2026 01:59:06 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <54weasels@gmail.com>)\n id 1wJM69-0004vX-Ug\n for qemu-devel@nongnu.org; Sat, 02 May 2026 21:58:21 -0400", "from mail-dy1-x132f.google.com ([2607:f8b0:4864:20::132f])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <54weasels@gmail.com>)\n id 1wJM68-0000T9-73\n for qemu-devel@nongnu.org; Sat, 02 May 2026 21:58:21 -0400", "by mail-dy1-x132f.google.com with SMTP id\n 5a478bee46e88-2ef38cf04f0so1238998eec.1\n for <qemu-devel@nongnu.org>; Sat, 02 May 2026 18:58:19 -0700 (PDT)", "from newsled.lan ([76.133.142.170]) by smtp.gmail.com with ESMTPSA\n id\n 5a478bee46e88-2ee38d79eb9sm14361735eec.8.2026.05.02.18.58.17\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Sat, 02 May 2026 18:58:18 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777773498; x=1778378298; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=I2TKKB6U+GwReeGYv3aDJklJVz+rIvoLzCBt6yji+TY=;\n b=c+Xkx3SUPuXTGiPWc8Vy6wJ5wTTfizWEpl2Ui89X56k3dj0KF0ybSNUiKeigVQFDr0\n ODUZwU1rFh60eHXM/JL677yhhvr9AvHDYFhUsxOjUDGVSOXqZJtskipXjfQWpjirTKEp\n w4Moof7G6IeIZAhbhYnN3RXCbpeJ0VTBRpGA1j/m5q/8JoTUSNM8Olu74KcSNHp9WA2p\n zRVnmA7YZ0gSCSqDymwYJZB2X/cWpxw6t0fM1QmxYxnHiyGVP8faStuT8AmkIakHsZy8\n nzMuRtn46ChP83hRK0H/xkquIngAs7UbPRZSOWgMBbHMUV58ZPSUg05TLmhQzaAH6RZv\n 2Bbg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777773498; x=1778378298;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=I2TKKB6U+GwReeGYv3aDJklJVz+rIvoLzCBt6yji+TY=;\n b=gBAbbioAJSpnB6Anb1YSmYl4CEeN/QSQGMH3YhsQ+GWuMlXGhoMiEzLCJ5lpeHZ/jO\n nlBnS8ADDC/qSYcfw9IDiiKo1DANYYpse0cPGSXN4kyGW/5zT2WJf6fR4NiHXtt/HRVb\n 5spMfX+3QgCI7BB+KsF+xV53Y2OCuW6MjFQXZd+zwiLOVAWJQNicPCB7NNkUsAFsKel/\n FJsqUp1UE/UFLWc3hE66SYTjOpQOTZLBds8/Cf/Tns89NcXrzKcjWruyBxpdtpcww6wH\n 7T1YsAg+NmQ8zUOwptTJBZQyALzR1tz5k/rYm0F+o/4QMZVH9u3/ZvndtdZBDP9qkWxW\n sjZQ==", "X-Gm-Message-State": "AOJu0Yy2HUPOVbP7KbbNW50UPGZ597zL6onjiGay6jOtkXhzIi5nnGWF\n mcPyDfXOoh+UhzXD24bxU0L1o3af3Y9umnvwxP3ZEOXp7acCkGq63sn4/CM9Xg==", "X-Gm-Gg": "AeBDieu1dXANmLtFP3b7GiIXNaF55tT0g1UXw5nRwvng8C0BswHrAplNXbMXAlQUzh+\n QdEHxkV9ue4nhun6P8MTpE2gxlKHe3bZou6Mbsr8R8DYEFaYd2LVzzvkfWegWePwuGOmXNoCoz+\n Db3TnLyOTaI5aNvuM3Nx7GkfvPeri/rSkGH1dEQVovCr454oNpGQxwxQRJcAH5nxMzrBpL1kD+9\n NdnkdxuWstC8WIhLDKG72XKFLcxYGdt89pv3VTjbsfLH6bGDSeOi56QmB7KH9VNKVmMhF2ZRaZ/\n q+874VIf0U0RSMELw/6KUhKOsKqxWEX4w4n3Okij/Ju2nI9+1MzaPsD4restRwnW3qMVAFoLZEk\n ImW4Nd/kRREq+GZ75uXA1En1uXUwGmDiItdzlIkYN2sq+u/E1PLJ+1BSAIwSySnnW1Xwxjl7sAO\n LEoAWbv6zJUHjDXmzm03uC7ls1oONVEaTy/56C+tuc5V/3DT1eKg==", "X-Received": "by 2002:a05:7300:fd0a:b0:2dd:6937:79b8 with SMTP id\n 5a478bee46e88-2efb7dcacd4mr2400101eec.5.1777773498418;\n Sat, 02 May 2026 18:58:18 -0700 (PDT)", "From": "54weasels <54weasels@gmail.com>", "To": "qemu-devel@nongnu.org", "Cc": "laurent@vivier.eu,\n\tthuth@redhat.com,\n\t54weasels <54weasels@gmail.com>", "Subject": "[PATCH 3/7] hw/char/escc: Expose diagnostic RS232 I/O routing", "Date": "Sat, 2 May 2026 18:57:52 -0700", "Message-ID": "<20260503015756.99176-4-54weasels@gmail.com>", "X-Mailer": "git-send-email 2.50.1", "In-Reply-To": "<20260503015756.99176-1-54weasels@gmail.com>", "References": "<20260503015756.99176-1-54weasels@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2607:f8b0:4864:20::132f;\n envelope-from=54weasels@gmail.com; helo=mail-dy1-x132f.google.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-Mailman-Approved-At": "Sun, 03 May 2026 01:59:00 -0400", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "This adds proper initialization and routing hooks for the ESCC serial controller to support the specific diagnostic RS232 UART mappings expected by the Sun-3 Boot PROM.\n\nSigned-off-by: 54weasels <54weasels@gmail.com>\n---\n hw/char/escc.c | 33 ++++++++++++++++++++++++---------\n include/hw/char/escc.h | 3 +++\n 2 files changed, 27 insertions(+), 9 deletions(-)", "diff": "diff --git a/hw/char/escc.c b/hw/char/escc.c\nindex 3b46818ecc..d870806a35 100644\n--- a/hw/char/escc.c\n+++ b/hw/char/escc.c\n@@ -313,7 +313,8 @@ static void escc_soft_reset_chn(ESCCChannelState *s)\n \n s->rregs[R_STATUS] &= STATUS_DCD | STATUS_SYNC | STATUS_CTS | STATUS_BRK;\n s->rregs[R_STATUS] |= STATUS_TXEMPTY | STATUS_TXUNDRN;\n- if (s->disabled) {\n+ if (s->disabled || s->parent->force_hw_ready) {\n+ /* Force assert to satisfy Sun-3 PROM Flow Control */\n s->rregs[R_STATUS] |= STATUS_DCD | STATUS_SYNC | STATUS_CTS;\n }\n s->rregs[R_SPEC] &= SPEC_ALLSENT;\n@@ -653,7 +654,8 @@ static void escc_mem_write(void *opaque, hwaddr addr,\n s->txint = 0;\n escc_update_irq(s);\n s->tx = val;\n- if (s->wregs[W_TXCTRL2] & TXCTRL2_TXEN) { /* tx enabled */\n+ if (s->parent->force_hw_ready || (s->wregs[W_TXCTRL2] & TXCTRL2_TXEN)) {\n+ /* tx consistently forced enabled for Sun-3 boot PROM hooks */\n if (s->wregs[W_MISC2] & MISC2_LCL_LOOP) {\n serial_receive_byte(s, s->tx);\n } else if (qemu_chr_fe_backend_connected(&s->chr)) {\n@@ -691,6 +693,12 @@ static uint64_t escc_mem_read(void *opaque, hwaddr addr,\n case SERIAL_CTRL:\n trace_escc_mem_readb_ctrl(CHN_C(s), s->reg, s->rregs[s->reg]);\n ret = s->rregs[s->reg];\n+ if (s->reg == R_STATUS) {\n+ if (serial->force_hw_ready) {\n+ ret |= STATUS_DCD | STATUS_SYNC | STATUS_CTS;\n+ /* Force Flow Control PINs */\n+ }\n+ }\n s->reg = 0;\n return ret;\n case SERIAL_DATA:\n@@ -715,6 +723,10 @@ static const MemoryRegionOps escc_mem_ops = {\n .write = escc_mem_write,\n .endianness = DEVICE_NATIVE_ENDIAN,\n .valid = {\n+ .min_access_size = 1,\n+ .max_access_size = 4,\n+ },\n+ .impl = {\n .min_access_size = 1,\n .max_access_size = 1,\n },\n@@ -1067,16 +1079,17 @@ static void escc_realize(DeviceState *dev, Error **errp)\n s->chn[0].disabled = s->disabled;\n s->chn[1].disabled = s->disabled;\n \n+ uint32_t escc_size = s->mmio_size ? s->mmio_size :\\\n+ (ESCC_SIZE << s->it_shift);\n memory_region_init_io(&s->mmio, OBJECT(dev), &escc_mem_ops, s, \"escc\",\n- ESCC_SIZE << s->it_shift);\n+ escc_size);\n \n for (i = 0; i < 2; i++) {\n- if (qemu_chr_fe_backend_connected(&s->chn[i].chr)) {\n- s->chn[i].clock = s->frequency / 2;\n- qemu_chr_fe_set_handlers(&s->chn[i].chr, serial_can_receive,\n- serial_receive1, serial_event, NULL,\n- &s->chn[i], NULL, true);\n- }\n+ s->chn[i].parent = s;\n+ s->chn[i].clock = s->frequency / 2;\n+ qemu_chr_fe_set_handlers(&s->chn[i].chr, serial_can_receive,\n+ serial_receive1, serial_event, NULL,\n+ &s->chn[i], NULL, true);\n }\n \n if (s->chn[0].type == escc_mouse) {\n@@ -1093,7 +1106,9 @@ static const Property escc_properties[] = {\n DEFINE_PROP_UINT32(\"frequency\", ESCCState, frequency, 0),\n DEFINE_PROP_UINT32(\"it_shift\", ESCCState, it_shift, 0),\n DEFINE_PROP_BOOL(\"bit_swap\", ESCCState, bit_swap, false),\n+ DEFINE_PROP_BOOL(\"force-hw-ready\", ESCCState, force_hw_ready, false),\n DEFINE_PROP_UINT32(\"disabled\", ESCCState, disabled, 0),\n+ DEFINE_PROP_UINT32(\"mmio_size\", ESCCState, mmio_size, 0),\n DEFINE_PROP_UINT32(\"chnBtype\", ESCCState, chn[0].type, 0),\n DEFINE_PROP_UINT32(\"chnAtype\", ESCCState, chn[1].type, 0),\n DEFINE_PROP_CHR(\"chrB\", ESCCState, chn[0].chr),\ndiff --git a/include/hw/char/escc.h b/include/hw/char/escc.h\nindex 9e60175b77..db4700d8e4 100644\n--- a/include/hw/char/escc.h\n+++ b/include/hw/char/escc.h\n@@ -49,6 +49,7 @@ typedef struct ESCCChannelState {\n int sunmouse_dx;\n int sunmouse_dy;\n int sunmouse_buttons;\n+ ESCCState *parent;\n } ESCCChannelState;\n \n struct ESCCState {\n@@ -57,9 +58,11 @@ struct ESCCState {\n struct ESCCChannelState chn[2];\n uint32_t it_shift;\n bool bit_swap;\n+ bool force_hw_ready;\n MemoryRegion mmio;\n uint32_t disabled;\n uint32_t frequency;\n+ uint32_t mmio_size;\n };\n \n #endif\n", "prefixes": [ "3/7" ] }