aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/cpuid.h
Commit message (Collapse)AuthorAgeFilesLines
* Split up cpuid.cpp into arch-specific filesJack Lloyd2017-09-171-302/+0
| | | | | As more archs and detection methods are used, the file was getting a little hard to follow.
* Merge duplicated logic for clearing CPUID bitsJack Lloyd2017-09-161-0/+2
|
* Change how CPU endianness is detected.Jack Lloyd2017-08-031-12/+21
| | | | | | | | | | | | | This is kind of an artificial change to appease Coverity but maybe a bit cleaner in any case. The issue is Coverity detects the throw in the case of PDP endian being found at runtime, and assumes it might happen. And since OS::get_processor_timestamp calls CPUID on x86 (to check for RDTSC), it might throw. And so on up the call chain until it detect a throw escaping from ~Timer_Scope in speed.cpp, which would crash. However I do not have a PDP-endian x86 around to confirm this ... :)
* Resolve Doxygen error in cpuid.hJack Lloyd2017-02-111-1/+2
| | | | The macro has to be on its own line or Doxygen gets confused.
* Add support for NEON in SIMD_4x32Jack Lloyd2017-01-291-1/+10
| | | | Tested on qemu-aarch64
* Add CPUID::to_stringJack Lloyd2017-01-221-1/+16
| | | | | | | | | Deprecates CPUID::print, mainly to avoid use of ostream in utils. Main reasoning is some platforms do not have streams at all. If all uses of streams are for operator<< and operator>> overloads, these can be guarded by a future BOTAN_HAS_CPP_STREAMS system-feature flag. But when ostreams are required to use the API (as here), that is not possible.
* Refactor CPUID implementation, add ARM supportJack Lloyd2017-01-171-31/+94
| | | | | | Tested for ARM only under qemu-aarch64, need to check hardware before merging. Changes x86 CPUID bitmasks which does break ABI for 2.1, no API implications.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-1/+1
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Add CPUID::is_little_endianJack Lloyd2016-11-071-0/+10
| | | | | Having a runtime endian test to verify against the build setting is useful.
* Fix Clang warningsJack Lloyd2016-10-091-2/+0
|
* Add cpuid overload to test frameworkJack Lloyd2016-09-151-46/+68
|
* Improve side channel attack resistance of table based AES implJack Lloyd2015-11-291-2/+17
|
* Move check for SIMD instructions to CPUIDJack Lloyd2015-09-211-0/+2
| | | | | | Avoids needing to include simd_32 to see if SIMD is disabled. This had caused a build break on Linux x86-32 as SSE2 must be enabled on a per-file basis.
* Convert PK operations to using Algo_Registry instead of Engine.lloyd2015-02-031-6/+6
| | | | Remove global PRNG.
* Add a runtime map of string->func() which when called returnlloyd2015-01-281-6/+9
| | | | | | | | | | | | | | | | | Transforms and BlockCiphers. Registration for all types is done at startup but is very cheap as just a std::function and a std::map entry are created, no actual objects are created until needed. This is a huge improvement over Algorithm_Factory which used T::clone() as the function and thus kept a prototype object of each type in memory. Replace existing lookup mechanisms for ciphers, AEADs, and compression to use the transform lookup. The existing Engine framework remains in place for BlockCipher, but the engines now just call to the registry instead of having hardcoded lookups. s/Transformation/Transform/ with typedefs for compatability. Remove lib/selftest code (for runtime selftesting): not the right approach.
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Move lib into srclloyd2014-01-101-0/+153