You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
990e3e81e6
Convert the line endings stored for all text files in the repository to LF. The majority previously used DOS-style CRLF line endings. Add a .gitattributes file to enforce this and treat certain extensions as never being text files. Update PatchCheck.py to insist on LF line endings rather than CRLF. However, its other checks fail on this commit due to lots of pre-existing complaints that it only notices because the line endings have changed. Silicon/QemuSocPkg/FspBin/Patches/0001-Build-QEMU-FSP-2.0-binaries.patch needs to be treated as binary since it contains a mixture of line endings. This change has implications depending on the client platform you are using the repository from: * Windows The usual configuration for Git on Windows means that text files will be checked out to the work tree with DOS-style CRLF line endings. If that's not the case then you can configure Git to do so for the entire machine with: git config --global core.autocrlf true or for just the repository with: git config core.autocrlf true Line endings will be normalised to LF when they are committed to the repository. If you commit a text file with only LF line endings then it will be converted to CRLF line endings in your work tree. * Linux, MacOS and other Unices The usual configuration for Git on such platforms is to check files out of the repository with LF line endings. This is probably the right thing for you. In the unlikely even that you are using Git on Unix but editing or compiling on Windows for some reason then you may need to tweak your configuration to force the use of CRLF line endings as described above. * General For more information see https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings . Fixes: https://github.com/slimbootloader/slimbootloader/issues/1400 Signed-off-by: Mike Crowe <mac@mcrowe.com>
188 lines
5.5 KiB
C
188 lines
5.5 KiB
C
/*******************************************************************************
|
|
* Copyright 2017-2020 Intel Corporation
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*******************************************************************************/
|
|
|
|
|
|
#ifndef __IPPBASE_H__
|
|
#define __IPPBASE_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if defined(__clang__)
|
|
#define __STDCALL __attribute__((stdcall))
|
|
#define __CDECL __attribute__((cdecl))
|
|
#define __INT64 long long
|
|
#define __UINT64 unsigned long long
|
|
#elif defined( _WIN32 ) || defined ( _WIN64 )
|
|
#define __STDCALL __stdcall
|
|
#define __CDECL __cdecl
|
|
#define __INT64 __int64
|
|
#define __UINT64 unsigned __int64
|
|
#else
|
|
#define __STDCALL
|
|
#define __CDECL
|
|
#define __INT64 long long
|
|
#define __UINT64 unsigned long long
|
|
#endif
|
|
|
|
|
|
#define IPP_PI ( 3.14159265358979323846 ) /* ANSI C does not support M_PI */
|
|
#define IPP_2PI ( 6.28318530717958647692 ) /* 2*pi */
|
|
#define IPP_PI2 ( 1.57079632679489661923 ) /* pi/2 */
|
|
#define IPP_PI4 ( 0.78539816339744830961 ) /* pi/4 */
|
|
#define IPP_PI180 ( 0.01745329251994329577 ) /* pi/180 */
|
|
#define IPP_RPI ( 0.31830988618379067154 ) /* 1/pi */
|
|
#define IPP_SQRT2 ( 1.41421356237309504880 ) /* sqrt(2) */
|
|
#define IPP_SQRT3 ( 1.73205080756887729353 ) /* sqrt(3) */
|
|
#define IPP_LN2 ( 0.69314718055994530942 ) /* ln(2) */
|
|
#define IPP_LN3 ( 1.09861228866810969139 ) /* ln(3) */
|
|
#define IPP_E ( 2.71828182845904523536 ) /* e */
|
|
#define IPP_RE ( 0.36787944117144232159 ) /* 1/e */
|
|
#define IPP_EPS23 ( 1.19209289e-07f )
|
|
#define IPP_EPS52 ( 2.2204460492503131e-016 )
|
|
|
|
#define IPP_MAX_8U ( 0xFF )
|
|
#define IPP_MAX_16U ( 0xFFFF )
|
|
#define IPP_MAX_32U ( 0xFFFFFFFF )
|
|
#define IPP_MIN_8U ( 0 )
|
|
#define IPP_MIN_16U ( 0 )
|
|
#define IPP_MIN_32U ( 0 )
|
|
#define IPP_MIN_8S (-128 )
|
|
#define IPP_MAX_8S ( 127 )
|
|
#define IPP_MIN_16S (-32768 )
|
|
#define IPP_MAX_16S ( 32767 )
|
|
#define IPP_MIN_32S (-2147483647 - 1 )
|
|
#define IPP_MAX_32S ( 2147483647 )
|
|
#define IPP_MIN_64U ( 0 )
|
|
|
|
#if defined( _WIN32 ) || defined ( _WIN64 )
|
|
#define IPP_MAX_64S ( 9223372036854775807i64 )
|
|
#define IPP_MIN_64S (-9223372036854775807i64 - 1 )
|
|
#define IPP_MAX_64U ( 0xffffffffffffffffL ) /* 18446744073709551615 */
|
|
#else
|
|
#define IPP_MAX_64S ( 9223372036854775807LL )
|
|
#define IPP_MIN_64S (-9223372036854775807LL - 1 )
|
|
#define IPP_MAX_64U ( 0xffffffffffffffffLL ) /* 18446744073709551615 */
|
|
#endif
|
|
|
|
#define IPP_MINABS_32F ( 1.175494351e-38f )
|
|
#define IPP_MAXABS_32F ( 3.402823466e+38f )
|
|
#define IPP_EPS_32F ( 1.192092890e-07f )
|
|
#define IPP_MINABS_64F ( 2.2250738585072014e-308 )
|
|
#define IPP_MAXABS_64F ( 1.7976931348623158e+308 )
|
|
#define IPP_EPS_64F ( 2.2204460492503131e-016 )
|
|
|
|
#define IPP_MAX( a, b ) ( ((a) > (b)) ? (a) : (b) )
|
|
#define IPP_MIN( a, b ) ( ((a) < (b)) ? (a) : (b) )
|
|
|
|
#define IPP_ABS( a ) ( ((a) < 0) ? (-(a)) : (a) )
|
|
|
|
typedef struct {
|
|
int major; /* e.g. 1 */
|
|
int minor; /* e.g. 2 */
|
|
int majorBuild; /* e.g. 3 */
|
|
int build; /* e.g. 10, always >= majorBuild */
|
|
char targetCpu[4]; /* corresponding to Intel(R) processor */
|
|
const char* Name; /* e.g. "ippsw7" */
|
|
const char* Version; /* e.g. "v1.2 Beta" */
|
|
const char* BuildDate; /* e.g. "Jul 20 99" */
|
|
} IppLibraryVersion;
|
|
|
|
typedef unsigned char Ipp8u;
|
|
typedef unsigned short Ipp16u;
|
|
typedef unsigned int Ipp32u;
|
|
typedef signed char Ipp8s;
|
|
typedef signed short Ipp16s;
|
|
typedef signed int Ipp32s;
|
|
typedef float Ipp32f;
|
|
typedef __INT64 Ipp64s;
|
|
typedef __UINT64 Ipp64u;
|
|
typedef double Ipp64f;
|
|
typedef Ipp16s Ipp16f;
|
|
|
|
typedef struct {
|
|
Ipp8s re;
|
|
Ipp8s im;
|
|
} Ipp8sc;
|
|
|
|
typedef struct {
|
|
Ipp16s re;
|
|
Ipp16s im;
|
|
} Ipp16sc;
|
|
|
|
typedef struct {
|
|
Ipp16u re;
|
|
Ipp16u im;
|
|
} Ipp16uc;
|
|
|
|
typedef struct {
|
|
Ipp32s re;
|
|
Ipp32s im;
|
|
} Ipp32sc;
|
|
|
|
typedef struct {
|
|
Ipp32f re;
|
|
Ipp32f im;
|
|
} Ipp32fc;
|
|
|
|
typedef struct {
|
|
Ipp64s re;
|
|
Ipp64s im;
|
|
} Ipp64sc;
|
|
|
|
typedef struct {
|
|
Ipp64f re;
|
|
Ipp64f im;
|
|
} Ipp64fc;
|
|
|
|
typedef enum {
|
|
ippUndef = -1,
|
|
ipp1u = 0,
|
|
ipp8u = 1,
|
|
ipp8uc = 2,
|
|
ipp8s = 3,
|
|
ipp8sc = 4,
|
|
ipp16u = 5,
|
|
ipp16uc = 6,
|
|
ipp16s = 7,
|
|
ipp16sc = 8,
|
|
ipp32u = 9,
|
|
ipp32uc = 10,
|
|
ipp32s = 11,
|
|
ipp32sc = 12,
|
|
ipp32f = 13,
|
|
ipp32fc = 14,
|
|
ipp64u = 15,
|
|
ipp64uc = 16,
|
|
ipp64s = 17,
|
|
ipp64sc = 18,
|
|
ipp64f = 19,
|
|
ipp64fc = 20
|
|
} IppDataType;
|
|
|
|
typedef enum {
|
|
ippFalse = 0,
|
|
ippTrue = 1
|
|
} IppBool;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __IPPBASE_H__ */
|
|
|