Provide convenient definition of the union descriptor, similar to the

i386 one. Fully enumerate system segments and gate types.

In collaboration with:	pho
Reviewed by:	jhb
This commit is contained in:
Konstantin Belousov 2009-04-01 12:31:04 +00:00
parent 2364576d14
commit 49c9cff881
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190615

View File

@ -108,12 +108,29 @@ struct gate_descriptor {
u_int64_t sd_xx1:32;
} __packed;
/*
* Generic descriptor
*/
union descriptor {
struct user_segment_descriptor sd;
struct gate_descriptor gd;
};
/* system segments and gate types */
#define SDT_SYSNULL 0 /* system null */
#define SDT_SYS286TSS 1 /* system 286 TSS available */
#define SDT_SYSLDT 2 /* system 64 bit local descriptor table */
#define SDT_SYS286BSY 3 /* system 286 TSS busy */
#define SDT_SYS286CGT 4 /* system 286 call gate */
#define SDT_SYSTASKGT 5 /* system task gate */
#define SDT_SYS286IGT 6 /* system 286 interrupt gate */
#define SDT_SYS286TGT 7 /* system 286 trap gate */
#define SDT_SYSNULL2 8 /* system null again */
#define SDT_SYSTSS 9 /* system available 64 bit TSS */
#define SDT_SYSNULL3 10 /* system null again */
#define SDT_SYSBSY 11 /* system busy 64 bit TSS */
#define SDT_SYSCGT 12 /* system 64 bit call gate */
#define SDT_SYSNULL4 13 /* system null again */
#define SDT_SYSIGT 14 /* system 64 bit interrupt gate */
#define SDT_SYSTGT 15 /* system 64 bit trap gate */