Add x86_64 architecture support

This is required for U-Boot's sandbox test system.

BUG=chromium-os:16808
TEST=emerge vboot_reference-firmware for tegra2-seaboard, x86-mario

Change-Id: I18b48b069dc56f9b2c826de99780dfff1e544ded
Reviewed-on: https://gerrit.chromium.org/gerrit/5980
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2011-08-07 22:09:34 -07:00
parent 77ce2e864e
commit bf5540eb1e
2 changed files with 50 additions and 0 deletions

View File

@@ -38,6 +38,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++

View File

@@ -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__ */