summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-02-22 10:54:23 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-03-14 01:19:44 +0000
commite4502a37af2b6a895aa187514673ee33436b66d8 (patch)
treed75a00502ad0011bae5c18a74a93bb730a57cf86
parent434f73992164dffff02bddb783dce9b19b3941dd (diff)
downloadchrome-ec-e4502a37af2b6a895aa187514673ee33436b66d8.tar.gz
cr50: use single __packed definition
Various parts of Cr50 code and Cr50 related utilities duplicate definition of __packed available in include/common.h. Let's use the same definition everywhere. BRANCH=cr50, cr50-mp BUG=none TEST=make buildall succeeds verified that linker generated map files for Cr50 RW are the same before and after this change. built and used gsctoo and rma_reset Change-Id: Ib91f9bbad1f6822b347f32b393630f592df80d60 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/931929 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 58759f5fbb21edaafab8fe212980a8cae692e686) Reviewed-on: https://chromium-review.googlesource.com/949071
-rw-r--r--chip/g/upgrade_fw.h1
-rw-r--r--extra/rma_reset/rma_reset.c2
-rw-r--r--extra/usb_updater/gsctool.c5
-rw-r--r--include/rma_auth.h2
-rw-r--r--include/tpm_vendor_cmds.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/chip/g/upgrade_fw.h b/chip/g/upgrade_fw.h
index 1c5dc7290a..d3414b103e 100644
--- a/chip/g/upgrade_fw.h
+++ b/chip/g/upgrade_fw.h
@@ -8,6 +8,7 @@
#include <stddef.h>
+#include "common.h" /* For __packed. */
/*
* This file contains structures used to facilitate cr50 firmware updates,
diff --git a/extra/rma_reset/rma_reset.c b/extra/rma_reset/rma_reset.c
index 17a2539c41..efbb1b8850 100644
--- a/extra/rma_reset/rma_reset.c
+++ b/extra/rma_reset/rma_reset.c
@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#define __packed __attribute__((packed))
+
#include "rma_auth.h"
#include "curve25519.h"
#include "sha256.h"
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index 41ee9b0779..e05068d249 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -20,11 +20,6 @@
#include <termios.h>
#include <unistd.h>
-
-#ifndef __packed
-#define __packed __attribute__((packed))
-#endif
-
#include "config.h"
#include "ccd_config.h"
diff --git a/include/rma_auth.h b/include/rma_auth.h
index 088e8b6467..427e5c90de 100644
--- a/include/rma_auth.h
+++ b/include/rma_auth.h
@@ -10,6 +10,8 @@
#include <stdint.h>
+#include "common.h" /* For __packed. */
+
/* Current challenge protocol version */
#define RMA_CHALLENGE_VERSION 0
diff --git a/include/tpm_vendor_cmds.h b/include/tpm_vendor_cmds.h
index 927a39817b..b5d20c7200 100644
--- a/include/tpm_vendor_cmds.h
+++ b/include/tpm_vendor_cmds.h
@@ -6,6 +6,8 @@
#ifndef __INCLUDE_TPM_VENDOR_CMDS_H
#define __INCLUDE_TPM_VENDOR_CMDS_H
+#include "common.h" /* For __packed. */
+
/*
* This file includes definitions of extended/vendor TPM2 commands and their
* return codes. The definitions are shared between the embedded code and the