- Timestamp:
- Mar 22, 2017 8:56:06 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 6 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r66179 r66214 108 108 bs3-cmn-RegCtxSetRipCsFromFlat.c \ 109 109 bs3-cmn-RegCtxSetRipCsFromLnkPtr.c \ 110 bs3-cmn-ExtCtxInit.c \ 111 bs3-cmn-ExtCtxSave.asm \ 112 bs3-cmn-ExtCtxRestore.asm \ 113 bs3-cmn-ExtCtxGetSize.c \ 114 bs3-cmn-ExtCtxAlloc.c \ 115 bs3-cmn-ExtCtxFree.c \ 110 116 bs3-cmn-SelFar32ToFlat32.c \ 111 117 bs3-cmn-SelFar32ToFlat32NoClobber.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r66179 r66214 39 39 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestFailedV) 40 40 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3StrCpy) 41 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetModeName) 41 42 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetModeNameShortLower) 42 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetModeName)43 43 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingAlias) 44 44 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForLM) 45 45 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForPAE) 46 46 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForPP) 47 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtect) 47 48 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtectPtr) 48 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtect)49 49 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingQueryAddressInfo) 50 50 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingUnalias) 51 51 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SwitchFromV86To16BitAndCallC) 52 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxAlloc) 53 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxInit) 52 54 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapSetHandler) 53 55 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Printf) … … 58 60 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3StrPrintf) 59 61 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3StrPrintfV) 62 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxGetSize) 60 63 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PicUpdateMask) 61 64 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabFree) … … 72 75 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingGetPte) 73 76 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingSetupCanonicalTraps) 77 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabAlloc) 74 78 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabAllocEx) 75 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Slab Alloc)79 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAlloc) 76 80 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAllocEx) 77 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAlloc) 81 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxFree) 82 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxRestore) 83 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxSave) 78 84 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemFree) 79 85 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemGuardedTestPageFree) … … 108 114 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubV) 109 115 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestTerm) 116 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16Init) 110 117 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16InitEx) 111 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16Init)112 118 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16SetGate) 113 119 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap32Init) … … 118 124 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapPrintFrame) 119 125 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapReInit) 126 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86Init) 120 127 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86InitEx) 121 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86Init)122 128 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86SetGate) 123 129 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapSetHandlerEx) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r66179 r66214 31 31 #define Bs3A20EnableViaKbd BS3_CMN_MANGLER(Bs3A20EnableViaKbd) 32 32 #define Bs3A20EnableViaPortA BS3_CMN_MANGLER(Bs3A20EnableViaPortA) 33 #define Bs3ExtCtxAlloc BS3_CMN_MANGLER(Bs3ExtCtxAlloc) 34 #define Bs3ExtCtxFree BS3_CMN_MANGLER(Bs3ExtCtxFree) 35 #define Bs3ExtCtxGetSize BS3_CMN_MANGLER(Bs3ExtCtxGetSize) 36 #define Bs3ExtCtxInit BS3_CMN_MANGLER(Bs3ExtCtxInit) 37 #define Bs3ExtCtxRestore BS3_CMN_MANGLER(Bs3ExtCtxRestore) 38 #define Bs3ExtCtxSave BS3_CMN_MANGLER(Bs3ExtCtxSave) 33 39 #define Bs3GetModeName BS3_CMN_MANGLER(Bs3GetModeName) 34 40 #define Bs3GetModeNameShortLower BS3_CMN_MANGLER(Bs3GetModeNameShortLower) … … 149 155 #define Bs3TrapSetHandler BS3_CMN_MANGLER(Bs3TrapSetHandler) 150 156 #define Bs3TrapSetHandlerEx BS3_CMN_MANGLER(Bs3TrapSetHandlerEx) 157 #define Bs3TrapSetJmp BS3_CMN_MANGLER(Bs3TrapSetJmp) 151 158 #define Bs3TrapSetJmpAndRestore BS3_CMN_MANGLER(Bs3TrapSetJmpAndRestore) 152 #define Bs3TrapSetJmp BS3_CMN_MANGLER(Bs3TrapSetJmp)153 159 #define Bs3TrapUnsetJmp BS3_CMN_MANGLER(Bs3TrapUnsetJmp) 154 160 #define Bs3UInt32Div BS3_CMN_MANGLER(Bs3UInt32Div) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r66179 r66214 31 31 #undef Bs3A20EnableViaKbd 32 32 #undef Bs3A20EnableViaPortA 33 #undef Bs3ExtCtxAlloc 34 #undef Bs3ExtCtxFree 35 #undef Bs3ExtCtxGetSize 36 #undef Bs3ExtCtxInit 37 #undef Bs3ExtCtxRestore 38 #undef Bs3ExtCtxSave 33 39 #undef Bs3GetModeName 34 40 #undef Bs3GetModeNameShortLower … … 149 155 #undef Bs3TrapSetHandler 150 156 #undef Bs3TrapSetHandlerEx 157 #undef Bs3TrapSetJmp 151 158 #undef Bs3TrapSetJmpAndRestore 152 #undef Bs3TrapSetJmp153 159 #undef Bs3TrapUnsetJmp 154 160 #undef Bs3UInt32Div -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r66179 r66214 2655 2655 2656 2656 /** 2657 * The method to be used to save and restore the extended context. 2658 */ 2659 typedef enum BS3EXTCTXMETHOD 2660 { 2661 BS3EXTCTXMETHOD_INVALID = 0, 2662 BS3EXTCTXMETHOD_ANCIENT, /**< Ancient fnsave/frstor format. */ 2663 BS3EXTCTXMETHOD_FXSAVE, /**< fxsave/fxrstor format. */ 2664 BS3EXTCTXMETHOD_XSAVE, /**< xsave/xrstor format. */ 2665 BS3EXTCTXMETHOD_END, 2666 } BS3EXTCTXMETHOD; 2667 2668 2669 /** 2670 * Extended CPU context (FPU, SSE, AVX, ++). 2671 * 2672 * @remarks Also in bs3kit.inc 2673 */ 2674 typedef struct BS3EXTCTX 2675 { 2676 /** Dummy/magic value. */ 2677 uint16_t u16Magic; 2678 /** The size of the structure. */ 2679 uint16_t cb; 2680 /** The method used to save and restore the context (BS3EXTCTXMETHOD). */ 2681 uint8_t enmMethod; 2682 2683 /** Explicit alignment padding. */ 2684 uint8_t abPadding[64 - 2 - 2 - 1]; 2685 2686 /** The context, variable size (see above). 2687 * This must be aligned on a 64 byte boundrary. */ 2688 union 2689 { 2690 /** fnsave/frstor. */ 2691 X86FPUSTATE Ancient; 2692 /** fxsave/fxrstor */ 2693 X86FXSTATE x87; 2694 /** xsave/xrstor */ 2695 X86XSAVEAREA x; 2696 } Ctx; 2697 } BS3EXTCTX; 2698 AssertCompileMemberAlignment(BS3EXTCTX, Ctx, 64); 2699 /** Pointer to an extended CPU context. */ 2700 typedef BS3EXTCTX BS3_FAR *PBS3EXTCTX; 2701 /** Pointer to a const extended CPU context. */ 2702 typedef BS3EXTCTX const BS3_FAR *PCBS3EXTCTX; 2703 2704 /** Magic value for BS3EXTCTX. */ 2705 #define BS3EXTCTX_MAGIC UINT16_C(0x1980) 2706 2707 /** 2708 * Allocates and initializes the extended CPU context structure. 2709 * 2710 * @returns The new extended CPU context structure. 2711 * @param fFlags Flags, MBZ. 2712 * @param enmKind The kind of allocation to make. 2713 */ 2714 BS3_CMN_PROTO_STUB(PBS3EXTCTX, Bs3ExtCtxAlloc,(uint16_t fFlags, BS3MEMKIND enmKind)); 2715 2716 /** 2717 * Frees an extended CPU context structure. 2718 * 2719 * @param pExtCtx The extended CPU context (returned by 2720 * Bs3ExtCtxAlloc). 2721 */ 2722 BS3_CMN_PROTO_STUB(void, Bs3ExtCtxFree,(PBS3EXTCTX pExtCtx)); 2723 2724 /** 2725 * Get the size required for a BS3EXTCTX structure. 2726 * 2727 * @returns size in bytes of the whole structure. 2728 * @note Use Bs3ExtCtxAlloc when possible. 2729 */ 2730 BS3_CMN_PROTO_STUB(uint16_t, Bs3ExtCtxGetSize,(uint16_t fFlags)); 2731 2732 /** 2733 * Initializes the extended CPU context structure. 2734 * @returns pExtCtx 2735 * @param pExtCtx The extended CPU context. 2736 * @param cbExtCtx The size of the @a pExtCtx allocation. 2737 * @param fFlags Flags, MBZ. 2738 */ 2739 BS3_CMN_PROTO_STUB(PBS3EXTCTX, Bs3ExtCtxInit,(PBS3EXTCTX pExtCtx, uint16_t cbExtCtx, uint16_t fFlags)); 2740 2741 /** 2742 * Saves the extended CPU state to the given structure. 2743 * 2744 * @param pExtCtx The extended CPU context. 2745 * @remarks All GPRs preserved. 2746 */ 2747 BS3_CMN_PROTO_STUB(void, Bs3ExtCtxSave,(PBS3EXTCTX pExtCtx)); 2748 2749 /** 2750 * Restores the extended CPU state from the given structure. 2751 * 2752 * @param pExtCtx The extended CPU context. 2753 * @remarks All GPRs preserved. 2754 */ 2755 BS3_CMN_PROTO_STUB(void, Bs3ExtCtxRestore,(PBS3EXTCTX pExtCtx)); 2756 2757 2758 2759 /** 2657 2760 * Trap frame. 2658 2761 */ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
r66149 r66214 1417 1417 ;; @} 1418 1418 1419 1420 ;; 1421 ; BS3 extended register context (FPU, SSE, AVX, ++) 1422 ; 1423 struc BS3EXTCTX 1424 .u16Magic resw 1 ; uint16_t u16Magic; 1425 .cb resw 1 ; uint16_t cb; 1426 .enmMethod resb 1 ; uint8_t enmMethod; 1427 alignb 64 1428 .Ctx resb 512 1429 endstruc 1430 %define BS3EXTCTXMETHOD_ANCIENT 1 1431 %define BS3EXTCTXMETHOD_FXSAVE 2 1432 %define BS3EXTCTXMETHOD_XSAVE 3 1433 1419 1434 ;; 1420 1435 ; BS3 Trap Frame.
Note:
See TracChangeset
for help on using the changeset viewer.