blob: 973b391dd46fb968576716258e4191ac8584da76 [file] [log] [blame]
Furquan Shaikh2af76f42014-04-28 16:39:40 -07001################################################################################
2##
3## This file is part of the coreboot project.
4##
5## Copyright (C) 2014 The ChromiumOS Authors
6##
7## This program is free software; you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation; version 2 of the License.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program; if not, write to the Free Software
18## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19##
20################################################################################
21
22armv8_flags = -march=armv8-a -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_ARM_ARCH__=8
23
24armv8_asm_flags = $(armv8_flags)
25
26################################################################################
27## bootblock
28################################################################################
29ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM_V8_64),y)
30
31ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y)
32bootblock-y += bootblock.S
33endif
34bootblock-$(CONFIG_ARM_BOOTBLOCK_SIMPLE) += bootblock_simple.c
35bootblock-$(CONFIG_ARM_BOOTBLOCK_NORMAL) += bootblock_normal.c
36bootblock-y += cache.c
37bootblock-y += cpu.S
38bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c
39bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception_asm.S
40
41bootblock-c-ccopts += $(armv8_flags)
42bootblock-S-ccopts += $(armv8_asm_flags)
43
44endif
45
46################################################################################
47## romstage
48################################################################################
49ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM_V8_64),y)
50
51romstage-y += cache.c
52romstage-y += cpu.S
53romstage-y += exception.c
54romstage-y += exception_asm.S
55
56romstage-c-ccopts += $(armv8_flags)
57romstage-S-ccopts += $(armv8_asm_flags)
58
59endif
60
61################################################################################
62## ramstage
63################################################################################
64ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM_V8_64),y)
65
66ramstage-y += cache.c
67ramstage-y += cpu.S
68ramstage-y += exception.c
69ramstage-y += exception_asm.S
70
71ramstage-c-ccopts += $(armv8_flags)
72ramstage-S-ccopts += $(armv8_asm_flags)
73
74endif