2 * This file is part of the coreboot project.
4 * Copyright (C) 2010 Advanced Micro Devices, Inc.
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.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <device/pci_ids.h>
24 #include <arch/romcc_io.h>
25 #include <southbridge/amd/cimx_wrapper/sb800/SBPLATFORM.h>
26 #include <southbridge/amd/cimx_wrapper/sb800/SbEarly.h>
27 #include <southbridge/amd/cimx_wrapper/sb800/cfg.h>
30 * @brief Get SouthBridge device number
31 * @param[in] bus target bus number
32 * @return southbridge device number
38 //dev = PCI_DEV(bus, 0x14, 0);
39 dev = pci_locate_device_on_bus(
40 PCI_ID(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SB800_SM),
43 return (dev >> 15) & 0x1f;
47 * @brief South Bridge CIMx romstage entry,
48 * wrapper of sbPowerOnInit entry point.
50 void sb_poweron_init(void)
52 AMDSBCFG sb_early_cfg;
54 sb800_cimx_config(&sb_early_cfg);
55 //sb_early_cfg.StdHeader.Func = SB_POWERON_INIT;
56 //AmdSbDispatcher(&sb_early_cfg);
58 //AMD_IMAGE_HEADER was missing, when using AmdSbDispatcher,
59 // VerifyImage() will fail, LocateImage() take minitues to find the image.
60 sbPowerOnInit(&sb_early_cfg);