Changeset 97320 in vbox
- Timestamp:
- Oct 27, 2022 12:45:25 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154311
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r96412 r97320 194 194 bs3-cmn-SelSetup16BitData.c \ 195 195 bs3-cmn-SelSetup16BitCode.c \ 196 bs3-cmn-SelSetup32BitCode.c \ 196 197 bs3-cmn-SlabInit.c \ 197 198 bs3-cmn-SlabAlloc.c \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelSetup32BitCode.c
r97285 r97320 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3SelSetup 16BitCode3 * BS3Kit - Bs3SelSetup32BitCode 4 4 */ 5 5 … … 42 42 43 43 44 #undef Bs3SelSetup 16BitCode45 BS3_CMN_DEF(void, Bs3SelSetup 16BitCode,(X86DESC BS3_FAR *pDesc, uint32_t uBaseAddr, uint8_t bDpl))44 #undef Bs3SelSetup32BitCode 45 BS3_CMN_DEF(void, Bs3SelSetup32BitCode,(X86DESC BS3_FAR *pDesc, uint32_t uBaseAddr, uint32_t uLimit, uint8_t bDpl)) 46 46 { 47 pDesc->Gen.u16LimitLow = UINT16_C(0xffff); 48 pDesc->Gen.u16BaseLow = (uint16_t)uBaseAddr; 49 pDesc->Gen.u8BaseHigh1 = (uint8_t)(uBaseAddr >> 16); 50 pDesc->Gen.u4Type = X86_SEL_TYPE_ER_ACC; 51 pDesc->Gen.u1DescType = 1; /* data/code */ 52 pDesc->Gen.u2Dpl = bDpl & 3; 53 pDesc->Gen.u1Present = 1; 54 pDesc->Gen.u4LimitHigh = 0; 55 pDesc->Gen.u1Available = 0; 56 pDesc->Gen.u1Long = 0; 57 pDesc->Gen.u1DefBig = 0; 58 pDesc->Gen.u1Granularity = 0; 59 pDesc->Gen.u8BaseHigh2 = (uint8_t)(uBaseAddr >> 24); 47 uint8_t const cLimitShift = uLimit <= UINT32_C(0xfffff) ? 0 : 12; 48 pDesc->Gen.u16LimitLow = (uint16_t)(uLimit >> cLimitShift); 49 pDesc->Gen.u16BaseLow = (uint16_t)uBaseAddr; 50 pDesc->Gen.u8BaseHigh1 = (uint8_t)(uBaseAddr >> 16); 51 pDesc->Gen.u4Type = X86_SEL_TYPE_ER_ACC; 52 pDesc->Gen.u1DescType = 1; /* data/code */ 53 pDesc->Gen.u2Dpl = bDpl & 3; 54 pDesc->Gen.u1Present = 1; 55 pDesc->Gen.u4LimitHigh = (unsigned)(uLimit >> (16 + cLimitShift)); 56 pDesc->Gen.u1Available = 0; 57 pDesc->Gen.u1Long = 0; 58 pDesc->Gen.u1DefBig = 1; 59 pDesc->Gen.u1Granularity = cLimitShift != 0; 60 pDesc->Gen.u8BaseHigh2 = (uint8_t)(uBaseAddr >> 24); 60 61 } 61 62 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r96407 r97320 141 141 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetup16BitCode) 142 142 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetup16BitData) 143 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelSetup32BitCode) 143 144 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabInit) 144 145 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAdd) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r96407 r97320 171 171 #define Bs3SelSetup16BitCode BS3_CMN_MANGLER(Bs3SelSetup16BitCode) 172 172 #define Bs3SelSetup16BitData BS3_CMN_MANGLER(Bs3SelSetup16BitData) 173 #define Bs3SelSetup32BitCode BS3_CMN_MANGLER(Bs3SelSetup32BitCode) 173 174 #define Bs3Shutdown BS3_CMN_MANGLER(Bs3Shutdown) 174 175 #define Bs3SlabAlloc BS3_CMN_MANGLER(Bs3SlabAlloc) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r96407 r97320 171 171 #undef Bs3SelSetup16BitCode 172 172 #undef Bs3SelSetup16BitData 173 #undef Bs3SelSetup32BitCode 173 174 #undef Bs3Shutdown 174 175 #undef Bs3SlabAlloc -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r96407 r97320 1975 1975 BS3_CMN_PROTO_STUB(void, Bs3SelSetup16BitCode,(X86DESC BS3_FAR *pDesc, uint32_t uBaseAddr, uint8_t bDpl)); 1976 1976 1977 /** 1978 * Sets up a 32-bit execute-read selector with a user specified limit. 1979 * 1980 * @param pDesc Pointer to the descriptor table entry. 1981 * @param uBaseAddr The base address of the descriptor. 1982 * @param uLimit The limit. (This is included here and not in the 16-bit 1983 * functions because we're more likely to want to set it 1984 * than for 16-bit selectors.) 1985 * @param bDpl The descriptor privilege level. 1986 */ 1987 BS3_CMN_PROTO_STUB(void, Bs3SelSetup32BitCode,(X86DESC BS3_FAR *pDesc, uint32_t uBaseAddr, uint32_t uLimit, uint8_t bDpl)); 1988 1977 1989 1978 1990 /**
Note:
See TracChangeset
for help on using the changeset viewer.