summaryrefslogtreecommitdiff
path: root/firmware/lib
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib')
-rw-r--r--firmware/lib/cgptlib/include/cgptlib_internal.h2
-rw-r--r--firmware/lib/cgptlib/include/crc32.h7
-rw-r--r--firmware/lib/include/utility.h4
-rw-r--r--firmware/lib/include/vboot_audio.h3
-rw-r--r--firmware/lib/include/vboot_display.h3
-rw-r--r--firmware/lib/include/vboot_ui_menu_private.h2
-rw-r--r--firmware/lib/rollback_index.c2
-rw-r--r--firmware/lib/tpm2_lite/marshaling.c3
-rw-r--r--firmware/lib/tpm2_lite/tlcl.c8
-rw-r--r--firmware/lib/tpm_lite/include/tlcl_internal.h6
-rw-r--r--firmware/lib/tpm_lite/include/tpm_error_messages.h11
-rw-r--r--firmware/lib/vboot_api_kernel.c2
-rw-r--r--firmware/lib/vboot_kernel.c2
-rw-r--r--firmware/lib/vboot_ui.c4
-rw-r--r--firmware/lib/vboot_ui_common.c3
-rw-r--r--firmware/lib/vboot_ui_menu.c2
16 files changed, 29 insertions, 35 deletions
diff --git a/firmware/lib/cgptlib/include/cgptlib_internal.h b/firmware/lib/cgptlib/include/cgptlib_internal.h
index b9331b93..d58a35f6 100644
--- a/firmware/lib/cgptlib/include/cgptlib_internal.h
+++ b/firmware/lib/cgptlib/include/cgptlib_internal.h
@@ -166,4 +166,4 @@ const char *GptErrorText(int error_code);
*/
size_t CalculateEntriesSectors(GptHeader* h, uint32_t sector_bytes);
-#endif /* VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ */
+#endif /* VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ */
diff --git a/firmware/lib/cgptlib/include/crc32.h b/firmware/lib/cgptlib/include/crc32.h
index e2825ced..1f3e2a3d 100644
--- a/firmware/lib/cgptlib/include/crc32.h
+++ b/firmware/lib/cgptlib/include/crc32.h
@@ -2,11 +2,12 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef VBOOT_REFERENCE_GPT_CRC32_H_
-#define VBOOT_REFERENCE_GPT_CRC32_H_
+
+#ifndef VBOOT_REFERENCE_CRC32_H_
+#define VBOOT_REFERENCE_CRC32_H_
#include "2sysincludes.h"
uint32_t Crc32(const void *buffer, uint32_t len);
-#endif /* VBOOT_REFERENCE_GPT_CRC32_H_ */
+#endif /* VBOOT_REFERENCE_CRC32_H_ */
diff --git a/firmware/lib/include/utility.h b/firmware/lib/include/utility.h
index 879950b1..cf39f16a 100644
--- a/firmware/lib/include/utility.h
+++ b/firmware/lib/include/utility.h
@@ -1,9 +1,7 @@
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
- */
-
-/*
+ *
* Helper functions/wrappers for memory allocations, manipulation and
* comparison.
*/
diff --git a/firmware/lib/include/vboot_audio.h b/firmware/lib/include/vboot_audio.h
index 05f22f92..64cf0a78 100644
--- a/firmware/lib/include/vboot_audio.h
+++ b/firmware/lib/include/vboot_audio.h
@@ -20,5 +20,4 @@ void vb2_audio_start(struct vb2_context *ctx);
*/
int vb2_audio_looping(void);
-#endif /* VBOOT_REFERENCE_VBOOT_AUDIO_H_ */
-
+#endif /* VBOOT_REFERENCE_VBOOT_AUDIO_H_ */
diff --git a/firmware/lib/include/vboot_display.h b/firmware/lib/include/vboot_display.h
index 6dfaeaa9..8621d860 100644
--- a/firmware/lib/include/vboot_display.h
+++ b/firmware/lib/include/vboot_display.h
@@ -22,5 +22,4 @@ vb2_error_t VbCheckDisplayKey(struct vb2_context *ctx, uint32_t key,
*/
const char *RecoveryReasonString(uint8_t code);
-#endif /* VBOOT_REFERENCE_VBOOT_DISPLAY_H_ */
-
+#endif /* VBOOT_REFERENCE_VBOOT_DISPLAY_H_ */
diff --git a/firmware/lib/include/vboot_ui_menu_private.h b/firmware/lib/include/vboot_ui_menu_private.h
index b92fb5da..09688b48 100644
--- a/firmware/lib/include/vboot_ui_menu_private.h
+++ b/firmware/lib/include/vboot_ui_menu_private.h
@@ -90,4 +90,4 @@ typedef enum _VB_OPTIONS_MENU {
VB_OPTIONS_COUNT,
} VB_OPTIONS_MENU;
-#endif
+#endif /* VBOOT_REFERENCE_VBOOT_UI_MENU_PRIVATE_H_ */
diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c
index b4b49fab..c04a282d 100644
--- a/firmware/lib/rollback_index.c
+++ b/firmware/lib/rollback_index.c
@@ -31,7 +31,7 @@ uint32_t WriteSpaceKernel(RollbackSpaceKernel *rsk);
/*
* Compiling for unit test, so we need the real implementations of
* rollback functions. The unit test mocks the underlying tlcl
- * functions, so this is ok to run on the host.
+ * functions, so this is okay to run on the host.
*/
#undef CHROMEOS_ENVIRONMENT
#undef DISABLE_ROLLBACK_TPM
diff --git a/firmware/lib/tpm2_lite/marshaling.c b/firmware/lib/tpm2_lite/marshaling.c
index 1a3e84a2..fb1b8022 100644
--- a/firmware/lib/tpm2_lite/marshaling.c
+++ b/firmware/lib/tpm2_lite/marshaling.c
@@ -1,5 +1,4 @@
-/*
- * Copyright 2016 The Chromium OS Authors. All rights reserved.
+/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/firmware/lib/tpm2_lite/tlcl.c b/firmware/lib/tpm2_lite/tlcl.c
index 9e6bc49f..02d1a91b 100644
--- a/firmware/lib/tpm2_lite/tlcl.c
+++ b/firmware/lib/tpm2_lite/tlcl.c
@@ -1,5 +1,4 @@
-/*
- * Copyright 2016 The Chromium OS Authors. All rights reserved.
+/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -7,13 +6,12 @@
* in the firmware
*/
-#include "2sysincludes.h"
#include "2common.h"
-
#include "rollback_index.h"
+#include "2sysincludes.h"
+#include "tlcl.h"
#include "tpm2_marshaling.h"
#include "utility.h"
-#include "tlcl.h"
/* Global buffer for deserialized responses. */
struct tpm2_response tpm2_resp;
diff --git a/firmware/lib/tpm_lite/include/tlcl_internal.h b/firmware/lib/tpm_lite/include/tlcl_internal.h
index 28eff1d9..98903990 100644
--- a/firmware/lib/tpm_lite/include/tlcl_internal.h
+++ b/firmware/lib/tpm_lite/include/tlcl_internal.h
@@ -3,8 +3,8 @@
* found in the LICENSE file.
*/
-#ifndef TPM_LITE_TLCL_INTERNAL_H_
-#define TPM_LITE_TLCL_INTERNAL_H_
+#ifndef VBOOT_REFERENCE_TLCL_INTERNAL_H_
+#define VBOOT_REFERENCE_TLCL_INTERNAL_H_
/*
* These numbers derive from adding the sizes of command fields as shown in the
@@ -84,4 +84,4 @@ static inline uint16_t ReadTpmUint16(const uint8_t **buffer) {
return value;
}
-#endif /* TPM_LITE_TLCL_INTERNAL_H_ */
+#endif /* VBOOT_REFERENCE_TLCL_INTERNAL_H_ */
diff --git a/firmware/lib/tpm_lite/include/tpm_error_messages.h b/firmware/lib/tpm_lite/include/tpm_error_messages.h
index 834ba2d0..ad2692c4 100644
--- a/firmware/lib/tpm_lite/include/tpm_error_messages.h
+++ b/firmware/lib/tpm_lite/include/tpm_error_messages.h
@@ -1,16 +1,15 @@
/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
- */
-
-/* TPM error codes.
+ *
+ * TPM error codes.
*
* Copy-pasted and lightly edited from TCG TPM Main Part 2 TPM Structures
* Version 1.2 Level 2 Revision 103 26 October 2006 Draft.
*/
-#ifndef TPM_ERROR_MESSAGES_H
-#define TPM_ERROR_MESSAGES_H
+#ifndef VBOOT_REFERENCE_TPM_ERROR_MESSAGES_H_
+#define VBOOT_REFERENCE_TPM_ERROR_MESSAGES_H_
#define TPM_E_BASE 0x0
#define TPM_E_NON_FATAL 0x800
@@ -247,4 +246,4 @@ because the ordinal required resources that have not been tested" },
time-out period" },
};
-#endif /* TPM_ERROR_MESSAGES_H */
+#endif /* VBOOT_REFERENCE_TPM_ERROR_MESSAGES_H_ */
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index ae1df41e..621aa7fe 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -10,6 +10,8 @@
#include "2misc.h"
#include "2nvstorage.h"
#include "2rsa.h"
+#include "2secdata.h"
+#include "2sysincludes.h"
#include "ec_sync.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 0d1545c9..1d54ef6f 100644
--- a/firmware/lib/vboot_kernel.c
+++ b/firmware/lib/vboot_kernel.c
@@ -6,12 +6,12 @@
* (Firmware portion)
*/
-#include "2sysincludes.h"
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
#include "2rsa.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "cgptlib.h"
#include "cgptlib_internal.h"
#include "gpt_misc.h"
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index 88bbfb65..ee770ccd 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -531,9 +531,9 @@ static vb2_error_t vb2_developer_ui(struct vb2_context *ctx)
/* Check if the default is to boot using disk, usb, or legacy */
uint32_t default_boot = vb2_nv_get(ctx, VB2_NV_DEV_DEFAULT_BOOT);
- if(default_boot == VB2_DEV_DEFAULT_BOOT_USB)
+ if (default_boot == VB2_DEV_DEFAULT_BOOT_USB)
use_usb = 1;
- if(default_boot == VB2_DEV_DEFAULT_BOOT_LEGACY)
+ if (default_boot == VB2_DEV_DEFAULT_BOOT_LEGACY)
use_legacy = 1;
/* Handle GBB flag override */
diff --git a/firmware/lib/vboot_ui_common.c b/firmware/lib/vboot_ui_common.c
index 09c96071..4255deb0 100644
--- a/firmware/lib/vboot_ui_common.c
+++ b/firmware/lib/vboot_ui_common.c
@@ -5,10 +5,9 @@
* High-level firmware wrapper API - user interface for RW firmware
*/
-#include "2sysincludes.h"
#include "2common.h"
-
#include "rollback_index.h"
+#include "2sysincludes.h"
#include "vboot_api.h"
#include "vboot_kernel.h"
#include "vboot_ui_common.h"
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 3c202c28..1b1db811 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -5,11 +5,11 @@
* High-level firmware wrapper API - user interface for RW firmware
*/
-#include "2sysincludes.h"
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
#include "2rsa.h"
+#include "2sysincludes.h"
#include "ec_sync.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"