blob: 418110b5e0acbdcd028cde5ffccc3742f7fe2c9f [file] [log] [blame]
Frank Vibrans63e62b02011-02-14 18:38:14 +00001#
2# This file is part of the coreboot project.
3#
4# Copyright (C) 2011 Advanced Micro Devices, Inc.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; version 2 of the License.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
Frank Vibrans63e62b02011-02-14 18:38:14 +000015
Frank Vibrans63e62b02011-02-14 18:38:14 +000016
17# SB800 Platform Files
18
19romstage-y += cfg.c
20romstage-y += early.c
Kyösti Mälkkia1ebbc42014-10-17 22:33:22 +030021romstage-y += smbus.c smbus_spd.c
Kyösti Mälkki56892fc2013-06-16 17:12:37 +030022romstage-y += reset.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000023
24ramstage-y += cfg.c
25ramstage-y += late.c
Kyösti Mälkki56892fc2013-06-16 17:12:37 +030026ramstage-y += reset.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000027
Martin Rothe899e512012-12-05 16:07:11 -070028ramstage-$(CONFIG_SB800_MANUAL_FAN_CONTROL) += fan.c
29ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c
Kyösti Mälkkiadf3d6f2014-06-19 16:51:54 +030030ramstage-$(CONFIG_SPI_FLASH) += spi.c
Vladimir Serbinenko822bc652014-01-03 15:55:40 +010031ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c
zbao01bd79f2012-03-23 11:36:08 +080032
Kyösti Mälkki63fac812017-09-02 16:41:43 +030033postcar-y += ramtop.c
Kyösti Mälkki61be3602017-04-15 20:07:53 +030034romstage-y += ramtop.c
35ramstage-y += ramtop.c
Kyösti Mälkki78c5d582015-01-09 23:48:47 +020036
Arthur Heymansadc47532018-12-28 15:48:58 +010037bootblock-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
38romstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Kyösti Mälkki0010bf62013-06-11 16:32:01 +030039ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Zheng Baob01097e2012-12-14 15:58:15 +080040
Patrick Georgi23f38cd2012-11-16 14:50:32 +010041ramstage-y += smbus.c
42ramstage-y += lpc.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000043
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080044ifeq ($(CONFIG_SB800_SATA_AHCI), y)
45ifdef CONFIG_SB800_AHCI_ROM
46 stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID))
47 cbfs-files-y += pci$(stripped_ahci_rom_id).rom
48 pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE))
49 pci$(stripped_ahci_rom_id).rom-type := optionrom
50endif
51endif
Frank Vibrans63e62b02011-02-14 18:38:14 +000052
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080053ifeq ($(CONFIG_SB800_SATA_RAID), y)
54 stripped_raid_rom_id = $(call strip_quotes,$(CONFIG_RAID_ROM_ID))
55 cbfs-files-y += pci$(stripped_raid_rom_id).rom
56 pci$(stripped_raid_rom_id).rom-file := $(call strip_quotes,$(CONFIG_RAID_ROM_FILE))
57 pci$(stripped_raid_rom_id).rom-type := optionrom
58
59 cbfs-files-y += raid/misc.bin
60 raid/misc.bin-file := $(call strip_quotes,$(CONFIG_RAID_MISC_ROM_FILE))
Kerry Sheh55437c52011-10-12 11:42:59 +080061 raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION)
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080062 raid/misc.bin-type := raw
63endif
Martin Rothe899e512012-12-05 16:07:11 -070064
65ifeq ($(CONFIG_SB800_IMC_FWM), y)
66
67# ROMSIG At ROMBASE + 0x20000:
68# +-----------+---------------+----------------+------------+
69# |0x55AA55AA |EC ROM Address |GEC ROM Address | |
70# +-----------+---------------+----------------+------------+
71# EC ROM should be 64K aligned.
72SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION))
73#assume the cbfs header is less than 128 bytes.
74ROMSIG_SIZE=16
75
Patrick Georgi3eefeea2014-11-12 19:11:50 +010076SB800_IMC_POSITION=$(call int-align,$(call add-int,$(SB800_FWM_POSITION) $(ROMSIG_SIZE) 128),65536)
Martin Rothe899e512012-12-05 16:07:11 -070077
78$(obj)/coreboot_SB800_romsig.bin: \
79 $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) \
80 $(obj)/config.h \
81 $(obj)/mainboard/$(MAINBOARDDIR)/static.c
82 echo " SB800 FW $@"
83 for fwm in 1437226410 \
84 $(SB800_IMC_POSITION) \
85 0 \
86 0 ; do \
87 echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, int($$1/256) % 256, int($$1/65536) % 256, int($$1/16777216));}'; \
88 done > $@
89
90cbfs-files-y += SB800/fwm
91SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin
92SB800/fwm-position := $(SB800_FWM_POSITION)
93SB800/fwm-type := raw
94
95cbfs-files-y += SB800/imc
96SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE))
97SB800/imc-position := $(SB800_IMC_POSITION)
98SB800/imc-type := raw
99
100endif