diff options
author | Simon Glass <sjg@chromium.org> | 2011-11-22 13:54:50 -0800 |
---|---|---|
committer | Stefan Reinauer <reinauer@chromium.org> | 2012-01-05 15:55:18 -0800 |
commit | 3f29d3f222b223fdac424a2ecdec1944bf7fe034 (patch) | |
tree | eb5d36d8e53b88af8c6a4d8a3bb0e87607627432 | |
parent | d4efe0cb4edfd7533da64971aa580495ffe6870e (diff) | |
download | vboot-3f29d3f222b223fdac424a2ecdec1944bf7fe034.tar.gz |
Revert "Revert "Add x86_64 architecture support""
This reverts commit 354630570900cd5c2180610acfa47422ff484fe6
Reviewed-on: https://gerrit.chromium.org/gerrit/12044
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 8e85e987739281161ece1dbc9ff2b73f3e8e1e35)
Change-Id: Ifcfa1774598ed545b4276a3ed8e24d378f95bbbd
Reviewed-on: https://gerrit.chromium.org/gerrit/13725
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | firmware/arch/x86_64/include/biosincludes.h | 46 |
2 files changed, 50 insertions, 0 deletions
@@ -44,6 +44,10 @@ CFLAGS ?= \ -mpreferred-stack-boundary=2 -mregparm=3 \ $(COMMON_FLAGS) endif +ifeq ($(FIRMWARE_ARCH), x86_64) +CFLAGS ?= $(COMMON_FLAGS) \ + -fvisibility=hidden -fno-strict-aliasing -fomit-frame-pointer +endif CC ?= gcc CXX ?= g++ diff --git a/firmware/arch/x86_64/include/biosincludes.h b/firmware/arch/x86_64/include/biosincludes.h new file mode 100644 index 00000000..59bf931c --- /dev/null +++ b/firmware/arch/x86_64/include/biosincludes.h @@ -0,0 +1,46 @@ +/* Copyright (c) 2011 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. + * + * X86 firmware platform-specific definitions + */ + +#ifndef __ARCH_X86_BIOSINCLUDES_H__ +#define __ARCH_X86_BIOSINCLUDES_H__ + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long long uint64_t; +typedef signed long long int64_t; +typedef unsigned long size_t; + +#ifndef NULL +#define NULL ((void*) 0) +#endif + +#define UINT32_C(x) ((uint32_t) x) +#define UINT64_C(x) ((uint64_t) x) +#define PRIu64 "llu" +extern void debug(const char *format, ...); + +#define POSSIBLY_UNUSED __attribute__((unused)) + +#ifdef __STRICT_ANSI__ +#define INLINE +#else +#define INLINE inline +#endif + +#define UINT64_RSHIFT(v, shiftby) (((uint64_t)(v)) >> (shiftby)) +#define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby))) + +#ifndef UINT32_MAX +#define UINT32_MAX (UINT32_C(0xffffffffU)) +#endif + +#ifndef UINT64_MAX +#define UINT64_MAX (UINT64_C(0xffffffffffffffffULL)) +#endif + +#endif /*__ARCH_X86_BIOSINCLUDES_H__ */ |