From nobody Sun Feb 11 03:39:22 2024 X-Original-To: dev-commits-src-all@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 4TXYHH1HWSz59Hf9; Sun, 11 Feb 2024 03:39:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXYHG5b5nz4LRZ; Sun, 11 Feb 2024 03:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622762; 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=atydKz0gqcx6DtTqXTLM0ZL0w658f8UQssH9RMrGyQc=; b=I7dJc+Ieq1teA4BAioyngf8fqkWyVG7IgcCwON5dfcn+cCcQWMa+2RhLLMTGMbbQnb1ajA Q0u8doaKJZyKeDw2e98zGv1gRXCNyAemLNPWFVjTCL8oWLydx094J866ximE4pqItG4gsg 6ww2CzQRAgKxxRCs+PP7KLE+eQHn7Zo0DrXRkusqY7TeagyMMD+0tj/AEv6sOqgvSfGacR 8smXMjHu5xMWkD81Ra2Yja0wOU1sWXkiz3GNxnpY5fmJhtPEBWRZsiPfXP7uGsFhvluCUG Gx1WhLAGtC065zB5s7Oldm+AsXFG+z3tjQthPALxMgL7IcBbqAUmOEOkoI3Lkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707622762; a=rsa-sha256; cv=none; b=XlIuTS+Ijubxl/vON8dcbLH18BjJFIOQFqld3dk814eWZOlZie2h9fheU/fivE956MZuwX tQ3eVEEfysCcCGFytxkRU9a/fgDJjaJiuNrxTBPw5+lOuHS9ZZ8QAftHjNFlDpqHfPsanK qDab5XLl4T6IWdWNBljyyssGAzKWz4m/pQNnBjjyY3TMsAN/T2BC1eAp0S281tPQRGk0xU 2oBlK7d8Iq86yRYTf4FRzUP1XIRPSzpAOyMxjZpvu75Xun1S1Zp1PLhnxXO7q00wyg/mPJ hG1kr6tHIS9fJZuyyuXtLqoM+CZdn1hIzb6mA289U0J75pNG3tZgWWTnqAvDEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707622762; 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=atydKz0gqcx6DtTqXTLM0ZL0w658f8UQssH9RMrGyQc=; b=wMinBPJ/FJ2xOkVLC02gEfx1zcoYllf5iP/Q2akQXYLuACTtR991HPzHs0Ux9w+Duefp8h iuJnuuEqQTbkQyg6BVpmFsJLOBc+13G9JTSGg6qd6o1Va3HFQBANbVLV3LFFm4Z9tWon6t CPETd1GwuHhtVh949jn3mUSozQLDF39EDTRrgg/nCvH1bQc1EcVU7CtT2qjpibzKgsOHzV nOvBxYxKYasBxXtl4hdNZRSDIVsa6TAbrPBLpwRXYThYcDc6/ya0/Bd08wChnQhl91s7uL TFML86gHcRImc4Ymxr0841ZWUGtuJVwzzLOcj6tuLhiihf3Qiq+KzmYTrDTDWw== 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 4TXYHG4gLmzjm4; Sun, 11 Feb 2024 03:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41B3dM7R060260; Sun, 11 Feb 2024 03:39:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B3dMOp060257; Sun, 11 Feb 2024 03:39:22 GMT (envelope-from git) Date: Sun, 11 Feb 2024 03:39:22 GMT Message-Id: <202402110339.41B3dMOp060257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1d6230b07ff2 - main - amd64 gdt_segs: use designated initializers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a commit 1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a Author: Konstantin Belousov AuthorDate: 2024-02-09 04:59:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-11 03:38:23 +0000 amd64 gdt_segs: use designated initializers Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/amd64/amd64/machdep.c | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b2120af8e856..c8539b7b189d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -354,8 +354,8 @@ CTASSERT(sizeof(struct nmi_pcpu) == 16); * slots as corresponding segments for i386 kernel. */ struct soft_segment_descriptor gdt_segs[] = { -/* GNULL_SEL 0 Null Descriptor */ -{ .ssd_base = 0x0, +[GNULL_SEL] = { /* 0 Null Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -363,8 +363,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GNULL2_SEL 1 Null Descriptor */ -{ .ssd_base = 0x0, +[GNULL2_SEL] = { /* 1 Null Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -372,8 +372,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUFS32_SEL 2 32 bit %gs Descriptor for user */ -{ .ssd_base = 0x0, +[GUFS32_SEL] = { /* 2 32 bit %gs Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -381,8 +381,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUGS32_SEL 3 32 bit %fs Descriptor for user */ -{ .ssd_base = 0x0, +[GUGS32_SEL] = { /* 3 32 bit %fs Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -390,8 +390,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GCODE_SEL 4 Code Descriptor for kernel */ -{ .ssd_base = 0x0, +[GCODE_SEL] = { /* 4 Code Descriptor for kernel */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_KPL, @@ -399,8 +399,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GDATA_SEL 5 Data Descriptor for kernel */ -{ .ssd_base = 0x0, +[GDATA_SEL] = { /* 5 Data Descriptor for kernel */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_KPL, @@ -408,8 +408,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GUCODE32_SEL 6 32 bit Code Descriptor for user */ -{ .ssd_base = 0x0, +[GUCODE32_SEL] = { /* 6 32 bit Code Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_UPL, @@ -417,8 +417,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUDATA_SEL 7 32/64 bit Data Descriptor for user */ -{ .ssd_base = 0x0, +[GUDATA_SEL] = { /* 7 32/64 bit Data Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMRWA, .ssd_dpl = SEL_UPL, @@ -426,8 +426,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -/* GUCODE_SEL 8 64 bit Code Descriptor for user */ -{ .ssd_base = 0x0, +[GUCODE_SEL] = { /* 8 64 bit Code Descriptor for user */ + .ssd_base = 0x0, .ssd_limit = 0xfffff, .ssd_type = SDT_MEMERA, .ssd_dpl = SEL_UPL, @@ -435,8 +435,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 1, .ssd_def32 = 0, .ssd_gran = 1 }, -/* GPROC0_SEL 9 Proc 0 Tss Descriptor */ -{ .ssd_base = 0x0, +[GPROC0_SEL] = { /* 9 Proc 0 TSS Descriptor */ + .ssd_base = 0x0, .ssd_limit = sizeof(struct amd64tss) + IOPERM_BITMAP_SIZE - 1, .ssd_type = SDT_SYSTSS, .ssd_dpl = SEL_KPL, @@ -444,8 +444,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* Actually, the TSS is a system descriptor which is double size */ -{ .ssd_base = 0x0, +[GPROC0_SEL + 1] = { /* 10 Proc 0 TSS descriptor, double size */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -453,8 +453,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUSERLDT_SEL 11 LDT Descriptor */ -{ .ssd_base = 0x0, +[GUSERLDT_SEL] = { /* 11 LDT Descriptor */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0, @@ -462,8 +462,8 @@ struct soft_segment_descriptor gdt_segs[] = { .ssd_long = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -/* GUSERLDT_SEL 12 LDT Descriptor, double size */ -{ .ssd_base = 0x0, +[GUSERLDT_SEL + 1] = { /* 12 LDT Descriptor, double size */ + .ssd_base = 0x0, .ssd_limit = 0x0, .ssd_type = 0, .ssd_dpl = 0,