blob: f25a567b29ef99cc4755c085ee3ce3ac6cccf3eb [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##
Furquan Shaikh2af76f42014-04-28 16:39:40 -070016################################################################################
17
Furquan Shaikh26a87472014-06-11 14:48:37 -070018subdirs-y += lib/
19
Furquan Shaikh2af76f42014-04-28 16:39:40 -070020armv8_flags = -march=armv8-a -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_ARM_ARCH__=8
21
22armv8_asm_flags = $(armv8_flags)
23
24################################################################################
25## bootblock
26################################################################################
Marc Jones17b9c192015-01-16 13:45:23 -070027ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV8_64),y)
Furquan Shaikh2af76f42014-04-28 16:39:40 -070028
Julius Werner66a476a2015-10-12 16:45:21 -070029ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y)
30bootblock-y += bootblock.S
31endif
Furquan Shaikh2af76f42014-04-28 16:39:40 -070032bootblock-y += cache.c
Joseph Loc4301f72015-04-14 16:03:58 +080033bootblock-y += cache_helpers.S
Furquan Shaikh2af76f42014-04-28 16:39:40 -070034bootblock-y += cpu.S
35bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c
Furquan Shaikh2af76f42014-04-28 16:39:40 -070036
37bootblock-c-ccopts += $(armv8_flags)
38bootblock-S-ccopts += $(armv8_asm_flags)
39
Julius Werner86fc11d2015-10-09 13:37:58 -070040# Required to access unaligned timestamp struct members before MMU is active
41# (TODO: Maybe use explicit unaligned accesses in timestamp code instead, or
42# evaluate redesigning timestamp data structures to avoid misaligned members.)
43bootblock-c-ccopts += -mstrict-align
44
Furquan Shaikh2af76f42014-04-28 16:39:40 -070045endif
46
47################################################################################
Furquan Shaikh6f33f0a2014-10-02 16:43:19 -070048## verstage
49################################################################################
50ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV8_64),y)
51
52verstage-y += cache.c
53verstage-y += cpu.S
Joseph Loc4301f72015-04-14 16:03:58 +080054verstage-y += cache_helpers.S
Furquan Shaikh6f33f0a2014-10-02 16:43:19 -070055verstage-y += exception.c
56
Patrick Georgi27ef6022015-04-30 14:25:14 +020057libverstage-c-ccopts += $(armv8_flags)
58libverstage-S-ccopts += $(armv8_asm_flags)
Furquan Shaikh6f33f0a2014-10-02 16:43:19 -070059verstage-c-ccopts += $(armv8_flags)
60verstage-S-ccopts += $(armv8_asm_flags)
61
62endif
63
64################################################################################
Furquan Shaikh2af76f42014-04-28 16:39:40 -070065## romstage
66################################################################################
Marc Jones17b9c192015-01-16 13:45:23 -070067ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV8_64),y)
Furquan Shaikh2af76f42014-04-28 16:39:40 -070068
69romstage-y += cache.c
Joseph Loc4301f72015-04-14 16:03:58 +080070romstage-y += cache_helpers.S
Furquan Shaikh2af76f42014-04-28 16:39:40 -070071romstage-y += cpu.S
72romstage-y += exception.c
Furquan Shaikh2af76f42014-04-28 16:39:40 -070073
74romstage-c-ccopts += $(armv8_flags)
75romstage-S-ccopts += $(armv8_asm_flags)
76
Furquan Shaikha742ef12014-07-23 11:41:59 -070077rmodules_arm64-c-ccopts += $(armv8_flags)
78rmodules_arm64-S-ccopts += $(armv8_asm_flags)
79
Furquan Shaikh2af76f42014-04-28 16:39:40 -070080endif
81
82################################################################################
83## ramstage
84################################################################################
Marc Jones17b9c192015-01-16 13:45:23 -070085ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV8_64),y)
Furquan Shaikh2af76f42014-04-28 16:39:40 -070086
87ramstage-y += cache.c
Joseph Loc4301f72015-04-14 16:03:58 +080088ramstage-y += cache_helpers.S
Furquan Shaikh2af76f42014-04-28 16:39:40 -070089ramstage-y += cpu.S
90ramstage-y += exception.c
Furquan Shaikh24869572014-07-17 11:36:08 -070091ramstage-y += mmu.c
Furquan Shaikh2af76f42014-04-28 16:39:40 -070092
93ramstage-c-ccopts += $(armv8_flags)
94ramstage-S-ccopts += $(armv8_asm_flags)
95
Marc Jones17b9c192015-01-16 13:45:23 -070096rmodules_arm64-c-ccopts += $(armv8_flags)
97rmodules_arm64-S-ccopts += $(armv8_asm_flags)
98
Furquan Shaikh2af76f42014-04-28 16:39:40 -070099endif