Date: Wed, 14 Feb 2024 04:05:37 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 976b3cf86d79 - stable/13 - amd64 gdt_segs: use designated initializers Message-ID: <202402140405.41E45bGr082503@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=976b3cf86d799de4d53c56d83ce47ccbbe192a7a commit 976b3cf86d799de4d53c56d83ce47ccbbe192a7a Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-02-09 04:59:48 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-02-14 03:54:00 +0000 amd64 gdt_segs: use designated initializers (cherry picked from commit 1d6230b07ff29b4d3ae527dbc0fc3f9775a7542a) --- 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 eef11f0bdddd..928203a690ac 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -357,8 +357,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, @@ -366,8 +366,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, @@ -375,8 +375,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, @@ -384,8 +384,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, @@ -393,8 +393,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, @@ -402,8 +402,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, @@ -411,8 +411,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, @@ -420,8 +420,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, @@ -429,8 +429,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, @@ -438,8 +438,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, @@ -447,8 +447,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, @@ -456,8 +456,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, @@ -465,8 +465,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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402140405.41E45bGr082503>