summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 02:20:27 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-07-13 19:45:59 +0000
commit6a00113de8b9060a7227bcfa79b3786e3e592a33 (patch)
tree467f5653272ed2d16f6d8033ed8cd0e7391fb426 /src/vendorcode
parent9f244a5494192707bfbb72e60f17411e9a35434a (diff)
downloadcoreboot-6a00113de8b9060a7227bcfa79b3786e3e592a33.tar.xz
Rename __attribute__((packed)) --> __packed
Also unify __attribute__ ((..)) to __attribute__((..)) and handle ((__packed__)) like ((packed)) Change-Id: Ie60a51c3fa92b5009724a5b7c2932e361bf3490c Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/15921 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/amd/include/Porting.h10
-rw-r--r--src/vendorcode/amd/include/gcc-intrin.h4
-rw-r--r--src/vendorcode/google/chromeos/gnvs.h4
-rw-r--r--src/vendorcode/google/chromeos/vpd_tables.h15
4 files changed, 18 insertions, 15 deletions
diff --git a/src/vendorcode/amd/include/Porting.h b/src/vendorcode/amd/include/Porting.h
index ee0f074d3a..ed1a9c707e 100644
--- a/src/vendorcode/amd/include/Porting.h
+++ b/src/vendorcode/amd/include/Porting.h
@@ -243,11 +243,11 @@
#define CONST const
#define ROMDATA
#define CALLCONV
- #define _16BYTE_ALIGN __attribute__ ((aligned (16)))
- #define _8BYTE_ALIGN __attribute__ ((aligned (8)))
- #define _4BYTE_ALIGN __attribute__ ((aligned (4)))
- #define _2BYTE_ALIGN __attribute__ ((aligned (2)))
- #define _1BYTE_ALIGN __attribute__ ((aligned (1)))
+ #define _16BYTE_ALIGN __attribute__((aligned (16)))
+ #define _8BYTE_ALIGN __attribute__((aligned (8)))
+ #define _4BYTE_ALIGN __attribute__((aligned (4)))
+ #define _2BYTE_ALIGN __attribute__((aligned (2)))
+ #define _1BYTE_ALIGN __attribute__((aligned (1)))
typedef uintptr_t UINTN;
typedef int64_t INT64;
diff --git a/src/vendorcode/amd/include/gcc-intrin.h b/src/vendorcode/amd/include/gcc-intrin.h
index 8b31530a8a..44e91d28b6 100644
--- a/src/vendorcode/amd/include/gcc-intrin.h
+++ b/src/vendorcode/amd/include/gcc-intrin.h
@@ -581,8 +581,8 @@ __readfsdword(unsigned long Offset)
}
#ifdef __SSE3__
-typedef long long __v2di __attribute__ ((__vector_size__ (16)));
-typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
+typedef long long __v2di __attribute__((__vector_size__ (16)));
+typedef long long __m128i __attribute__((__vector_size__ (16), __may_alias__));
static __inline__ __attribute__((always_inline)) void _mm_stream_si128_fs2 (void *__A, __m128i __B)
{
diff --git a/src/vendorcode/google/chromeos/gnvs.h b/src/vendorcode/google/chromeos/gnvs.h
index 10f738636f..82cd409e8e 100644
--- a/src/vendorcode/google/chromeos/gnvs.h
+++ b/src/vendorcode/google/chromeos/gnvs.h
@@ -16,6 +16,8 @@
#ifndef __VENDORCODE_GOOGLE_CHROMEOS_GNVS_H
#define __VENDORCODE_GOOGLE_CHROMEOS_GNVS_H
+#include <compiler.h>
+
#define BOOT_REASON_OTHER 0
#define BOOT_REASON_S3DIAG 9
@@ -57,7 +59,7 @@ typedef struct {
u32 ramoops_base; // dbe ramoops base address
u32 ramoops_len; // dc2 ramoops length
u8 pad[314]; // dc6-eff
-} __attribute__((packed)) chromeos_acpi_t;
+} __packed chromeos_acpi_t;
extern chromeos_acpi_t *vboot_data;
void chromeos_init_vboot(chromeos_acpi_t *chromeos);
diff --git a/src/vendorcode/google/chromeos/vpd_tables.h b/src/vendorcode/google/chromeos/vpd_tables.h
index d58b5e846d..822ed08b0f 100644
--- a/src/vendorcode/google/chromeos/vpd_tables.h
+++ b/src/vendorcode/google/chromeos/vpd_tables.h
@@ -9,6 +9,7 @@
#ifndef __LIB_VPD_TABLES_H__
#define __LIB_VPD_TABLES_H__
+#include <compiler.h>
#include <inttypes.h>
#define VPD_ENTRY_MAGIC "_SM_"
@@ -32,7 +33,7 @@ struct google_vpd_info {
uint8_t magic[12];
} header;
uint32_t size;
-} __attribute__((packed));
+} __packed;
/* Entry */
struct vpd_entry {
@@ -50,14 +51,14 @@ struct vpd_entry {
uint32_t table_address;
uint16_t table_entry_count;
uint8_t bcd_revision;
-} __attribute__ ((packed));
+} __packed;
/* Header */
struct vpd_header {
uint8_t type;
uint8_t length;
uint16_t handle;
-} __attribute__ ((packed));
+} __packed;
/* Type 0 - firmware information */
struct vpd_table_firmware {
@@ -72,7 +73,7 @@ struct vpd_table_firmware {
uint8_t minor_ver; /* v2.4+ */
uint8_t ec_major_ver; /* v2.4+ */
uint8_t ec_minor_ver; /* v2.4+ */
-} __attribute__ ((packed));
+} __packed;
/* Type 1 - system information */
struct vpd_table_system {
@@ -84,12 +85,12 @@ struct vpd_table_system {
uint8_t wakeup_type;
uint8_t sku_number; /* v2.4+ */
uint8_t family; /* v2.4+ */
-} __attribute__ ((packed));
+} __packed;
/* Type 127 - end of table */
struct vpd_table_eot {
struct vpd_header header;
-} __attribute__ ((packed));
+} __packed;
/* Type 241 - binary blob pointer */
struct vpd_table_binary_blob_pointer {
@@ -104,7 +105,7 @@ struct vpd_table_binary_blob_pointer {
uint8_t uuid[16];
uint32_t offset;
uint32_t size;
-} __attribute__ ((packed));
+} __packed;
/* The length and number of strings defined here is not a limitation of VPD.
* These numbers were deemed good enough during development. */