summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-04-16 00:31:44 +0000
committerStefan Reinauer <stepan@openbios.org>2010-04-16 00:31:44 +0000
commitd6532116c94c705c7e94a34ab2f046e431fb3682 (patch)
tree6068b85e702f6eaf5b40fa273edfb9bfc4d155a1 /src/mainboard/tyan
parente46c1c85c90b6d263f951ab745a9fadd93041111 (diff)
downloadcoreboot-d6532116c94c705c7e94a34ab2f046e431fb3682.tar.xz
zero warnings days: unify mp tables. fix warnings.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5448 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/tyan')
-rw-r--r--src/mainboard/tyan/s2735/mptable.c2
-rw-r--r--src/mainboard/tyan/s2850/mptable.c2
-rw-r--r--src/mainboard/tyan/s2875/mptable.c2
-rw-r--r--src/mainboard/tyan/s2880/mptable.c2
-rw-r--r--src/mainboard/tyan/s2881/mptable.c2
-rw-r--r--src/mainboard/tyan/s2882/mptable.c2
-rw-r--r--src/mainboard/tyan/s2885/mptable.c2
-rw-r--r--src/mainboard/tyan/s2891/mptable.c2
-rw-r--r--src/mainboard/tyan/s2892/mptable.c2
-rw-r--r--src/mainboard/tyan/s2895/mptable.c2
-rw-r--r--src/mainboard/tyan/s2912/get_bus_conf.c74
-rw-r--r--src/mainboard/tyan/s2912/mptable.c2
-rw-r--r--src/mainboard/tyan/s2912_fam10/mptable.c2
-rw-r--r--src/mainboard/tyan/s4880/mptable.c2
-rw-r--r--src/mainboard/tyan/s4882/mptable.c2
15 files changed, 37 insertions, 65 deletions
diff --git a/src/mainboard/tyan/s2735/mptable.c b/src/mainboard/tyan/s2735/mptable.c
index 22130dd1be..6a73c6dc88 100644
--- a/src/mainboard/tyan/s2735/mptable.c
+++ b/src/mainboard/tyan/s2735/mptable.c
@@ -7,7 +7,7 @@
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2735 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2850/mptable.c b/src/mainboard/tyan/s2850/mptable.c
index 051e9fd487..0d4d6f9bc1 100644
--- a/src/mainboard/tyan/s2850/mptable.c
+++ b/src/mainboard/tyan/s2850/mptable.c
@@ -46,7 +46,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2850 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2875/mptable.c b/src/mainboard/tyan/s2875/mptable.c
index f29a728759..77afde6abf 100644
--- a/src/mainboard/tyan/s2875/mptable.c
+++ b/src/mainboard/tyan/s2875/mptable.c
@@ -44,7 +44,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2875 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2880/mptable.c b/src/mainboard/tyan/s2880/mptable.c
index b8e17ecf02..a8f3859d7b 100644
--- a/src/mainboard/tyan/s2880/mptable.c
+++ b/src/mainboard/tyan/s2880/mptable.c
@@ -46,7 +46,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2880 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2881/mptable.c b/src/mainboard/tyan/s2881/mptable.c
index 4dffcfe8eb..ca75c51a93 100644
--- a/src/mainboard/tyan/s2881/mptable.c
+++ b/src/mainboard/tyan/s2881/mptable.c
@@ -23,7 +23,7 @@ extern unsigned sbdn3;
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2881 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2882/mptable.c b/src/mainboard/tyan/s2882/mptable.c
index b2858fcc84..f1d7a27179 100644
--- a/src/mainboard/tyan/s2882/mptable.c
+++ b/src/mainboard/tyan/s2882/mptable.c
@@ -46,7 +46,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2882 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2885/mptable.c b/src/mainboard/tyan/s2885/mptable.c
index 4f5bab5cf4..d096b07905 100644
--- a/src/mainboard/tyan/s2885/mptable.c
+++ b/src/mainboard/tyan/s2885/mptable.c
@@ -27,7 +27,7 @@ extern unsigned sbdn5;
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2885 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s2891/mptable.c b/src/mainboard/tyan/s2891/mptable.c
index 5ebbda039f..b8325e5692 100644
--- a/src/mainboard/tyan/s2891/mptable.c
+++ b/src/mainboard/tyan/s2891/mptable.c
@@ -27,7 +27,7 @@ extern unsigned sbdn3;
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2891 ";
struct mp_config_table *mc;
unsigned sbdn;
diff --git a/src/mainboard/tyan/s2892/mptable.c b/src/mainboard/tyan/s2892/mptable.c
index 38ffaabfbd..4846c997fa 100644
--- a/src/mainboard/tyan/s2892/mptable.c
+++ b/src/mainboard/tyan/s2892/mptable.c
@@ -27,7 +27,7 @@ extern unsigned sbdn3;
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2892 ";
struct mp_config_table *mc;
unsigned sbdn;
diff --git a/src/mainboard/tyan/s2895/mptable.c b/src/mainboard/tyan/s2895/mptable.c
index 600b0f4533..82968cc0bd 100644
--- a/src/mainboard/tyan/s2895/mptable.c
+++ b/src/mainboard/tyan/s2895/mptable.c
@@ -35,7 +35,7 @@ extern unsigned sbdnb;
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2895 ";
struct mp_config_table *mc;
unsigned sbdn;
diff --git a/src/mainboard/tyan/s2912/get_bus_conf.c b/src/mainboard/tyan/s2912/get_bus_conf.c
index cd993a7a85..b21b1af4a7 100644
--- a/src/mainboard/tyan/s2912/get_bus_conf.c
+++ b/src/mainboard/tyan/s2912/get_bus_conf.c
@@ -27,9 +27,7 @@
#if CONFIG_LOGICAL_CPUS==1
#include <cpu/amd/multicore.h>
#endif
-
#include <cpu/amd/amdk8_sysconf.h>
-
#include <stdlib.h>
#include "mb_sysconf.h"
@@ -37,8 +35,11 @@
struct mb_sysconf_t mb_sysconf;
unsigned pci1234x[] =
-{ //Here you only need to set value in pci1234 for HT-IO that could be installed or not
- //You may need to preset pci1234 for HTIO board, please refer to src/northbridge/amd/amdk8/get_sblk_pci1234.c for detail
+{
+ // Here you only need to set value in pci1234 for HT-IO that could be
+ // installed or not.
+ // You may need to preset pci1234 for HTIO board, please refer to
+ // src/northbridge/amd/amdk8/get_sblk_pci1234.c for detail
0x0000ff0,
0x0000ff0,
0x0000ff0,
@@ -49,7 +50,9 @@ unsigned pci1234x[] =
// 0x0000ff0
};
unsigned hcdnx[] =
-{ //HT Chain device num, actually it is unit id base of every ht device in chain, assume every chain only have 4 ht device at most
+{
+ // HT Chain device num, actually it is unit id base of every ht device
+ // in chain, assume every chain only have 4 ht device at most
0x20202020,
0x20202020,
0x20202020,
@@ -60,39 +63,10 @@ unsigned hcdnx[] =
// 0x20202020,
};
-
-
-
static unsigned get_bus_conf_done = 0;
-static unsigned get_hcid(unsigned i)
-{
- unsigned id = 0;
-
- unsigned busn = (sysconf.pci1234[i] >> 16) & 0xff;
-
- unsigned devn = sysconf.hcdn[i] & 0xff;
-
- device_t dev;
-
- dev = dev_find_slot(busn, PCI_DEVFN(devn,0));
-
- switch (dev->device) {
- case 0x0369: //IO55
- id = 4;
- break;
- }
-
- // we may need more way to find out hcid: subsystem id? GPIO read ?
-
- // we need use id for 1. bus num, 2. mptable, 3. acpi table
-
- return id;
-}
-
void get_bus_conf(void)
{
-
unsigned apicid_base;
struct mb_sysconf_t *m;
@@ -122,24 +96,22 @@ void get_bus_conf(void)
m->bus_mcp55[0] = (sysconf.pci1234[0] >> 16) & 0xff;
- /* MCP55 */
- dev = dev_find_slot(m->bus_mcp55[0], PCI_DEVFN(sysconf.sbdn + 0x06,0));
- if (dev) {
- m->bus_mcp55[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
- }
- else {
- printk(BIOS_DEBUG, "ERROR - could not find PCI 1:%02x.0, using defaults\n", sysconf.sbdn + 0x06);
- }
+ /* MCP55 */
+ dev = dev_find_slot(m->bus_mcp55[0], PCI_DEVFN(sysconf.sbdn + 0x06,0));
+ if (dev) {
+ m->bus_mcp55[1] = pci_read_config8(dev, PCI_SECONDARY_BUS);
+ } else {
+ printk(BIOS_DEBUG, "ERROR - could not find PCI 1:%02x.0, using defaults\n", sysconf.sbdn + 0x06);
+ }
- for(i=2; i<8;i++) {
- dev = dev_find_slot(m->bus_mcp55[0], PCI_DEVFN(sysconf.sbdn + 0x0a + i - 2 , 0));
- if (dev) {
- m->bus_mcp55[i] = pci_read_config8(dev, PCI_SECONDARY_BUS);
- }
- else {
- printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", m->bus_mcp55[0], sysconf.sbdn + 0x0a + i - 2 );
- }
+ for(i=2; i<8;i++) {
+ dev = dev_find_slot(m->bus_mcp55[0], PCI_DEVFN(sysconf.sbdn + 0x0a + i - 2 , 0));
+ if (dev) {
+ m->bus_mcp55[i] = pci_read_config8(dev, PCI_SECONDARY_BUS);
+ } else {
+ printk(BIOS_DEBUG, "ERROR - could not find PCI %02x:%02x.0, using defaults\n", m->bus_mcp55[0], sysconf.sbdn + 0x0a + i - 2 );
}
+ }
for(i=0; i< sysconf.hc_possible_num; i++) {
if(!(sysconf.pci1234[i] & 0x1) ) continue;
@@ -160,5 +132,5 @@ void get_bus_conf(void)
apicid_base = CONFIG_MAX_PHYSICAL_CPUS;
#endif
m->apicid_mcp55 = apicid_base+0;
-
}
+
diff --git a/src/mainboard/tyan/s2912/mptable.c b/src/mainboard/tyan/s2912/mptable.c
index 027873dfbc..b688da11ee 100644
--- a/src/mainboard/tyan/s2912/mptable.c
+++ b/src/mainboard/tyan/s2912/mptable.c
@@ -34,7 +34,7 @@
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2895 ";
struct mp_config_table *mc;
struct mb_sysconf_t *m;
diff --git a/src/mainboard/tyan/s2912_fam10/mptable.c b/src/mainboard/tyan/s2912_fam10/mptable.c
index c2c5f66d7a..79d0766824 100644
--- a/src/mainboard/tyan/s2912_fam10/mptable.c
+++ b/src/mainboard/tyan/s2912_fam10/mptable.c
@@ -34,7 +34,7 @@
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S2895 ";
struct mp_config_table *mc;
struct mb_sysconf_t *m;
diff --git a/src/mainboard/tyan/s4880/mptable.c b/src/mainboard/tyan/s4880/mptable.c
index d90f783588..746d2a5d5e 100644
--- a/src/mainboard/tyan/s4880/mptable.c
+++ b/src/mainboard/tyan/s4880/mptable.c
@@ -44,7 +44,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S4880 ";
struct mp_config_table *mc;
diff --git a/src/mainboard/tyan/s4882/mptable.c b/src/mainboard/tyan/s4882/mptable.c
index 965e6ae306..4022dbdde1 100644
--- a/src/mainboard/tyan/s4882/mptable.c
+++ b/src/mainboard/tyan/s4882/mptable.c
@@ -45,7 +45,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
static void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
- static const char oem[8] = "TYAN ";
+ static const char oem[8] = "COREBOOT";
static const char productid[12] = "S4882 ";
struct mp_config_table *mc;