From a57f40f9924ea83737fa2d5d1ee7f1938d9b07a7 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Wed, 5 Nov 2014 00:50:11 +0000 Subject: [PATCH] [FAST486] Allow direct calls/jumps to TSS selectors in Fast486ProcessGate. svn path=/trunk/; revision=65262 --- reactos/lib/fast486/common.inl | 42 ++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/reactos/lib/fast486/common.inl b/reactos/lib/fast486/common.inl index 8bc4cf8ea60..68285831e56 100644 --- a/reactos/lib/fast486/common.inl +++ b/reactos/lib/fast486/common.inl @@ -702,25 +702,37 @@ Fast486ProcessGate(PFAST486_STATE State, USHORT Selector, ULONG Offset, BOOLEAN return FALSE; } - if (Descriptor.Signature == FAST486_TASK_GATE_SIGNATURE) + switch (Descriptor.Signature) { - /* Task gate */ + case FAST486_TASK_GATE_SIGNATURE: + { + Fast486TaskSwitch(State, + Call ? FAST486_TASK_CALL : FAST486_TASK_JUMP, + ((PFAST486_IDT_ENTRY)&Descriptor)->Selector); - Fast486TaskSwitch(State, - Call ? FAST486_TASK_CALL : FAST486_TASK_JUMP, - ((PFAST486_IDT_ENTRY)&Descriptor)->Selector); + return FALSE; + } - return FALSE; + case FAST486_TSS_SIGNATURE: + { + Fast486TaskSwitch(State, + Call ? FAST486_TASK_CALL : FAST486_TASK_JUMP, + Selector); + + return FALSE; + } + + case FAST486_CALL_GATE_SIGNATURE: + { + // TODO: NOT IMPLEMENTED + UNIMPLEMENTED; + } + + default: + { + return TRUE; + } } - else if (Descriptor.Signature == FAST486_CALL_GATE_SIGNATURE) - { - /* Call gate */ - - // TODO: NOT IMPLEMENTED - UNIMPLEMENTED; - } - - return TRUE; } FORCEINLINE