From nobody Fri Oct 11 18:07:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XQF2D6JfJz5ZClZ; Fri, 11 Oct 2024 18:07:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XQF2D4CRGz41dg; Fri, 11 Oct 2024 18:07:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728670020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mvA/HipVC7FzWuH9IusOHKp4mDxNq+PbK7IlvOUS7JM=; b=AjdPkTeYNEXpn0zEs1zjapCyIESp7jCPkjYnCAn++Sk72xm3mFlLxibqSvjy+rnNlf/r7F YmHuzfkFXeooJRybmwGhN3A2p3uqZsj+8IQ14AophPcKD5RKuShc08cRRMdH/iIdog1Pql WoPKkSlHb6Ox+M39K1rpDJ+Y1LIT3gNuAj2sbKpk9Bp1gKAj6C2SX8Mnay6tba9B2rtosx gH0J3vzYa415z6OF84HWZaBSAQEmF8UGav8uKm7YBSngZJ5UG31yiP9+SdOCQhoSJiHt6/ 7YzAGxNEkWjnK7GjTGmPWmMXRq9FGE89BevMGpjms4suDtjG2Wi7fWAgzl8/tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728670020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mvA/HipVC7FzWuH9IusOHKp4mDxNq+PbK7IlvOUS7JM=; b=EL3LM5+ESEA61zJWdJKPKgxqiTFSjsyltAL+nSxbEn1YRPwcCS/N/BxnZc2nljOaZz6Fvc 7Pkxoh+BFEziamebMEF4DbGai67JYHkx+XVryisNa/b2NohspDYyaxfMqroik8q7Z3WtJx mhP1gGs+BFQqw3g3XfVKdAOU+g7vC5nbtBBEuMSfT2MAEZyhnbsuYohNr1jKSMkvc3YB84 uy/YhmyP2D3a5VwVDc+JSyUaEaKaWK0brCtheNDLL/NPyFPL4BXsRGVt8DXgb97oZXxNOf Wngn8/4yGTUEpmjxj5PXUGQnMlMuDMGo7UfRbIXj/qpb5Fro7vu+0AwEnI5zcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728670020; a=rsa-sha256; cv=none; b=ljyAkHrcvZNwwnWkB0V9xZgzCz99nMJC836CyKUWIvQq9SHKn5t0/30FkhpyJwitHNl7IG tM4dvY/N71oWB81ZMISPqrXnGnbkZNe3NJ+OAT+3NxAQCfq5199/h+cda90AXccVw6PVGY IrE7oEZI+hqh7eE5jtjGj6Vy6bbK+2MehaY8Psc0gP6GinPW9uBJygnJQEm/DunvFPgJNe k8RdrT2TZO2cvXzzPfsH7Q47Zmrjtv0tQlasQxVkmioyzpgN/oKfDXJivo3fJa38CzoZuw ZY0HlyOkVSLbtp+DV4LqM3RHC5xF78y+ZbL8jtllUHHHxm8CnXOUJ7Qu0ND8yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XQF2D3CWpzsD3; Fri, 11 Oct 2024 18:07:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49BI70Hb011801; Fri, 11 Oct 2024 18:07:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49BI70PF011798; Fri, 11 Oct 2024 18:07:00 GMT (envelope-from git) Date: Fri, 11 Oct 2024 18:07:00 GMT Message-Id: <202410111807.49BI70PF011798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8056c665574e - main - acpica: Update the SPCR table to version 4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8056c665574e2bca135658764773281893e8fc27 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8056c665574e2bca135658764773281893e8fc27 commit 8056c665574e2bca135658764773281893e8fc27 Author: Sia Jee Heng AuthorDate: 2024-02-29 06:39:50 +0000 Commit: Warner Losh CommitDate: 2024-10-11 18:06:33 +0000 acpica: Update the SPCR table to version 4 cherry pick 1eeff52124a45d5cd887ba5687bbad0116e4d211 from acpica: SPCR: Update the SPCR table to version 4 The Microsoft Serial Port Console Redirection (SPCR) specification revision 1.09 comprises additional fields [1]. The newly added fields are: - RISC-V SBI - Precise Baud Rate - NamespaceStringLength - NamespaceStringOffset - NamespaceString Additionaly, this code will support up to SPCR revision 1.10, as it includes only minor wording changes. [1] https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table Signed-off-by: Sia Jee Heng --- sys/contrib/dev/acpica/common/dmtbinfo3.c | 8 ++++++-- sys/contrib/dev/acpica/compiler/dttemplate.h | 8 +++++--- sys/contrib/dev/acpica/include/actbl3.h | 12 ++++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/sys/contrib/dev/acpica/common/dmtbinfo3.c b/sys/contrib/dev/acpica/common/dmtbinfo3.c index 702cdc0133b3..7a482ba0ffa9 100644 --- a/sys/contrib/dev/acpica/common/dmtbinfo3.c +++ b/sys/contrib/dev/acpica/common/dmtbinfo3.c @@ -255,7 +255,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[] = {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (StopBits), "Stop Bits", 0}, {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (FlowControl), "Flow Control", 0}, {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (TerminalType), "Terminal Type", 0}, - {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (Reserved2), "Reserved", 0}, + {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (Language), "Language", 0}, {ACPI_DMT_UINT16, ACPI_SPCR_OFFSET (PciDeviceId), "PCI Device ID", 0}, {ACPI_DMT_UINT16, ACPI_SPCR_OFFSET (PciVendorId), "PCI Vendor ID", 0}, {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (PciBus), "PCI Bus", 0}, @@ -263,7 +263,11 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[] = {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (PciFunction), "PCI Function", 0}, {ACPI_DMT_UINT32, ACPI_SPCR_OFFSET (PciFlags), "PCI Flags", 0}, {ACPI_DMT_UINT8, ACPI_SPCR_OFFSET (PciSegment), "PCI Segment", 0}, - {ACPI_DMT_UINT32, ACPI_SPCR_OFFSET (Reserved2), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_SPCR_OFFSET (UartClkFreq), "Uart Clock Freq", 0}, + {ACPI_DMT_UINT32, ACPI_SPCR_OFFSET (PreciseBaudrate), "Precise Baud rate", 0}, + {ACPI_DMT_UINT16, ACPI_SPCR_OFFSET (NameSpaceStringLength), "NameSpaceStringLength", 0}, + {ACPI_DMT_UINT16, ACPI_SPCR_OFFSET (NameSpaceStringOffset), "NameSpaceStringOffset", 0}, + {ACPI_DMT_STRING, ACPI_SPCR_OFFSET (NameSpaceString), "NamespaceString", 0}, ACPI_DMT_TERMINATOR }; diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.h b/sys/contrib/dev/acpica/compiler/dttemplate.h index c97a8ed24eee..1560f2008cfa 100644 --- a/sys/contrib/dev/acpica/compiler/dttemplate.h +++ b/sys/contrib/dev/acpica/compiler/dttemplate.h @@ -1956,8 +1956,8 @@ const unsigned char TemplateSlit[] = const unsigned char TemplateSpcr[] = { - 0x53,0x50,0x43,0x52,0x50,0x00,0x00,0x00, /* 00000000 "SPCRP..." */ - 0x01,0xE3,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x53,0x50,0x43,0x52,0x5A,0x00,0x00,0x00, /* 00000000 "SPCRZ..." */ + 0x04,0x4E,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */ @@ -1965,7 +1965,9 @@ const unsigned char TemplateSpcr[] = 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000048 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */ + 0x00,0x00,0x00,0x00,0x02,0x00,0x58,0x00, /* 00000050 "......X." */ + 0x2E,0x00 /* 00000058 ".." */ }; const unsigned char TemplateSpmi[] = diff --git a/sys/contrib/dev/acpica/include/actbl3.h b/sys/contrib/dev/acpica/include/actbl3.h index 1438c1db507c..81a022544a4a 100644 --- a/sys/contrib/dev/acpica/include/actbl3.h +++ b/sys/contrib/dev/acpica/include/actbl3.h @@ -243,10 +243,10 @@ typedef struct acpi_table_slit /******************************************************************************* * * SPCR - Serial Port Console Redirection table - * Version 2 + * Version 4 * * Conforms to "Serial Port Console Redirection Table", - * Version 1.03, August 10, 2015 + * Version 1.10, Jan 5, 2023 * ******************************************************************************/ @@ -264,7 +264,7 @@ typedef struct acpi_table_spcr UINT8 StopBits; UINT8 FlowControl; UINT8 TerminalType; - UINT8 Reserved1; + UINT8 Language; UINT16 PciDeviceId; UINT16 PciVendorId; UINT8 PciBus; @@ -272,7 +272,11 @@ typedef struct acpi_table_spcr UINT8 PciFunction; UINT32 PciFlags; UINT8 PciSegment; - UINT32 Reserved2; + UINT32 UartClkFreq; + UINT32 PreciseBaudrate; + UINT16 NameSpaceStringLength; + UINT16 NameSpaceStringOffset; + char NameSpaceString[]; } ACPI_TABLE_SPCR;