hi
i may not understand much of the minix code but the following i think
is incorrect:

05825 #define GDT_SELECTOR 0x08 /* (GDT_INDEX * DESC_SIZE) bad
for asld */
05826 #define IDT_SELECTOR 0x10 /* (IDT_INDEX * DESC_SIZE) */
05827 #define DS_SELECTOR 0x18 /* (DS_INDEX * DESC_SIZE) */
05828 #define ES_SELECTOR 0x20 /* (ES_INDEX * DESC_SIZE) */
05829 #define FLAT_DS_SELECTOR 0x21 /* less privileged ES */
05830 #define SS_SELECTOR 0x28 /* (SS_INDEX * DESC_SIZE) */
05831 #define CS_SELECTOR 0x30 /* (CS_INDEX * DESC_SIZE) */
05832 #define MON_CS_SELECTOR 0x38 /* (MON_CS_INDEX * DESC_SIZE) */
05833 #define TSS_SELECTOR 0x40 /* (TSS_INDEX * DESC_SIZE) */
05834 #define DS_286_SELECTOR 0x49 /*
(DS_286_INDEX*DESC_SIZE+TASK_PRIVILEGE) */
05835 #define ES_286_SELECTOR 0x51 /*
(ES_286_INDEX*DESC_SIZE+TASK_PRIVILEGE) */

it may work, but the comments are misleading
they make you think a selector is created by taking the index into the
gdt and multiply it by the size of the descriptor
the following would be more correct i think:

05825 #define GDT_SELECTOR GDT_INDEX << 3

the reason why the selector of a segment is equal to the index*8 is
nothing to do with the size of the descriptor, but rather, because the
3 rightmost bits in a selector are needed for encoding the table
indicator and the rpl!
the selector could also be

#define GDT_SELECTOR GDT_INDEX << 3 + 1

or

#define GDT_SELECTOR GDT_INDEX << 3 + 2

#define GDT_SELECTOR GDT_INDEX << 3 + 3

....depending on the pl you want to give it!