Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Library/BaseUefiCpuLib
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103777
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
r58459 r58466 9 9 # which accompanies this distribution. The full text of the license may be found at 10 10 # http://opensource.org/licenses/bsd-license.php 11 # 11 # 12 12 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 13 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 # 14 # 15 15 ## 16 16 … … 22 22 MODULE_TYPE = BASE 23 23 VERSION_STRING = 1.0 24 LIBRARY_CLASS = UefiCpuLib 24 LIBRARY_CLASS = UefiCpuLib 25 25 26 26 # -
trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.S
r48674 r58466 14 14 15 15 # 16 # Float control word initial value: 16 # Float control word initial value: 17 17 # all exceptions masked, double-precision, round-to-nearest 18 18 # … … 42 42 finit 43 43 fldcw ASM_PFX(mFpuControlWord) 44 44 45 45 # 46 46 # Use CpuId instructuion (CPUID.01H:EDX.SSE[bit 25] = 1) to test … … 51 51 btl $25, %edx 52 52 jnc Done 53 53 54 54 # 55 55 # Set OSFXSR bit 9 in CR4 56 56 # 57 movl %cr4, %eax 57 movl %cr4, %eax 58 58 or $0x200, %eax 59 59 movl %eax, %cr4 60 60 61 61 # 62 62 # The processor should support SSE instruction and we can use -
trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.asm
r48674 r58466 10 10 ;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 11 ;* 12 ;* 12 ;* 13 13 ;------------------------------------------------------------------------------ 14 14 … … 18 18 .const 19 19 ; 20 ; Float control word initial value: 20 ; Float control word initial value: 21 21 ; all exceptions masked, double-precision, round-to-nearest 22 22 ; … … 26 26 ; all exceptions masked, round-to-nearest, flush to zero for masked underflow 27 27 ; 28 mMmxControlWord DD 01F80h 28 mMmxControlWord DD 01F80h 29 29 30 30 .xmm … … 48 48 finit 49 49 fldcw mFpuControlWord 50 50 51 51 ; 52 52 ; Use CpuId instructuion (CPUID.01H:EDX.SSE[bit 25] = 1) to test … … 57 57 bt edx, 25 58 58 jnc Done 59 59 60 60 ; 61 61 ; Set OSFXSR bit 9 in CR4 … … 64 64 or eax, BIT9 65 65 mov cr4, eax 66 66 67 67 ; 68 68 ; The processor should support SSE instruction and we can use -
trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.S
r58459 r58466 28 28 # 29 29 finit 30 30 31 31 # 32 # Float control word initial value: 32 # Float control word initial value: 33 33 # all exceptions masked, double-precision, round-to-nearest 34 34 # 35 35 pushq $0x037F 36 lea (%rsp), %rax 36 lea (%rsp), %rax 37 37 fldcw (%rax) 38 38 popq %rax 39 39 40 40 # 41 41 # Set OSFXSR bit 9 in CR4 42 42 # 43 movq %cr4, %rax 43 movq %cr4, %rax 44 44 or $0x200, %rax 45 45 movq %rax, %cr4 … … 48 48 # Multimedia-extensions control word: 49 49 # all exceptions masked, round-to-nearest, flush to zero for masked underflow 50 # 50 # 51 51 pushq $0x01F80 52 52 lea (%rsp), %rax 53 53 ldmxcsr (%rax) 54 54 popq %rax 55 55 56 56 ret 57 57 -
trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.asm
r58459 r58466 16 16 .const 17 17 ; 18 ; Float control word initial value: 18 ; Float control word initial value: 19 19 ; all exceptions masked, double-extended-precision, round-to-nearest 20 20 ; … … 24 24 ; all exceptions masked, round-to-nearest, flush to zero for masked underflow 25 25 ; 26 mMmxControlWord DD 01F80h 26 mMmxControlWord DD 01F80h 27 27 28 28 .code … … 42 42 ; Initialize floating point units 43 43 ; 44 ; The following opcodes stand for instruction 'finit' 44 ; The following opcodes stand for instruction 'finit' 45 45 ; to be supported by some 64-bit assemblers 46 46 ; 47 47 DB 9Bh, 0DBh, 0E3h 48 48 fldcw mFpuControlWord 49 49 50 50 ; 51 51 ; Set OSFXSR bit 9 in CR4 … … 56 56 57 57 ldmxcsr mMmxControlWord 58 58 59 59 ret 60 60 InitializeFloatingPointUnits ENDP
Note:
See TracChangeset
for help on using the changeset viewer.