From ba46cd63d89446a7c0036dd854b14ddd339a58e3 Mon Sep 17 00:00:00 2001 From: nyan Date: Fri, 27 Mar 2009 03:45:42 +0000 Subject: [PATCH] MFi386: r190447 Convert gdt_segs and ldt_segs initialization to C99 style. --- sys/pc98/pc98/machdep.c | 400 ++++++++++++++++++++-------------------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 362351917169..a2d43e6bc37e 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -1308,234 +1308,234 @@ extern vm_offset_t proc0kstack; */ struct soft_segment_descriptor gdt_segs[] = { /* GNULL_SEL 0 Null Descriptor */ -{ 0x0, /* segment base address */ - 0x0, /* length */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GPRIV_SEL 1 SMP Per-Processor Private Data Descriptor */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GUFS_SEL 2 %fs Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GUGS_SEL 3 %gs Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GCODE_SEL 4 Code Descriptor for kernel */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMERA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GDATA_SEL 5 Data Descriptor for kernel */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GUCODE_SEL 6 Code Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMERA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GUDATA_SEL 7 Data Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GBIOSLOWMEM_SEL 8 BIOS access to realmode segment 0x40, must be #8 in GDT */ -{ 0x400, /* segment base address */ - 0xfffff, /* length */ - SDT_MEMRWA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x400, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GPROC0_SEL 9 Proc 0 Tss Descriptor */ { - 0x0, /* segment base address */ - sizeof(struct i386tss)-1,/* length */ - SDT_SYS386TSS, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* unused - default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, + .ssd_base = 0x0, + .ssd_limit = sizeof(struct i386tss)-1, + .ssd_type = SDT_SYS386TSS, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GLDT_SEL 10 LDT Descriptor */ -{ (int) ldt, /* segment base address */ - sizeof(ldt)-1, /* length - all address space */ - SDT_SYSLDT, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* unused - default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = (int) ldt, + .ssd_limit = sizeof(ldt)-1, + .ssd_type = SDT_SYSLDT, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GUSERLDT_SEL 11 User LDT Descriptor per process */ -{ (int) ldt, /* segment base address */ - (512 * sizeof(union descriptor)-1), /* length */ - SDT_SYSLDT, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* unused - default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = (int) ldt, + .ssd_limit = (512 * sizeof(union descriptor)-1), + .ssd_type = SDT_SYSLDT, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GPANIC_SEL 12 Panic Tss Descriptor */ -{ (int) &dblfault_tss, /* segment base address */ - sizeof(struct i386tss)-1,/* length - all address space */ - SDT_SYS386TSS, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* unused - default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = (int) &dblfault_tss, + .ssd_limit = sizeof(struct i386tss)-1, + .ssd_type = SDT_SYS386TSS, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* GBIOSCODE32_SEL 13 BIOS 32-bit interface (32bit Code) */ -{ 0, /* segment base address (overwritten) */ - 0xfffff, /* length */ - SDT_MEMERA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GBIOSCODE16_SEL 14 BIOS 32-bit interface (16bit Code) */ -{ 0, /* segment base address (overwritten) */ - 0xfffff, /* length */ - SDT_MEMERA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GBIOSDATA_SEL 15 BIOS 32-bit interface (Data) */ -{ 0, /* segment base address (overwritten) */ - 0xfffff, /* length */ - SDT_MEMRWA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* GBIOSUTIL_SEL 16 BIOS 16-bit interface (Utility) */ -{ 0, /* segment base address (overwritten) */ - 0xfffff, /* length */ - SDT_MEMRWA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GBIOSARGS_SEL 17 BIOS 16-bit interface (Arguments) */ -{ 0, /* segment base address (overwritten) */ - 0xfffff, /* length */ - SDT_MEMRWA, /* segment type */ - 0, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = 0, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 1 }, /* GNDIS_SEL 18 NDIS Descriptor */ -{ 0x0, /* segment base address */ - 0x0, /* length */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, }; static struct soft_segment_descriptor ldt_segs[] = { /* Null Descriptor - overwritten by call gate */ -{ 0x0, /* segment base address */ - 0x0, /* length - all address space */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* Null Descriptor - overwritten by call gate */ -{ 0x0, /* segment base address */ - 0x0, /* length - all address space */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* Null Descriptor - overwritten by call gate */ -{ 0x0, /* segment base address */ - 0x0, /* length - all address space */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* Code Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMERA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMERA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, /* Null Descriptor - overwritten by call gate */ -{ 0x0, /* segment base address */ - 0x0, /* length - all address space */ - 0, /* segment type */ - 0, /* segment descriptor priority level */ - 0, /* segment descriptor present */ - 0, 0, - 0, /* default 32 vs 16 bit size */ - 0 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0x0, + .ssd_type = 0, + .ssd_dpl = 0, + .ssd_p = 0, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 0, + .ssd_gran = 0 }, /* Data Descriptor for user */ -{ 0x0, /* segment base address */ - 0xfffff, /* length - all address space */ - SDT_MEMRWA, /* segment type */ - SEL_UPL, /* segment descriptor priority level */ - 1, /* segment descriptor present */ - 0, 0, - 1, /* default 32 vs 16 bit size */ - 1 /* limit granularity (byte/page units)*/ }, +{ .ssd_base = 0x0, + .ssd_limit = 0xfffff, + .ssd_type = SDT_MEMRWA, + .ssd_dpl = SEL_UPL, + .ssd_p = 1, + .ssd_xx = 0, .ssd_xx1 = 0, + .ssd_def32 = 1, + .ssd_gran = 1 }, }; void