Hi,
Initially, you will just want 3 entries:
Code:
0: The NULL descriptor
1: A 32 bit ring 0 code descriptor
2: A 32 bit ring 0 data descriptor
Note that while entry 0 must be the NULL descriptor, you can make your own mind up about the order of everything else (although what I'm telling you is fairly conventional). With just these 3 entries, you can jump to Protected Mode.
When I load my 32 bit GDT, I also have entries 3 and 4, which are ring 3 code and data descriptors. After that, I have a single entry for each processor core (you will find later that an entry per CPU is "required" for multitasking - for the TSS).
If you are planning on returning to real mode for anything, you will also want at least one 16 bit code descriptor (to reset the limit of CS to a 16 bit limit). If you want to use long mode, you will need 64 bit code and data segments for ring 0 and ring 3.
So, realistically, your GDT will have 6 entries (including NULL) for a 32 bit PMode OS, plus one per additional core. Importantly, remember that other entries can be added later, but
remember to adjust the GDTR limit if you do!
HTH,
Adam