amdfam10 boards: Call get_bus_conf() just once

It has to be called once before PIRQ and MP table generation.

Change-Id: I238c6b4810404d320b36d4f6b4a161c1ff11c8d3
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30630
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Kyösti Mälkki 2019-01-03 11:38:39 +02:00
parent a2cfe9e900
commit c0b1be0ba1
70 changed files with 11 additions and 226 deletions

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -53,8 +53,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -49,8 +49,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -53,8 +53,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -50,8 +50,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -129,8 +129,6 @@ unsigned long mainboard_write_acpi_tables(struct device *device,
int i;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* same htio, but different possition? We may have to copy,
* change HCIN, and recalculate the checknum and add_table
*/

View File

@ -57,8 +57,6 @@ static unsigned hcdnx[] = {
static u32 get_bus_conf_done = 0;
static u32 get_hcid(u32 i)
{
u32 id = 0;
@ -92,11 +90,6 @@ void get_bus_conf(void)
int i, j;
struct mb_sysconf_t *m;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.mb = &mb_sysconf;
m = sysconf.mb;

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
struct mb_sysconf_t *m;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
m = sysconf.mb;
/* Align the table to be 16 byte aligned. */

View File

@ -36,8 +36,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
m = sysconf.mb;
mptable_write_buses(mc, NULL, &bus_isa);

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -50,18 +50,12 @@ u32 hcdnx[] = {
u32 sbdn_sr5650;
u32 sbdn_sp5100;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -75,8 +75,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -44,8 +44,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
if (IS_ENABLED(CONFIG_ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0))
apicid_sp5100 = 0x0;
else

View File

@ -60,18 +60,12 @@ static unsigned hcdnx[] = {
0x20202020, 0x20202020,
};
static unsigned get_bus_conf_done = 0;
void get_bus_conf(void)
{
unsigned apicid_base, sbdn;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* Do it only once. */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {

View File

@ -68,10 +68,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t *v, sum = 0;
int i;
/* get_bus_conf() will find out all bus num and APIC that share with
* mptable.c and mptable.c.
*/
get_bus_conf();
sbdn = sysconf.sbdn;
/* Align the table to be 16 byte aligned. */

View File

@ -43,7 +43,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
sbdn = sysconf.sbdn;
mptable_write_buses(mc, NULL, &bus_isa);

View File

@ -50,18 +50,12 @@ u32 hcdnx[] = {
u32 sbdn_sr5650;
u32 sbdn_sp5100;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -75,8 +75,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -44,8 +44,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
if (IS_ENABLED(CONFIG_ENABLE_APIC_EXT_ID) && (CONFIG_APIC_ID_OFFSET > 0))
apicid_sp5100 = 0x0;
else

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -53,8 +53,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -49,8 +49,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -53,8 +53,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -49,8 +49,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -55,8 +55,6 @@ static unsigned hcdnx[] = {
0x20202020, 0x20202020,
};
static unsigned get_bus_conf_done = 0;
void get_bus_conf(void)
{
@ -66,10 +64,6 @@ void get_bus_conf(void)
int i;
struct mb_sysconf_t *m;
if (get_bus_conf_done == 1)
return; //do it only once
get_bus_conf_done = 1;
sysconf.mb = &mb_sysconf;

View File

@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
m = sysconf.mb;
mptable_write_buses(mc, NULL, &isa_bus);

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -39,8 +39,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -48,18 +48,12 @@ u32 hcdnx[] = {
u32 sbdn_rs780;
u32 sbdn_sb700;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -40,8 +40,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa);
/* I/O APICs: APIC ID Version State Address */

View File

@ -39,7 +39,6 @@ unsigned long acpi_fill_madt(unsigned long current)
struct resource *res;
struct device *dev;
get_bus_conf();
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -55,8 +55,6 @@ static unsigned hcdnx[] = {
0x20202020, 0x20202020,
};
static unsigned get_bus_conf_done = 0;
void get_bus_conf(void)
{
unsigned apicid_base;
@ -65,12 +63,6 @@ void get_bus_conf(void)
struct device *dev;
int i;
printk(BIOS_SPEW, "get_bus_conf()\n");
if (get_bus_conf_done == 1)
return; //do it only once
get_bus_conf_done = 1;
sysconf.mb = &mb_sysconf;

View File

@ -57,7 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t sum = 0;
int i;
get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -36,7 +36,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -55,8 +55,6 @@ static unsigned hcdnx[] = {
0x20202020, 0x20202020,
};
static unsigned get_bus_conf_done = 0;
void get_bus_conf(void)
{
@ -66,10 +64,6 @@ void get_bus_conf(void)
struct device *dev;
int i;
if(get_bus_conf_done == 1) return; //do it only once
get_bus_conf_done = 1;
sysconf.mb = &mb_sysconf;
m = sysconf.mb;

View File

@ -57,7 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t sum = 0;
int i;
get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -35,7 +35,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -57,8 +57,6 @@ static unsigned hcdnx[] = {
unsigned sbdn3;
static unsigned get_bus_conf_done = 0;
void get_bus_conf(void)
{
@ -68,10 +66,6 @@ void get_bus_conf(void)
struct device *dev;
int i;
if(get_bus_conf_done == 1) return; //do it only once
get_bus_conf_done = 1;
sysconf.mb = &mb_sysconf;
m = sysconf.mb;

View File

@ -57,7 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t sum = 0;
int i;
get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -37,7 +37,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -49,18 +49,12 @@ u32 hcdnx[] = {
u32 sbdn_sr5650;
u32 sbdn_sp5100;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void)
{
u32 apicid_base;
struct device *dev;
int i;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sysconf.hc_possible_num = ARRAY_SIZE(pci1234x);
for (i = 0; i < sysconf.hc_possible_num; i++) {
sysconf.pci1234[i] = pci1234x[i];

View File

@ -54,8 +54,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0;
int i;
get_bus_conf(); /* it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c */
/* Align the table to be 16 byte aligned. */
addr += 15;
addr &= ~15;

View File

@ -41,8 +41,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
apicid_sp5100 = 0x20;
apicid_sr5650 = apicid_sp5100 + 1;

View File

@ -55,8 +55,6 @@ static unsigned hcdnx[] = {
0x20202020, 0x20202020,
};
static unsigned get_bus_conf_done = 0;
void get_bus_conf(void)
{
unsigned apicid_base;
@ -65,10 +63,6 @@ void get_bus_conf(void)
struct device *dev;
int i;
if(get_bus_conf_done == 1) return; //do it only once
get_bus_conf_done = 1;
sysconf.mb = &mb_sysconf;
m = sysconf.mb;

View File

@ -57,7 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
uint8_t sum = 0;
int i;
get_bus_conf(); // it will find out all bus num and apic that share with mptable.c and mptable.c and acpi_tables.c
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -35,7 +35,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc);
get_bus_conf();
sbdn = sysconf.sbdn;
m = sysconf.mb;

View File

@ -215,8 +215,6 @@ void northbridge_acpi_write_vars(struct device *device)
char pscope[] = "\\_SB.PCI0";
int i;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
acpigen_write_scope(pscope);
acpigen_write_name("BUSN");
@ -333,8 +331,6 @@ unsigned long northbridge_write_acpi_tables(struct device *device,
acpi_srat_t *srat;
acpi_slit_t *slit;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* SRAT */
current = ALIGN(current, 8);
printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);

View File

@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
#include <bootstate.h>
#include <device/pci.h>
#include <string.h>
#include <stdint.h>
@ -108,3 +109,13 @@ void get_pci1234(void)
sysconf.hcid[i] = 0;
}
}
static void amd_bs_sysconf(void *arg)
{
/* Prepare sysconf structures, which are used to generate IRQ,
* MP and ACPI table entries.
*/
get_bus_conf();
}
BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, amd_bs_sysconf, NULL);