Changeset 97624 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Nov 21, 2022 11:13:29 AM (2 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r97576 r97624 197 197 bs3-cmn-SelSetup16BitCode.c \ 198 198 bs3-cmn-SelSetup32BitCode.c \ 199 bs3-cmn-SelSetupGate.c \ 200 bs3-cmn-SelSetupGate64.c \ 199 201 bs3-cmn-SlabInit.c \ 200 202 bs3-cmn-SlabAlloc.c \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelSetupGate.c
r97598 r97624 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3 Trap32SetGate3 * BS3Kit - Bs3SelSetupGate 4 4 */ 5 5 … … 42 42 43 43 44 #undef Bs3Trap32SetGate 45 BS3_CMN_DEF(void, Bs3Trap32SetGate,(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams)) 44 #undef Bs3SelSetupGate 45 BS3_CMN_DEF(void, Bs3SelSetupGate,(X86DESC BS3_FAR *pDesc, uint8_t bType, uint8_t bDpl, 46 uint16_t uSel, uint32_t off, uint8_t cParams)) 46 47 { 47 X86DESC BS3_FAR *pIdte = &Bs3Idt32[iIdt];48 49 48 BS3_ASSERT(bDpl <= 3); 50 49 BS3_ASSERT(bType <= 15); 51 50 BS3_ASSERT(cParams <= 15); 52 p Idte->Gate.u16OffsetLow = (uint16_t)off;53 p Idte->Gate.u16OffsetHigh = (uint16_t)(off >> 16);54 p Idte->Gate.u16Sel = uSel;55 p Idte->Gate.u5ParmCount = cParams;56 p Idte->Gate.u4Type = bType;57 p Idte->Gate.u2Dpl = bDpl;58 p Idte->Gate.u3Reserved = 0;59 p Idte->Gate.u1DescType = 0; /* system */60 p Idte->Gate.u1Present = 1;51 pDesc->Gate.u16OffsetLow = (uint16_t)off; 52 pDesc->Gate.u16OffsetHigh = (uint16_t)(off >> 16); 53 pDesc->Gate.u16Sel = uSel; 54 pDesc->Gate.u5ParmCount = cParams; 55 pDesc->Gate.u4Type = bType; 56 pDesc->Gate.u2Dpl = bDpl; 57 pDesc->Gate.u3Reserved = 0; 58 pDesc->Gate.u1DescType = 0; /* system */ 59 pDesc->Gate.u1Present = 1; 61 60 } 62 61 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelSetupGate64.c
r97598 r97624 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3 Trap32SetGate3 * BS3Kit - Bs3SelSetupGate64 4 4 */ 5 5 … … 42 42 43 43 44 #undef Bs3 Trap32SetGate45 BS3_CMN_DEF(void, Bs3 Trap32SetGate,(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams))44 #undef Bs3SelSetupGate64 45 BS3_CMN_DEF(void, Bs3SelSetupGate64,(X86DESC BS3_FAR *pDescPair, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint64_t off)) 46 46 { 47 X86DESC BS3_FAR *pIdte = &Bs3Idt32[iIdt];48 49 47 BS3_ASSERT(bDpl <= 3); 50 48 BS3_ASSERT(bType <= 15); 51 BS3_ASSERT(cParams <= 15); 52 pIdte->Gate.u16OffsetLow = (uint16_t)off; 53 pIdte->Gate.u16OffsetHigh = (uint16_t)(off >> 16); 54 pIdte->Gate.u16Sel = uSel; 55 pIdte->Gate.u5ParmCount = cParams; 56 pIdte->Gate.u4Type = bType; 57 pIdte->Gate.u2Dpl = bDpl; 58 pIdte->Gate.u3Reserved = 0; 59 pIdte->Gate.u1DescType = 0; /* system */ 60 pIdte->Gate.u1Present = 1; 49 pDescPair[0].Gate.u16OffsetLow = (uint16_t)off; 50 pDescPair[0].Gate.u16OffsetHigh = (uint16_t)(off >> 16); 51 pDescPair[0].Gate.u16Sel = uSel; 52 pDescPair[0].Gate.u5ParmCount = 0; 53 pDescPair[0].Gate.u4Type = bType; 54 pDescPair[0].Gate.u2Dpl = bDpl; 55 pDescPair[0].Gate.u3Reserved = 0; 56 pDescPair[0].Gate.u1DescType = 0; /* system */ 57 pDescPair[0].Gate.u1Present = 1; 58 pDescPair[1].au32[0] = (uint32_t)(off >> 32); 59 pDescPair[1].au32[1] = 0; 61 60 } 62 61 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r97613 r97624 144 144 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetup16BitData) 145 145 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetup32BitCode) 146 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetupGate64) 147 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetupGate) 146 148 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabInit) 147 149 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAdd) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r97613 r97624 174 174 #define Bs3SelSetup16BitData BS3_CMN_MANGLER(Bs3SelSetup16BitData) 175 175 #define Bs3SelSetup32BitCode BS3_CMN_MANGLER(Bs3SelSetup32BitCode) 176 #define Bs3SelSetupGate64 BS3_CMN_MANGLER(Bs3SelSetupGate64) 177 #define Bs3SelSetupGate BS3_CMN_MANGLER(Bs3SelSetupGate) 176 178 #define Bs3Shutdown BS3_CMN_MANGLER(Bs3Shutdown) 177 179 #define Bs3SlabAlloc BS3_CMN_MANGLER(Bs3SlabAlloc) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r97613 r97624 174 174 #undef Bs3SelSetup16BitData 175 175 #undef Bs3SelSetup32BitCode 176 #undef Bs3SelSetupGate64 177 #undef Bs3SelSetupGate 176 178 #undef Bs3Shutdown 177 179 #undef Bs3SlabAlloc -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r97613 r97624 1995 1995 BS3_CMN_PROTO_STUB(void, Bs3SelSetup32BitCode,(X86DESC BS3_FAR *pDesc, uint32_t uBaseAddr, uint32_t uLimit, uint8_t bDpl)); 1996 1996 1997 /** 1998 * Sets up a 16-bit or 32-bit gate descriptor. 1999 * 2000 * This can be used both for GDT/LDT and IDT. 2001 * 2002 * @param pDesc Pointer to the descriptor table entry. 2003 * @param bType The gate type. 2004 * @param bDpl The gate DPL. 2005 * @param uSel The gate selector value. 2006 * @param off The gate IP/EIP value. 2007 * @param cParams Number of parameters to copy if call-gate. 2008 */ 2009 BS3_CMN_PROTO_STUB(void, Bs3SelSetupGate,(X86DESC BS3_FAR *pDesc, uint8_t bType, uint8_t bDpl, 2010 uint16_t uSel, uint32_t off, uint8_t cParams)); 2011 2012 /** 2013 * Sets up a 64-bit gate descriptor. 2014 * 2015 * This can be used both for GDT/LDT and IDT. 2016 * 2017 * @param pDescPair Pointer to the _two_ descriptor table entries. 2018 * @param bType The gate type. 2019 * @param bDpl The gate DPL. 2020 * @param uSel The gate selector value. 2021 * @param off The gate IP/EIP value. 2022 */ 2023 BS3_CMN_PROTO_STUB(void, Bs3SelSetupGate64,(X86DESC BS3_FAR *pDescPair, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint64_t off)); 2024 1997 2025 1998 2026 /**
Note:
See TracChangeset
for help on using the changeset viewer.