diff options
author | Gabe Black <gabeblack@chromium.org> | 2013-03-16 04:03:40 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-19 16:55:44 -0700 |
commit | ac8805e7e9bd40c03baf44e37b26f28d9b763ab5 (patch) | |
tree | 9297d954f0fc50bb9de01fb9672ddaea076e2f01 /firmware/include | |
parent | 77f55ca1cd282ac6c540ea3a8bacbc35c2600d60 (diff) | |
download | vboot-ac8805e7e9bd40c03baf44e37b26f28d9b763ab5.tar.gz |
Get rid of some crufty macros.
These were macros that were never used, or that were only set to one thing and
could be substituted up front.
I left in code guarded by the HAVE_ENDIAN_H and HAVE_LITTLE_ENDIAN macros even
though those are never defined because they guard a reportedly significantly
faster implementation of some functionality, at least according to a comment
in the source. It would be a good idea to enable that code path and see if it
really does make a big difference before removing it entirely.
BUG=None
TEST=Built for Link, Daisy, and the host with FEATURES=test. Built depthcharge
for Link and booted in normal mode.
BRANCH=None
Change-Id: I934a4dd0da169ac018ba07350d56924ab88b1acc
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/45687
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/bmpblk_header.h | 4 | ||||
-rw-r--r-- | firmware/include/load_kernel_fw.h | 4 | ||||
-rw-r--r-- | firmware/include/sysincludes.h | 16 | ||||
-rw-r--r-- | firmware/include/utility.h | 17 | ||||
-rw-r--r-- | firmware/include/vboot_struct.h | 12 |
5 files changed, 6 insertions, 47 deletions
diff --git a/firmware/include/bmpblk_header.h b/firmware/include/bmpblk_header.h index 5957c31c..1b04bf70 100644 --- a/firmware/include/bmpblk_header.h +++ b/firmware/include/bmpblk_header.h @@ -47,8 +47,6 @@ #include "sysincludes.h" -__pragma(pack(push, 1)) /* Support packing for MSVC. */ - #define BMPBLOCK_SIGNATURE "$BMP" #define BMPBLOCK_SIGNATURE_SIZE (4) @@ -149,6 +147,4 @@ typedef enum Compression { #define RENDER_HWID "$HWID" #define RENDER_HWID_RTOL "$HWID.rtol" -__pragma(pack(pop)) /* Support packing for MSVC. */ - #endif /* VBOOT_REFERENCE_BMPBLK_HEADER_H_ */ diff --git a/firmware/include/load_kernel_fw.h b/firmware/include/load_kernel_fw.h index 7e8d6960..7439e57c 100644 --- a/firmware/include/load_kernel_fw.h +++ b/firmware/include/load_kernel_fw.h @@ -17,9 +17,9 @@ /* Boot flags for LoadKernel().boot_flags */ /* Developer switch is on */ -#define BOOT_FLAG_DEVELOPER UINT64_C(0x01) +#define BOOT_FLAG_DEVELOPER (0x01ULL) /* In recovery mode */ -#define BOOT_FLAG_RECOVERY UINT64_C(0x02) +#define BOOT_FLAG_RECOVERY (0x02ULL) typedef struct LoadKernelParams { /* Inputs to LoadKernel() */ diff --git a/firmware/include/sysincludes.h b/firmware/include/sysincludes.h index 34aebdab..490b51cc 100644 --- a/firmware/include/sysincludes.h +++ b/firmware/include/sysincludes.h @@ -25,20 +25,4 @@ #include <memory.h> #endif -#define POSSIBLY_UNUSED __attribute__((unused)) - -#ifdef __STRICT_ANSI__ -#define INLINE -#else -#define INLINE inline -#endif - -#ifndef _MSC_VER -#define __pragma(...) -#endif - -/* 64-bit operations, for platforms where they need to be function calls */ -#define UINT64_RSHIFT(v, shiftby) (((uint64_t)(v)) >> (shiftby)) -#define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby))) - #endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */ diff --git a/firmware/include/utility.h b/firmware/include/utility.h index 8fe82772..f6575ed5 100644 --- a/firmware/include/utility.h +++ b/firmware/include/utility.h @@ -20,23 +20,6 @@ #define VBDEBUG(params) #endif -#ifndef VBOOT_PERFORMANCE -/* - * Define performance macros as nothing. If you enable VBOOT_PERFORMANCE, - * you must define these macros in your platform's biosincludes.h. - * - * Intended usage for using a performance counter called 'foo': - * - * VBPERFSTART("foo") - * ...code to be tested... - * VBPERFEND("foo") - * - * Names should be <= 8 characters to be compatible with all platforms. - */ -#define VBPERFSTART(name) -#define VBPERFEND(name) -#endif - #ifdef VBOOT_DEBUG #define VbAssert(expr) do { if (!(expr)) { \ VbExError("assert fail: %s at %s:%d\n", \ diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h index 8023cdc9..ee912a30 100644 --- a/firmware/include/vboot_struct.h +++ b/firmware/include/vboot_struct.h @@ -11,8 +11,6 @@ #include "sysincludes.h" -__pragma(pack(push, 1)) /* Support packing for MSVC. */ - /* Public key data */ typedef struct VbPublicKey { /* Offset of key data from start of this struct */ @@ -47,10 +45,10 @@ typedef struct VbSignature { /* Flags for key_block_flags */ /* The following flags set where the key is valid */ -#define KEY_BLOCK_FLAG_DEVELOPER_0 UINT64_C(0x01) /* Developer switch off */ -#define KEY_BLOCK_FLAG_DEVELOPER_1 UINT64_C(0x02) /* Developer switch on */ -#define KEY_BLOCK_FLAG_RECOVERY_0 UINT64_C(0x04) /* Not recovery mode */ -#define KEY_BLOCK_FLAG_RECOVERY_1 UINT64_C(0x08) /* Recovery mode */ +#define KEY_BLOCK_FLAG_DEVELOPER_0 (0x01ULL) /* Developer switch off */ +#define KEY_BLOCK_FLAG_DEVELOPER_1 (0x02ULL) /* Developer switch on */ +#define KEY_BLOCK_FLAG_RECOVERY_0 (0x04ULL) /* Not recovery mode */ +#define KEY_BLOCK_FLAG_RECOVERY_1 (0x08ULL) /* Recovery mode */ /* * Key block, containing the public key used to sign some other chunk of data. @@ -505,6 +503,4 @@ typedef struct VbSharedDataHeader { #define VB_SHARED_DATA_VERSION 2 /* Version for struct_version */ -__pragma(pack(pop)) /* Support packing for MSVC. */ - #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ |