Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 1 | ################################################################################ |
| 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 Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 16 | ################################################################################ |
| 17 | |
Furquan Shaikh | 26a8747 | 2014-06-11 14:48:37 -0700 | [diff] [blame] | 18 | subdirs-y += lib/ |
| 19 | |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 20 | armv8_flags = -march=armv8-a -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_ARM_ARCH__=8 |
| 21 | |
| 22 | armv8_asm_flags = $(armv8_flags) |
| 23 | |
| 24 | ################################################################################ |
| 25 | ## bootblock |
| 26 | ################################################################################ |
Marc Jones | 17b9c19 | 2015-01-16 13:45:23 -0700 | [diff] [blame] | 27 | ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV8_64),y) |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 28 | |
Julius Werner | 66a476a | 2015-10-12 16:45:21 -0700 | [diff] [blame^] | 29 | ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y) |
| 30 | bootblock-y += bootblock.S |
| 31 | endif |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 32 | bootblock-y += cache.c |
Joseph Lo | c4301f7 | 2015-04-14 16:03:58 +0800 | [diff] [blame] | 33 | bootblock-y += cache_helpers.S |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 34 | bootblock-y += cpu.S |
| 35 | bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 36 | |
| 37 | bootblock-c-ccopts += $(armv8_flags) |
| 38 | bootblock-S-ccopts += $(armv8_asm_flags) |
| 39 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 40 | # 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.) |
| 43 | bootblock-c-ccopts += -mstrict-align |
| 44 | |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 45 | endif |
| 46 | |
| 47 | ################################################################################ |
Furquan Shaikh | 6f33f0a | 2014-10-02 16:43:19 -0700 | [diff] [blame] | 48 | ## verstage |
| 49 | ################################################################################ |
| 50 | ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV8_64),y) |
| 51 | |
| 52 | verstage-y += cache.c |
| 53 | verstage-y += cpu.S |
Joseph Lo | c4301f7 | 2015-04-14 16:03:58 +0800 | [diff] [blame] | 54 | verstage-y += cache_helpers.S |
Furquan Shaikh | 6f33f0a | 2014-10-02 16:43:19 -0700 | [diff] [blame] | 55 | verstage-y += exception.c |
| 56 | |
Patrick Georgi | 27ef602 | 2015-04-30 14:25:14 +0200 | [diff] [blame] | 57 | libverstage-c-ccopts += $(armv8_flags) |
| 58 | libverstage-S-ccopts += $(armv8_asm_flags) |
Furquan Shaikh | 6f33f0a | 2014-10-02 16:43:19 -0700 | [diff] [blame] | 59 | verstage-c-ccopts += $(armv8_flags) |
| 60 | verstage-S-ccopts += $(armv8_asm_flags) |
| 61 | |
| 62 | endif |
| 63 | |
| 64 | ################################################################################ |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 65 | ## romstage |
| 66 | ################################################################################ |
Marc Jones | 17b9c19 | 2015-01-16 13:45:23 -0700 | [diff] [blame] | 67 | ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV8_64),y) |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 68 | |
| 69 | romstage-y += cache.c |
Joseph Lo | c4301f7 | 2015-04-14 16:03:58 +0800 | [diff] [blame] | 70 | romstage-y += cache_helpers.S |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 71 | romstage-y += cpu.S |
| 72 | romstage-y += exception.c |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 73 | |
| 74 | romstage-c-ccopts += $(armv8_flags) |
| 75 | romstage-S-ccopts += $(armv8_asm_flags) |
| 76 | |
Furquan Shaikh | a742ef1 | 2014-07-23 11:41:59 -0700 | [diff] [blame] | 77 | rmodules_arm64-c-ccopts += $(armv8_flags) |
| 78 | rmodules_arm64-S-ccopts += $(armv8_asm_flags) |
| 79 | |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 80 | endif |
| 81 | |
| 82 | ################################################################################ |
| 83 | ## ramstage |
| 84 | ################################################################################ |
Marc Jones | 17b9c19 | 2015-01-16 13:45:23 -0700 | [diff] [blame] | 85 | ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV8_64),y) |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 86 | |
| 87 | ramstage-y += cache.c |
Joseph Lo | c4301f7 | 2015-04-14 16:03:58 +0800 | [diff] [blame] | 88 | ramstage-y += cache_helpers.S |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 89 | ramstage-y += cpu.S |
| 90 | ramstage-y += exception.c |
Furquan Shaikh | 2486957 | 2014-07-17 11:36:08 -0700 | [diff] [blame] | 91 | ramstage-y += mmu.c |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 92 | |
| 93 | ramstage-c-ccopts += $(armv8_flags) |
| 94 | ramstage-S-ccopts += $(armv8_asm_flags) |
| 95 | |
Marc Jones | 17b9c19 | 2015-01-16 13:45:23 -0700 | [diff] [blame] | 96 | rmodules_arm64-c-ccopts += $(armv8_flags) |
| 97 | rmodules_arm64-S-ccopts += $(armv8_asm_flags) |
| 98 | |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 99 | endif |