diff --git a/kernel/x86/boot.S b/kernel/x86/boot.S index 4f1a2ca4..80d414ed 100644 --- a/kernel/x86/boot.S +++ b/kernel/x86/boot.S @@ -1,5 +1,6 @@ /* * Copyright (c) 2011, 2014, 2015, 2016, 2018 Jonas 'Sortie' Termansen. + * Copyright (c) 2022 Juhani 'nortti' Krekelä. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -145,7 +146,17 @@ __start: mov %ecx, %cr0 fninit - # Enable Streaming SIMD Extensions. + # Check for the presence of Streaming SIMD Extensions (SSE). + push %eax + push %ebx + mov $1, %eax + cpuid + pop %ebx + pop %eax + test $(1 << 25), %edx + jz 3f + + # Enable Streaming SIMD Extensions (SSE). mov %cr0, %ecx and $0xFFFB, %cx or $0x2, %cx @@ -157,6 +168,7 @@ __start: ldmxcsr (%esp) addl $4, %esp +3: # Store a copy of the initialial floating point registers. fxsave fpu_initialized_regs diff --git a/share/man/man7/installation.7 b/share/man/man7/installation.7 index 301323b6..9757cdab 100644 --- a/share/man/man7/installation.7 +++ b/share/man/man7/installation.7 @@ -27,7 +27,7 @@ A computer meeting the system requirements. .Ss System Requirements .Bl -bullet -compact .It -32-bit x86 CPU with SSE (i686 release), or 64-bit x86 CPU (x86_64 release). +32-bit x86 CPU (i686 release) or 64-bit x86 CPU (x86_64 release). .It 1 GiB RAM (recommended) to run iso live environment (including installer) with all ports loaded, or significantly less if unimportant ports are not loaded. diff --git a/trianglix/Makefile b/trianglix/Makefile index 10e542e9..73eca0c1 100644 --- a/trianglix/Makefile +++ b/trianglix/Makefile @@ -7,7 +7,7 @@ include ../build-aux/dirs.mak OPTLEVEL?=-g -O2 CXXFLAGS?=$(OPTLEVEL) -CXXFLAGS:=$(CXXFLAGS) -std=gnu++11 -Wall -Wextra -fno-exceptions -fno-rtti -msse -msse2 +CXXFLAGS:=$(CXXFLAGS) -std=gnu++11 -Wall -Wextra -fno-exceptions -fno-rtti BINARY:=trianglix