TSS i/o bitmap
Posted: Mon Nov 30, 2009 8:29 am
I´m about to start coding for the TSS i/o bitmap and got a few questions.
So the x86 architecture has at max 64k ports (0-0xFFFF) and the bitmap is at max 8kb. I wanted to use 3 pages for that:
The 1st problem I have is that behind the table should be a byte with "0xFF", but as I planed to use 2 4kb pages (so that I need only to change the pages if needed for every process) and there I can´t guarantee that the byte behind the table exists. I could now put the TSS at 0xF94 and save the dword of the 1st 32 ports in my process structure. My question would be if the 1st 32 ports are used? If they aren´t used I needn´t to save the dword in my process structure.
Do you think this is a good idea? How are you solving the problem to give a process (which only can be a driver and no normal user process) i/o access only to the ports it is allowed to access?
And how is it with performance with this method? Are there any faster methods to check permission for i/o ports?
So the x86 architecture has at max 64k ports (0-0xFFFF) and the bitmap is at max 8kb. I wanted to use 3 pages for that:
Code: Select all
0 - 0xF97 cpu specific data
0xF98 - 0xFFF TSS
0x1000 - 0x2FFF i/o-bitmap
Do you think this is a good idea? How are you solving the problem to give a process (which only can be a driver and no normal user process) i/o access only to the ports it is allowed to access?
And how is it with performance with this method? Are there any faster methods to check permission for i/o ports?