mirror of
https://gitlab.com/bztsrc/posix-uefi.git
synced 2024-12-29 05:55:31 +01:00
Make sure SSE is enabled
This commit is contained in:
parent
bfb6ad022c
commit
1d5cec5fb2
1 changed files with 9 additions and 0 deletions
|
@ -180,6 +180,15 @@ int uefi_init (
|
|||
#else
|
||||
(void)i;
|
||||
#endif
|
||||
/* make sure SSE is enabled, because some say there are buggy firmware in the wild not doing that */
|
||||
__asm__ __volatile__ (
|
||||
" movq %cr0, %rax\n"
|
||||
" andb $0xF1, %al\n"
|
||||
" movq %rax, %cr0\n"
|
||||
" movq %cr4, %rax\n"
|
||||
" orw $3 << 9, %ax\n"
|
||||
" mov %rax, %cr4\n"
|
||||
);
|
||||
/* save EFI pointers and loaded image into globals */
|
||||
IM = image;
|
||||
ST = systab;
|
||||
|
|
Loading…
Reference in a new issue