blob: 5a68d0732e23d89212677d47de6b00aff78066b4 [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
Michał Żygowski08cd6512019-11-28 14:14:52 +010019ifneq ($(CONFIG_ROMCC_BOOTBLOCK),y)
20bootblock-y += bootblock.c
21endif
22
Frank Vibrans63e62b02011-02-14 18:38:14 +000023romstage-y += cfg.c
24romstage-y += early.c
Kyösti Mälkkia1ebbc42014-10-17 22:33:22 +030025romstage-y += smbus.c smbus_spd.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000026
27ramstage-y += cfg.c
28ramstage-y += late.c
Kyösti Mälkki9db39872019-12-13 18:11:05 +020029
30all-y += reset.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000031
Martin Rothe899e512012-12-05 16:07:11 -070032ramstage-$(CONFIG_SB800_MANUAL_FAN_CONTROL) += fan.c
33ramstage-$(CONFIG_SB800_IMC_FAN_CONTROL) += fan.c
Kyösti Mälkkiadf3d6f2014-06-19 16:51:54 +030034ramstage-$(CONFIG_SPI_FLASH) += spi.c
Vladimir Serbinenko822bc652014-01-03 15:55:40 +010035ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c
zbao01bd79f2012-03-23 11:36:08 +080036
Kyösti Mälkki63fac812017-09-02 16:41:43 +030037postcar-y += ramtop.c
Kyösti Mälkki61be3602017-04-15 20:07:53 +030038romstage-y += ramtop.c
39ramstage-y += ramtop.c
Kyösti Mälkki78c5d582015-01-09 23:48:47 +020040
Arthur Heymansadc47532018-12-28 15:48:58 +010041bootblock-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
42romstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Kyösti Mälkki0010bf62013-06-11 16:32:01 +030043ramstage-$(CONFIG_USBDEBUG) += ../../sb800/enable_usbdebug.c
Zheng Baob01097e2012-12-14 15:58:15 +080044
Patrick Georgi23f38cd2012-11-16 14:50:32 +010045ramstage-y += smbus.c
46ramstage-y += lpc.c
Frank Vibrans63e62b02011-02-14 18:38:14 +000047
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080048ifeq ($(CONFIG_SB800_SATA_AHCI), y)
49ifdef CONFIG_SB800_AHCI_ROM
50 stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID))
51 cbfs-files-y += pci$(stripped_ahci_rom_id).rom
52 pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE))
53 pci$(stripped_ahci_rom_id).rom-type := optionrom
54endif
55endif
Frank Vibrans63e62b02011-02-14 18:38:14 +000056
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080057ifeq ($(CONFIG_SB800_SATA_RAID), y)
58 stripped_raid_rom_id = $(call strip_quotes,$(CONFIG_RAID_ROM_ID))
59 cbfs-files-y += pci$(stripped_raid_rom_id).rom
60 pci$(stripped_raid_rom_id).rom-file := $(call strip_quotes,$(CONFIG_RAID_ROM_FILE))
61 pci$(stripped_raid_rom_id).rom-type := optionrom
62
63 cbfs-files-y += raid/misc.bin
64 raid/misc.bin-file := $(call strip_quotes,$(CONFIG_RAID_MISC_ROM_FILE))
Kerry Sheh55437c52011-10-12 11:42:59 +080065 raid/misc.bin-position := $(CONFIG_RAID_MISC_ROM_POSITION)
Kerry Shehd4a0e7d2011-10-10 17:17:39 +080066 raid/misc.bin-type := raw
67endif
Martin Rothe899e512012-12-05 16:07:11 -070068
69ifeq ($(CONFIG_SB800_IMC_FWM), y)
70
71# ROMSIG At ROMBASE + 0x20000:
72# +-----------+---------------+----------------+------------+
73# |0x55AA55AA |EC ROM Address |GEC ROM Address | |
74# +-----------+---------------+----------------+------------+
75# EC ROM should be 64K aligned.
76SB800_FWM_POSITION=$(shell printf %u $(CONFIG_SB800_FWM_POSITION))
77#assume the cbfs header is less than 128 bytes.
78ROMSIG_SIZE=16
79
Patrick Georgi3eefeea2014-11-12 19:11:50 +010080SB800_IMC_POSITION=$(call int-align,$(call add-int,$(SB800_FWM_POSITION) $(ROMSIG_SIZE) 128),65536)
Martin Rothe899e512012-12-05 16:07:11 -070081
82$(obj)/coreboot_SB800_romsig.bin: \
83 $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE)) \
84 $(obj)/config.h \
85 $(obj)/mainboard/$(MAINBOARDDIR)/static.c
86 echo " SB800 FW $@"
87 for fwm in 1437226410 \
88 $(SB800_IMC_POSITION) \
89 0 \
90 0 ; do \
91 echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, int($$1/256) % 256, int($$1/65536) % 256, int($$1/16777216));}'; \
92 done > $@
93
94cbfs-files-y += SB800/fwm
95SB800/fwm-file := $(obj)/coreboot_SB800_romsig.bin
96SB800/fwm-position := $(SB800_FWM_POSITION)
97SB800/fwm-type := raw
98
99cbfs-files-y += SB800/imc
100SB800/imc-file := $(call strip_quotes, $(CONFIG_SB800_IMC_FWM_FILE))
101SB800/imc-position := $(SB800_IMC_POSITION)
102SB800/imc-type := raw
103
104endif