AGESA: Call get_bus_conf() just once

Instead of calling get_bus_conf() three times from write_tables()
and executing it once, just make one call before entering write_tables().

Change-Id: I818e37128cb0fb5eaded3c1e00b6b146c1267647
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/6133
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Kyösti Mälkki
2014-06-19 22:19:20 +03:00
parent 005028e0a9
commit ef40ca57eb
81 changed files with 3 additions and 287 deletions

View File

@ -36,6 +36,9 @@ static void agesawrapper_post_device(void *unused)
printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status); printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status);
} }
/* Preparation for write_tables(). */
get_bus_conf();
if (!acpi_s3_resume_allowed()) if (!acpi_s3_resume_allowed())
return; return;

View File

@ -173,8 +173,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -59,21 +59,11 @@ u32 bus_type[256];
u32 sbdn_sb700; u32 sbdn_sb700;
u32 sbdn_rd890; u32 sbdn_rd890;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
printk(BIOS_DEBUG, "Mainboard - Get_bus_conf.c - get_bus_conf - Start.\n"); printk(BIOS_DEBUG, "Mainboard - Get_bus_conf.c - get_bus_conf - Start.\n");
sbdn_sb700 = 0; sbdn_sb700 = 0;

View File

@ -58,10 +58,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
mptable_init(mc, LOCAL_APIC_ADDR); mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa); mptable_write_buses(mc, NULL, &bus_isa);
/* /*

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -49,9 +49,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -59,10 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -138,8 +138,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ivrs; acpi_header_t *ivrs;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -48,7 +48,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_yangtze; u32 sbdn_yangtze;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -58,10 +57,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */ dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */
pci_write_config32(dev, 0xF8, 0); pci_write_config32(dev, 0xF8, 0);

View File

@ -57,8 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ivrs; acpi_header_t *ivrs;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -48,7 +48,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_hudson; u32 sbdn_hudson;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -57,10 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_hudson = 0; sbdn_hudson = 0;

View File

@ -57,8 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -51,8 +51,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -60,10 +58,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -56,9 +56,6 @@ static void *smp_write_config_table(void *v)
*/ */
smp_write_processors(mc); smp_write_processors(mc);
/* Get Bus Configuration */
get_bus_conf();
/* /*
* Type 1: Bus Entries: * Type 1: Bus Entries:
* Bus ID, Bus Type * Bus ID, Bus Type

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -49,9 +49,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -59,10 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ivrs; acpi_header_t *ivrs;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -48,7 +48,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_hudson; u32 sbdn_hudson;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -57,12 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_hudson = 0; sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson)); memset(bus_hudson, 0, sizeof(bus_hudson));

View File

@ -57,8 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -121,8 +121,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ssdt; acpi_header_t *ssdt;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -54,19 +54,11 @@ u32 bus_type[256];
u32 sbdn_sb900; u32 sbdn_sb900;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
printk(BIOS_DEBUG, "Mainboard - %s - %s - Start.\n", __FILE__, __func__); printk(BIOS_DEBUG, "Mainboard - %s - %s - Start.\n", __FILE__, __func__);
sbdn_sb900 = 0; sbdn_sb900 = 0;

View File

@ -60,10 +60,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -104,8 +104,6 @@ static void *smp_write_config_table(void *v)
cpu_flag, cpu_features, cpu_feature_flags cpu_flag, cpu_features, cpu_feature_flags
); );
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -49,9 +49,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -59,10 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -132,8 +132,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -49,9 +49,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -59,10 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -138,8 +138,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ivrs; acpi_header_t *ivrs;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -45,8 +45,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_yangtze; u32 sbdn_yangtze;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -55,11 +53,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */ dev = dev_find_slot(0, PCI_DEVFN(0, 0)); /* clear IoapicSbFeatureEn */
pci_write_config32(dev, 0xF8, 0); pci_write_config32(dev, 0xF8, 0);
pci_write_config32(dev, 0xFC, 5); /* TODO: move it to dsdt.asl */ pci_write_config32(dev, 0xFC, 5); /* TODO: move it to dsdt.asl */

View File

@ -57,8 +57,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -131,8 +131,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ivrs; acpi_header_t *ivrs;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -46,8 +46,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_hudson; u32 sbdn_hudson;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -55,12 +53,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_hudson = 0; sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson)); memset(bus_hudson, 0, sizeof(bus_hudson));

View File

@ -56,8 +56,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -83,8 +83,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -50,7 +50,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -59,11 +58,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); memset(bus_sb800, 0, sizeof(bus_sb800));

View File

@ -60,10 +60,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -131,8 +131,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ivrs; acpi_header_t *ivrs;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -47,7 +47,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_hudson; u32 sbdn_hudson;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -56,12 +55,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_hudson = 0; sbdn_hudson = 0;
memset(bus_hudson, 0, sizeof(bus_hudson)); memset(bus_hudson, 0, sizeof(bus_hudson));

View File

@ -56,8 +56,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
//mptable_write_buses(mc, NULL, &bus_isa); //mptable_write_buses(mc, NULL, &bus_isa);
my_smp_write_bus(mc, 0, "PCI "); my_smp_write_bus(mc, 0, "PCI ");
my_smp_write_bus(mc, 1, "PCI "); my_smp_write_bus(mc, 1, "PCI ");

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -52,7 +52,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -61,14 +60,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
/* Be sure func is called exactly once */
if (get_bus_conf_done == 1)
return;
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); memset(bus_sb800, 0, sizeof(bus_sb800));

View File

@ -58,12 +58,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; int i;
/* Find all Bus num and APIC's that are share with
* mptable.c and acpi_tables.c
*/
get_bus_conf();
/* Align table on 16 byte boundary. */ /* Align table on 16 byte boundary. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -58,9 +58,6 @@ static void *smp_write_config_table(void *v)
*/ */
smp_write_processors(mc); smp_write_processors(mc);
/* Get Bus Configuration */
get_bus_conf();
/* /*
* Type 1: Bus Entries: * Type 1: Bus Entries:
* Bus ID, Bus Type * Bus ID, Bus Type

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -49,7 +49,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
@ -58,11 +57,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); memset(bus_sb800, 0, sizeof(bus_sb800));

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -49,8 +49,6 @@ u32 pci1234x[] = {
u32 bus_type[256]; u32 bus_type[256];
u32 sbdn_sb800; u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
u32 apicid_base; u32 apicid_base;
@ -58,11 +56,6 @@ void get_bus_conf(void)
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sb800 = 0; sbdn_sb800 = 0;
memset(bus_sb800, 0, sizeof(bus_sb800)); memset(bus_sb800, 0, sizeof(bus_sb800));

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

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

View File

@ -172,8 +172,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *alib; acpi_header_t *alib;
acpi_hest_t *hest; acpi_hest_t *hest;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -43,19 +43,11 @@ u32 bus_type[256];
u32 sbdn_sr5650; u32 sbdn_sr5650;
u32 sbdn_sp5100; u32 sbdn_sp5100;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sp5100 = 0; sbdn_sp5100 = 0;
for (i = 0; i < ARRAY_SIZE(bus_sp5100); i++) { for (i = 0; i < ARRAY_SIZE(bus_sp5100); i++) {

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
mptable_init(mc, LOCAL_APIC_ADDR); mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa); mptable_write_buses(mc, NULL, &bus_isa);
/* /*

View File

@ -153,8 +153,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ssdt2; acpi_header_t *ssdt2;
acpi_header_t *alib; acpi_header_t *alib;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -43,19 +43,11 @@ u32 bus_type[256];
u32 sbdn_sr5650; u32 sbdn_sr5650;
u32 sbdn_sp5100; u32 sbdn_sp5100;
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sp5100 = 0; sbdn_sp5100 = 0;
for (i = 0; i < 0; i++) { for (i = 0; i < 0; i++) {

View File

@ -59,8 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
mptable_init(mc, LOCAL_APIC_ADDR); mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa); mptable_write_buses(mc, NULL, &bus_isa);
/* /*

View File

@ -153,8 +153,6 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *ssdt2; acpi_header_t *ssdt2;
acpi_header_t *alib; acpi_header_t *alib;
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
/* Align ACPI tables to 16 bytes */ /* Align ACPI tables to 16 bytes */
start = ALIGN(start, 16); start = ALIGN(start, 16);
current = start; current = start;

View File

@ -43,18 +43,12 @@ u32 sbdn_sr5650;
u32 sbdn_sp5100; u32 sbdn_sp5100;
void get_bus_conf(void); void get_bus_conf(void);
static u32 get_bus_conf_done = 0;
void get_bus_conf(void) void get_bus_conf(void)
{ {
device_t dev; device_t dev;
int i, j; int i, j;
if (get_bus_conf_done == 1)
return; /* do it only once */
get_bus_conf_done = 1;
sbdn_sp5100 = 0; sbdn_sp5100 = 0;
for (i = 0; i < 0; i++) { for (i = 0; i < 0; i++) {

View File

@ -59,10 +59,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
u8 sum = 0; u8 sum = 0;
int i; 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. */ /* Align the table to be 16 byte aligned. */
addr += 15; addr += 15;
addr &= ~15; addr &= ~15;

View File

@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
mptable_init(mc, LOCAL_APIC_ADDR); mptable_init(mc, LOCAL_APIC_ADDR);
smp_write_processors(mc); smp_write_processors(mc);
get_bus_conf();
mptable_write_buses(mc, NULL, &bus_isa); mptable_write_buses(mc, NULL, &bus_isa);
/* /*