summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-05-07 12:59:47 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-14 20:13:04 -0700
commit52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40 (patch)
treea4894fe06a3f1c9fcbbfe728955f75a8de59ed93 /firmware/include
parent88a47ff99952bb4f270a4e80c80c578e39fb9477 (diff)
downloadvboot-52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40.tar.gz
Makefile: Enable more warnings for host utilities / tests
This patch adds a bunch of more warnings that are already enabled in coreboot and thus already enabled for firmware builds anyway (because coreboot just passes its CFLAGS through). Enabling it in the vboot Makefile means they also apply to host utilities and tests, which sounds desirable for consistency. Fix enough of the cruft and bad coding practices that accumulated over the years of not having warnings enabled to get it to build again (this includes making functions static, removing dead code, cleaning up prototypes, etc.). Also remove -fno-strict-aliasing from the x86 firmware build options, because it's not clear why it's there (coreboot isn't doing this, so presumably it's not needed). BRANCH=None BUG=None TEST=make runtests Change-Id: Ie4a42083c4770a4eca133b22725be9ba85b24184 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1598721 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/vboot_test.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/firmware/include/vboot_test.h b/firmware/include/vboot_test.h
new file mode 100644
index 00000000..b8e59a22
--- /dev/null
+++ b/firmware/include/vboot_test.h
@@ -0,0 +1,33 @@
+/* Copyright 2019 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.
+ *
+ */
+
+#ifndef VBOOT_REFERENCE_TEST_API_H_
+#define VBOOT_REFERENCE_TEST_API_H_
+
+/* This header is for APIs that are only used by test code. */
+
+/*
+ * Internal functions from 2rsa.c that have error conditions we can't trigger
+ * from the public APIs. These include checks for bad algorithms where the
+ * next call level up already checks for bad algorithms, etc.
+ *
+ * These functions aren't in 2rsa.h because they're not part of the public
+ * APIs.
+ */
+struct vb2_public_key;
+int vb2_mont_ge(const struct vb2_public_key *key, uint32_t *a);
+int vb2_check_padding(const uint8_t *sig, const struct vb2_public_key *key);
+
+enum VbEcBootMode_t;
+enum VbEcBootMode_t VbGetMode(void);
+
+struct RollbackSpaceFwmp;
+struct RollbackSpaceFwmp *VbApiKernelGetFwmp(void);
+
+struct LoadKernelParams;
+struct LoadKernelParams *VbApiKernelGetParams(void);
+
+#endif /* VBOOT_REFERENCE_TEST_API_H_ */