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:
@ -36,6 +36,9 @@ static void agesawrapper_post_device(void *unused)
|
||||
printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status);
|
||||
}
|
||||
|
||||
/* Preparation for write_tables(). */
|
||||
get_bus_conf();
|
||||
|
||||
if (!acpi_s3_resume_allowed())
|
||||
return;
|
||||
|
||||
|
@ -173,8 +173,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -59,21 +59,11 @@ u32 bus_type[256];
|
||||
u32 sbdn_sb700;
|
||||
u32 sbdn_rd890;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
device_t dev;
|
||||
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");
|
||||
|
||||
sbdn_sb700 = 0;
|
||||
|
@ -58,10 +58,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;
|
||||
|
@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
|
||||
mptable_init(mc, LOCAL_APIC_ADDR);
|
||||
|
||||
smp_write_processors(mc);
|
||||
get_bus_conf();
|
||||
mptable_write_buses(mc, NULL, &bus_isa);
|
||||
|
||||
/*
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -49,9 +49,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -59,10 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -60,8 +60,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 */
|
||||
|
@ -138,8 +138,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ivrs;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -48,7 +48,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_yangtze;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -58,10 +57,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
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 */
|
||||
pci_write_config32(dev, 0xF8, 0);
|
||||
|
@ -57,8 +57,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;
|
||||
|
@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
|
||||
|
||||
smp_write_processors(mc);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ivrs;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -48,7 +48,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_hudson;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -57,10 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
|
||||
sbdn_hudson = 0;
|
||||
|
@ -57,8 +57,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;
|
||||
|
@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
|
||||
|
||||
smp_write_processors(mc);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -51,8 +51,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -60,10 +58,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -56,9 +56,6 @@ static void *smp_write_config_table(void *v)
|
||||
*/
|
||||
smp_write_processors(mc);
|
||||
|
||||
/* Get Bus Configuration */
|
||||
get_bus_conf();
|
||||
|
||||
/*
|
||||
* Type 1: Bus Entries:
|
||||
* Bus ID, Bus Type
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -49,9 +49,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -59,10 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -56,8 +56,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 */
|
||||
|
@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ivrs;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -48,7 +48,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_hudson;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -57,12 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
|
||||
sbdn_hudson = 0;
|
||||
|
||||
memset(bus_hudson, 0, sizeof(bus_hudson));
|
||||
|
@ -57,8 +57,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;
|
||||
|
@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
|
||||
|
||||
smp_write_processors(mc);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -121,8 +121,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ssdt;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -54,19 +54,11 @@ u32 bus_type[256];
|
||||
|
||||
u32 sbdn_sb900;
|
||||
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
device_t dev;
|
||||
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__);
|
||||
|
||||
sbdn_sb900 = 0;
|
||||
|
@ -60,10 +60,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;
|
||||
|
@ -104,8 +104,6 @@ static void *smp_write_config_table(void *v)
|
||||
cpu_flag, cpu_features, cpu_feature_flags
|
||||
);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -49,9 +49,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -59,10 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -56,8 +56,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 */
|
||||
|
@ -132,8 +132,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -49,9 +49,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -59,10 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -57,8 +57,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 */
|
||||
|
@ -138,8 +138,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ivrs;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -45,8 +45,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_yangtze;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -55,11 +53,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
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 */
|
||||
pci_write_config32(dev, 0xF8, 0);
|
||||
pci_write_config32(dev, 0xFC, 5); /* TODO: move it to dsdt.asl */
|
||||
|
@ -57,8 +57,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;
|
||||
|
@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
|
||||
|
||||
smp_write_processors(mc);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -131,8 +131,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ivrs;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -46,8 +46,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_hudson;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -55,12 +53,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
|
||||
sbdn_hudson = 0;
|
||||
|
||||
memset(bus_hudson, 0, sizeof(bus_hudson));
|
||||
|
@ -56,8 +56,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;
|
||||
|
@ -83,8 +83,6 @@ static void *smp_write_config_table(void *v)
|
||||
|
||||
smp_write_processors(mc);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -134,8 +134,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -50,7 +50,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -59,11 +58,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
memset(bus_sb800, 0, sizeof(bus_sb800));
|
||||
|
@ -60,10 +60,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;
|
||||
|
@ -57,8 +57,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 */
|
||||
|
@ -131,8 +131,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ivrs;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -47,7 +47,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_hudson;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -56,12 +55,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
|
||||
sbdn_hudson = 0;
|
||||
|
||||
memset(bus_hudson, 0, sizeof(bus_hudson));
|
||||
|
@ -56,8 +56,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;
|
||||
|
@ -84,8 +84,6 @@ static void *smp_write_config_table(void *v)
|
||||
|
||||
smp_write_processors(mc);
|
||||
|
||||
get_bus_conf();
|
||||
|
||||
//mptable_write_buses(mc, NULL, &bus_isa);
|
||||
my_smp_write_bus(mc, 0, "PCI ");
|
||||
my_smp_write_bus(mc, 1, "PCI ");
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -52,7 +52,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -61,14 +60,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
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;
|
||||
|
||||
memset(bus_sb800, 0, sizeof(bus_sb800));
|
||||
|
@ -58,12 +58,6 @@ unsigned long write_pirq_routing_table(unsigned long addr)
|
||||
u8 sum = 0;
|
||||
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. */
|
||||
addr += 15;
|
||||
addr &= ~15;
|
||||
|
@ -58,9 +58,6 @@ static void *smp_write_config_table(void *v)
|
||||
*/
|
||||
smp_write_processors(mc);
|
||||
|
||||
/* Get Bus Configuration */
|
||||
get_bus_conf();
|
||||
|
||||
/*
|
||||
* Type 1: Bus Entries:
|
||||
* Bus ID, Bus Type
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -49,7 +49,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
@ -58,11 +57,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
memset(bus_sb800, 0, sizeof(bus_sb800));
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -56,8 +56,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 */
|
||||
|
@ -133,8 +133,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -49,8 +49,6 @@ u32 pci1234x[] = {
|
||||
u32 bus_type[256];
|
||||
u32 sbdn_sb800;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
u32 apicid_base;
|
||||
@ -58,11 +56,6 @@ void get_bus_conf(void)
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sb800 = 0;
|
||||
|
||||
memset(bus_sb800, 0, sizeof(bus_sb800));
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -56,8 +56,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 */
|
||||
|
@ -172,8 +172,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *alib;
|
||||
acpi_hest_t *hest;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -43,19 +43,11 @@ u32 bus_type[256];
|
||||
u32 sbdn_sr5650;
|
||||
u32 sbdn_sp5100;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sp5100 = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bus_sp5100); i++) {
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
|
||||
mptable_init(mc, LOCAL_APIC_ADDR);
|
||||
|
||||
smp_write_processors(mc);
|
||||
get_bus_conf();
|
||||
mptable_write_buses(mc, NULL, &bus_isa);
|
||||
|
||||
/*
|
||||
|
@ -153,8 +153,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ssdt2;
|
||||
acpi_header_t *alib;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -43,19 +43,11 @@ u32 bus_type[256];
|
||||
u32 sbdn_sr5650;
|
||||
u32 sbdn_sp5100;
|
||||
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sp5100 = 0;
|
||||
|
||||
for (i = 0; i < 0; i++) {
|
||||
|
@ -59,8 +59,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;
|
||||
|
@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
|
||||
mptable_init(mc, LOCAL_APIC_ADDR);
|
||||
|
||||
smp_write_processors(mc);
|
||||
get_bus_conf();
|
||||
mptable_write_buses(mc, NULL, &bus_isa);
|
||||
|
||||
/*
|
||||
|
@ -153,8 +153,6 @@ unsigned long write_acpi_tables(unsigned long start)
|
||||
acpi_header_t *ssdt2;
|
||||
acpi_header_t *alib;
|
||||
|
||||
get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
|
||||
|
||||
/* Align ACPI tables to 16 bytes */
|
||||
start = ALIGN(start, 16);
|
||||
current = start;
|
||||
|
@ -43,18 +43,12 @@ u32 sbdn_sr5650;
|
||||
u32 sbdn_sp5100;
|
||||
|
||||
void get_bus_conf(void);
|
||||
static u32 get_bus_conf_done = 0;
|
||||
|
||||
void get_bus_conf(void)
|
||||
{
|
||||
device_t dev;
|
||||
int i, j;
|
||||
|
||||
if (get_bus_conf_done == 1)
|
||||
return; /* do it only once */
|
||||
|
||||
get_bus_conf_done = 1;
|
||||
|
||||
sbdn_sp5100 = 0;
|
||||
|
||||
for (i = 0; i < 0; i++) {
|
||||
|
@ -59,10 +59,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;
|
||||
|
@ -48,7 +48,6 @@ static void *smp_write_config_table(void *v)
|
||||
mptable_init(mc, LOCAL_APIC_ADDR);
|
||||
|
||||
smp_write_processors(mc);
|
||||
get_bus_conf();
|
||||
mptable_write_buses(mc, NULL, &bus_isa);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user