summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2018-08-02 16:21:17 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-08-03 01:31:21 -0700
commit9ad8a41b8cedef9ac1f0513992ce6958eb86c257 (patch)
tree2a1fe0e028829dc579840dce386047ce661ac6d3 /firmware/include
parentc239374ac3e1af342c10f4f3244bc98d76c2413a (diff)
downloadvboot-9ad8a41b8cedef9ac1f0513992ce6958eb86c257.tar.gz
vboot: bulk fix tabs and spacing inconsistency
Problem files were found with: find . -name '*.c' -o -name '*.h' | xargs grep '^ [^*]' and edited manually. Ignores utility/ and cgpt/, since they seem to globally adhere to a two-space tab convention. BUG=None TEST=make clean runtests TEST=emerge vboot_reference depthcharge Change-Id: I5a678484a119c8f1911f717e1968bdb4f1a0810f Reviewed-on: https://chromium-review.googlesource.com/1160131 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/bmpblk_header.h2
-rw-r--r--firmware/include/tlcl.h28
-rw-r--r--firmware/include/tpm1_tss_constants.h70
-rw-r--r--firmware/include/vboot_api.h12
4 files changed, 56 insertions, 56 deletions
diff --git a/firmware/include/bmpblk_header.h b/firmware/include/bmpblk_header.h
index bdc118a0..a010f071 100644
--- a/firmware/include/bmpblk_header.h
+++ b/firmware/include/bmpblk_header.h
@@ -112,7 +112,7 @@ typedef struct ImageInfo {
*/
uint32_t compressed_size;
uint32_t reserved;
- /* NOTE: The actual image content (if any) follows immediately. */
+ /* NOTE: The actual image content (if any) follows immediately. */
} __attribute__((packed)) ImageInfo;
/* Constants for ImageInfo.tag */
diff --git a/firmware/include/tlcl.h b/firmware/include/tlcl.h
index 28508c3f..1e1e401d 100644
--- a/firmware/include/tlcl.h
+++ b/firmware/include/tlcl.h
@@ -38,7 +38,7 @@ uint32_t TlclLibClose(void);
* Perform a raw TPM request/response transaction.
*/
uint32_t TlclSendReceive(const uint8_t *request, uint8_t *response,
- int max_length);
+ int max_length);
/**
* Return the size of a TPM request or response packet.
@@ -91,8 +91,8 @@ uint32_t TlclDefineSpace(uint32_t index, uint32_t perm, uint32_t size);
* passed via [auth_policy]. The TPM error code is returned.
*/
uint32_t TlclDefineSpaceEx(const uint8_t* owner_auth, uint32_t owner_auth_size,
- uint32_t index, uint32_t perm, uint32_t size,
- const void* auth_policy, uint32_t auth_policy_size);
+ uint32_t index, uint32_t perm, uint32_t size,
+ const void* auth_policy, uint32_t auth_policy_size);
/**
* Initializes [auth_policy] to require PCR binding of the given
@@ -104,8 +104,8 @@ uint32_t TlclDefineSpaceEx(const uint8_t* owner_auth, uint32_t owner_auth_size,
* return, also for the case of insufficient buffer size.
*/
uint32_t TlclInitNvAuthPolicy(uint32_t pcr_selection_bitmap,
- const uint8_t pcr_values[][TPM_PCR_DIGEST],
- void* auth_policy, uint32_t* auth_policy_size);
+ const uint8_t pcr_values[][TPM_PCR_DIGEST],
+ void* auth_policy, uint32_t* auth_policy_size);
/**
* Write [length] bytes of [data] to space at [index]. The TPM error code is
@@ -194,7 +194,7 @@ uint32_t TlclSetDeactivated(uint8_t flag);
* be NULL. The TPM error code is returned.
*/
uint32_t TlclGetFlags(uint8_t *disable, uint8_t *deactivated,
- uint8_t *nvlocked);
+ uint8_t *nvlocked);
/**
* Set the bGlobalLock flag, which only a reboot can clear. The TPM error
@@ -221,7 +221,7 @@ uint32_t TlclGetPermissions(uint32_t index, uint32_t *permissions);
* sufficient, the return value will be TPM_E_BUFFER_SIZE.
*/
uint32_t TlclGetSpaceInfo(uint32_t index, uint32_t *attributes, uint32_t *size,
- void* auth_policy, uint32_t* auth_policy_size);
+ void* auth_policy, uint32_t* auth_policy_size);
/**
* Get the entire set of permanent flags.
@@ -255,8 +255,8 @@ uint32_t TlclGetRandom(uint8_t *data, uint32_t length, uint32_t *size);
* *vendor_specific_buf_size to the length of the filled data.
*/
uint32_t TlclGetVersion(uint32_t* vendor, uint64_t* firmware_version,
- uint8_t* vendor_specific_buf,
- size_t* vendor_specific_buf_size);
+ uint8_t* vendor_specific_buf,
+ size_t* vendor_specific_buf_size);
/**
* Issues the IFX specific FieldUpgradeInfoRequest2 TPM_FieldUpgrade subcommand
@@ -271,8 +271,8 @@ uint32_t TlclIFXFieldUpgradeInfo(TPM_IFX_FIELDUPGRADEINFO *info);
* Read the public half of the EK.
*/
uint32_t TlclReadPubek(uint32_t* public_exponent,
- uint8_t* modulus,
- uint32_t* modulus_size);
+ uint8_t* modulus,
+ uint32_t* modulus_size);
/**
* Takes ownership of the TPM. [enc_owner_auth] and [enc_srk_auth] are the owner
@@ -280,8 +280,8 @@ uint32_t TlclReadPubek(uint32_t* public_exponent,
* text [owner_auth] needs to be passed as well for command auth.
*/
uint32_t TlclTakeOwnership(uint8_t enc_owner_auth[TPM_RSA_2048_LEN],
- uint8_t enc_srk_auth[TPM_RSA_2048_LEN],
- uint8_t owner_auth[TPM_AUTH_DATA_LEN]);
+ uint8_t enc_srk_auth[TPM_RSA_2048_LEN],
+ uint8_t owner_auth[TPM_AUTH_DATA_LEN]);
/**
* Create a delegation family with the specified [family_label].
@@ -294,7 +294,7 @@ uint32_t TlclCreateDelegationFamily(uint8_t family_label);
* updated to indicate actual number of table entries available.
*/
uint32_t TlclReadDelegationFamilyTable(TPM_FAMILY_TABLE_ENTRY *table,
- uint32_t* table_size);
+ uint32_t* table_size);
#endif /* TPM2_MODE */
#endif /* CHROMEOS_ENVIRONMENT */
diff --git a/firmware/include/tpm1_tss_constants.h b/firmware/include/tpm1_tss_constants.h
index 3deef34e..54642ba6 100644
--- a/firmware/include/tpm1_tss_constants.h
+++ b/firmware/include/tpm1_tss_constants.h
@@ -96,7 +96,7 @@ typedef uint32_t TPM_FAMILY_FLAGS;
#define TPM_LOC_ZERO (((uint32_t)1)<<0)
#define TPM_ALL_LOCALITIES (TPM_LOC_ZERO | TPM_LOC_ONE | TPM_LOC_TWO \
- | TPM_LOC_THREE | TPM_LOC_FOUR) /* 0x1f */
+ | TPM_LOC_THREE | TPM_LOC_FOUR) /* 0x1f */
#define TPM_PHYSICAL_PRESENCE_LOCK ((uint16_t) 0x0004)
#define TPM_PHYSICAL_PRESENCE_PRESENT ((uint16_t) 0x0008)
@@ -116,28 +116,28 @@ typedef uint32_t TPM_FAMILY_FLAGS;
typedef struct tdTPM_DIGEST
{
- uint8_t digest[TPM_SHA1_160_HASH_LEN];
+ uint8_t digest[TPM_SHA1_160_HASH_LEN];
} TPM_DIGEST;
typedef TPM_DIGEST TPM_COMPOSITE_HASH;
typedef struct tdTPM_PCR_SELECTION
{
- uint16_t sizeOfSelect;
- uint8_t pcrSelect[3];
+ uint16_t sizeOfSelect;
+ uint8_t pcrSelect[3];
} __attribute__((packed)) TPM_PCR_SELECTION;
typedef struct tdTPM_NV_ATTRIBUTES
{
- TPM_STRUCTURE_TAG tag;
- TPM_NV_PER_ATTRIBUTES attributes;
+ TPM_STRUCTURE_TAG tag;
+ TPM_NV_PER_ATTRIBUTES attributes;
} __attribute__((packed)) TPM_NV_ATTRIBUTES;
typedef struct tdTPM_PCR_INFO_SHORT
{
- TPM_PCR_SELECTION pcrSelection;
- TPM_LOCALITY_SELECTION localityAtRelease;
- TPM_COMPOSITE_HASH digestAtRelease;
+ TPM_PCR_SELECTION pcrSelection;
+ TPM_LOCALITY_SELECTION localityAtRelease;
+ TPM_COMPOSITE_HASH digestAtRelease;
} __attribute__((packed)) TPM_PCR_INFO_SHORT;
typedef struct tdTPM_PERMANENT_FLAGS
@@ -176,51 +176,51 @@ typedef struct tdTPM_STCLEAR_FLAGS{
typedef struct tdTPM_NV_DATA_PUBLIC
{
- TPM_STRUCTURE_TAG tag;
- TPM_NV_INDEX nvIndex;
- TPM_PCR_INFO_SHORT pcrInfoRead;
- TPM_PCR_INFO_SHORT pcrInfoWrite;
- TPM_NV_ATTRIBUTES permission;
- TPM_BOOL bReadSTClear;
- TPM_BOOL bWriteSTClear;
- TPM_BOOL bWriteDefine;
- uint32_t dataSize;
+ TPM_STRUCTURE_TAG tag;
+ TPM_NV_INDEX nvIndex;
+ TPM_PCR_INFO_SHORT pcrInfoRead;
+ TPM_PCR_INFO_SHORT pcrInfoWrite;
+ TPM_NV_ATTRIBUTES permission;
+ TPM_BOOL bReadSTClear;
+ TPM_BOOL bWriteSTClear;
+ TPM_BOOL bWriteDefine;
+ uint32_t dataSize;
} TPM_NV_DATA_PUBLIC;
typedef struct tdTPM_NONCE
{
- uint8_t nonce[TPM_SHA1BASED_NONCE_LEN];
+ uint8_t nonce[TPM_SHA1BASED_NONCE_LEN];
} TPM_NONCE;
typedef struct tdTPM_FAMILY_TABLE_ENTRY
{
- TPM_STRUCTURE_TAG tag;
- TPM_FAMILY_LABEL familyLabel;
- TPM_FAMILY_ID familyID;
- TPM_FAMILY_VERIFICATION verificationCount;
- TPM_FAMILY_FLAGS flags;
+ TPM_STRUCTURE_TAG tag;
+ TPM_FAMILY_LABEL familyLabel;
+ TPM_FAMILY_ID familyID;
+ TPM_FAMILY_VERIFICATION verificationCount;
+ TPM_FAMILY_FLAGS flags;
} TPM_FAMILY_TABLE_ENTRY;
typedef struct tdTPM_IFX_FIRMWAREPACKAGE {
- uint32_t FwPackageIdentifier;
- uint32_t Version;
- uint32_t StaleVersion;
+ uint32_t FwPackageIdentifier;
+ uint32_t Version;
+ uint32_t StaleVersion;
} TPM_IFX_FIRMWAREPACKAGE;
typedef struct tdTPM_IFX_FIELDUPGRADEINFO
{
- uint16_t wMaxDataSize;
- TPM_IFX_FIRMWAREPACKAGE sBootloaderFirmwarePackage;
- TPM_IFX_FIRMWAREPACKAGE sFirmwarePackages[2];
- uint16_t wSecurityModuleStatus;
- TPM_IFX_FIRMWAREPACKAGE sProcessFirmwarePackage;
- uint16_t wFieldUpgradeCounter;
+ uint16_t wMaxDataSize;
+ TPM_IFX_FIRMWAREPACKAGE sBootloaderFirmwarePackage;
+ TPM_IFX_FIRMWAREPACKAGE sFirmwarePackages[2];
+ uint16_t wSecurityModuleStatus;
+ TPM_IFX_FIRMWAREPACKAGE sProcessFirmwarePackage;
+ uint16_t wFieldUpgradeCounter;
} TPM_IFX_FIELDUPGRADEINFO;
typedef struct tdTPM_NV_AUTH_POLICY
{
- TPM_PCR_INFO_SHORT pcr_info_read;
- TPM_PCR_INFO_SHORT pcr_info_write;
+ TPM_PCR_INFO_SHORT pcr_info_read;
+ TPM_PCR_INFO_SHORT pcr_info_write;
} TPM_NV_AUTH_POLICY;
#define TPM_IFX_FieldUpgradeInfoRequest2 ((uint8_t) 0x11)
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index aa408cd1..73e2706d 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -306,7 +306,7 @@ typedef struct VbSelectAndLoadKernelParams {
* Returns VBERROR_SUCCESS if success, non-zero if error; on error, caller
* should reboot. */
VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
- VbSelectAndLoadKernelParams *kparams);
+ VbSelectAndLoadKernelParams *kparams);
/**
* Verify Kernel Image loaded in memory.
@@ -419,7 +419,7 @@ VbError_t VbExTpmOpen(void);
* exit, response_length is set to the actual received response length in
* bytes. */
VbError_t VbExTpmSendReceive(const uint8_t *request, uint32_t request_length,
- uint8_t *response, uint32_t *response_length);
+ uint8_t *response, uint32_t *response_length);
#ifdef CHROMEOS_ENVIRONMENT
@@ -538,7 +538,7 @@ typedef struct VbDiskInfo {
* VbExDiskFreeInfo() is called.
*/
VbError_t VbExDiskGetInfo(VbDiskInfo **infos_ptr, uint32_t *count,
- uint32_t disk_flags);
+ uint32_t disk_flags);
/**
* Free a disk information list [infos] previously returned by
@@ -547,7 +547,7 @@ VbError_t VbExDiskGetInfo(VbDiskInfo **infos_ptr, uint32_t *count,
* list need not remain valid after this call.
*/
VbError_t VbExDiskFreeInfo(VbDiskInfo *infos,
- VbExDiskHandle_t preserve_handle);
+ VbExDiskHandle_t preserve_handle);
/**
* Read lba_count LBA sectors, starting at sector lba_start, from the disk,
@@ -561,7 +561,7 @@ VbError_t VbExDiskFreeInfo(VbDiskInfo *infos,
* crash.
*/
VbError_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start,
- uint64_t lba_count, void *buffer);
+ uint64_t lba_count, void *buffer);
/**
* Write lba_count LBA sectors, starting at sector lba_start, to the disk, from
@@ -575,7 +575,7 @@ VbError_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start,
* crash.
*/
VbError_t VbExDiskWrite(VbExDiskHandle_t handle, uint64_t lba_start,
- uint64_t lba_count, const void *buffer);
+ uint64_t lba_count, const void *buffer);
/* Streaming read interface */
typedef void *VbExStream_t;