diff options
Diffstat (limited to 'src/mainboard/intel')
-rw-r--r-- | src/mainboard/intel/d945gclf/mptable.c | 20 | ||||
-rw-r--r-- | src/mainboard/intel/eagleheights/mptable.c | 21 | ||||
-rw-r--r-- | src/mainboard/intel/jarrell/mptable.c | 20 | ||||
-rw-r--r-- | src/mainboard/intel/mtarvon/mptable.c | 21 | ||||
-rw-r--r-- | src/mainboard/intel/truxton/mptable.c | 22 | ||||
-rw-r--r-- | src/mainboard/intel/xe7501devkit/mptable.c | 19 |
6 files changed, 15 insertions, 108 deletions
diff --git a/src/mainboard/intel/d945gclf/mptable.c b/src/mainboard/intel/d945gclf/mptable.c index 5930d2f430..2f33d4cf00 100644 --- a/src/mainboard/intel/d945gclf/mptable.c +++ b/src/mainboard/intel/d945gclf/mptable.c @@ -27,29 +27,13 @@ static void *smp_write_config_table(void *v) { - static const char sig[4] = "PCMP"; - static const char oem[8] = "COREBOOT"; - static const char productid[12] = "D945GCLF "; struct mp_config_table *mc; int i; int max_pci_bus, isa_bus; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - memset(mc, 0, sizeof(*mc)); - - memcpy(mc->mpc_signature, sig, sizeof(sig)); - mc->mpc_length = sizeof(*mc); /* initially just the header */ - mc->mpc_spec = 0x04; - mc->mpc_checksum = 0; /* not yet computed */ - memcpy(mc->mpc_oem, oem, sizeof(oem)); - memcpy(mc->mpc_productid, productid, sizeof(productid)); - mc->mpc_oemptr = 0; - mc->mpc_oemsize = 0; - mc->mpc_entry_count = 0; /* No entries yet... */ - mc->mpc_lapic = LAPIC_ADDR; - mc->mpe_length = 0; - mc->mpe_checksum = 0; - mc->reserved = 0; + + mptable_init(mc, "D945GCLF ", LAPIC_ADDR); smp_write_processors(mc); diff --git a/src/mainboard/intel/eagleheights/mptable.c b/src/mainboard/intel/eagleheights/mptable.c index 33d7b01480..6562a5a582 100644 --- a/src/mainboard/intel/eagleheights/mptable.c +++ b/src/mainboard/intel/eagleheights/mptable.c @@ -20,7 +20,6 @@ * MA 02110-1301 USA */ - #include <console/console.h> #include <arch/io.h> #include <arch/ioapic.h> @@ -61,9 +60,6 @@ static void *smp_write_config_table(void *v) { - static const char sig[4] = "PCMP"; - static const char oem[8] = "COREBOOT"; - static const char productid[12] = "EagleHeights"; struct mp_config_table *mc; unsigned char bus_num, bus_chipset, bus_isa, bus_pci; unsigned char bus_pcie_a, bus_pcie_a1, bus_pcie_b; @@ -81,21 +77,8 @@ static void *smp_write_config_table(void *v) rcba = res->base; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - memset(mc, 0, sizeof(*mc)); - - memcpy(mc->mpc_signature, sig, sizeof(sig)); - mc->mpc_length = sizeof(*mc); /* initially just the header */ - mc->mpc_spec = 0x04; - mc->mpc_checksum = 0; /* not yet computed */ - memcpy(mc->mpc_oem, oem, sizeof(oem)); - memcpy(mc->mpc_productid, productid, sizeof(productid)); - mc->mpc_oemptr = 0; - mc->mpc_oemsize = 0; - mc->mpc_entry_count = 0; /* No entries yet... */ - mc->mpc_lapic = LAPIC_ADDR; - mc->mpe_length = 0; - mc->mpe_checksum = 0; - mc->reserved = 0; + + mptable_init(mc, "EagleHeights", LAPIC_ADDR); smp_write_processors(mc); diff --git a/src/mainboard/intel/jarrell/mptable.c b/src/mainboard/intel/jarrell/mptable.c index 7a2a5943ff..38528299dc 100644 --- a/src/mainboard/intel/jarrell/mptable.c +++ b/src/mainboard/intel/jarrell/mptable.c @@ -7,9 +7,6 @@ static void *smp_write_config_table(void *v) { - static const char sig[4] = "PCMP"; - static const char oem[8] = "COREBOOT"; - static const char productid[12] = "SE7520JR20 "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -22,21 +19,8 @@ static void *smp_write_config_table(void *v) unsigned int bus_pxhd_id; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - memset(mc, 0, sizeof(*mc)); - - memcpy(mc->mpc_signature, sig, sizeof(sig)); - mc->mpc_length = sizeof(*mc); /* initially just the header */ - mc->mpc_spec = 0x04; - mc->mpc_checksum = 0; /* not yet computed */ - memcpy(mc->mpc_oem, oem, sizeof(oem)); - memcpy(mc->mpc_productid, productid, sizeof(productid)); - mc->mpc_oemptr = 0; - mc->mpc_oemsize = 0; - mc->mpc_entry_count = 0; /* No entries yet... */ - mc->mpc_lapic = LAPIC_ADDR; - mc->mpe_length = 0; - mc->mpe_checksum = 0; - mc->reserved = 0; + + mptable_init(mc, "SE7520JR20 ", LAPIC_ADDR); smp_write_processors(mc); diff --git a/src/mainboard/intel/mtarvon/mptable.c b/src/mainboard/intel/mtarvon/mptable.c index 2f3cd2793f..9dccf13e0f 100644 --- a/src/mainboard/intel/mtarvon/mptable.c +++ b/src/mainboard/intel/mtarvon/mptable.c @@ -15,7 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * */ /* This code is based on src/mainboard/intel/jarrell/mptable.c */ @@ -29,30 +28,14 @@ static void *smp_write_config_table(void *v) { - static const char sig[4] = "PCMP"; - static const char oem[8] = "COREBOOT"; - static const char productid[12] = "Mt. Arvon "; struct mp_config_table *mc; u8 bus_isa = 7; u8 bus_pci = 6; u8 bus_pcie_a = 1; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - memset(mc, 0, sizeof(*mc)); - - memcpy(mc->mpc_signature, sig, sizeof(sig)); - mc->mpc_length = sizeof(*mc); /* initially just the header */ - mc->mpc_spec = 0x04; - mc->mpc_checksum = 0; /* not yet computed */ - memcpy(mc->mpc_oem, oem, sizeof(oem)); - memcpy(mc->mpc_productid, productid, sizeof(productid)); - mc->mpc_oemptr = 0; - mc->mpc_oemsize = 0; - mc->mpc_entry_count = 0; /* No entries yet... */ - mc->mpc_lapic = LAPIC_ADDR; - mc->mpe_length = 0; - mc->mpe_checksum = 0; - mc->reserved = 0; + + mptable_init(mc, "Mt. Arvon ", LAPIC_ADDR); smp_write_processors(mc); diff --git a/src/mainboard/intel/truxton/mptable.c b/src/mainboard/intel/truxton/mptable.c index 6f0054d1e9..e691f836ee 100644 --- a/src/mainboard/intel/truxton/mptable.c +++ b/src/mainboard/intel/truxton/mptable.c @@ -15,7 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * */ #include <console/console.h> @@ -27,9 +26,6 @@ static void *smp_write_config_table(void *v) { - static const char sig[4] = "PCMP"; - static const char oem[8] = "COREBOOT"; - static const char productid[12] = "Truxton "; struct mp_config_table *mc; u8 bus_num; u8 bus_isa; @@ -39,24 +35,10 @@ static void *smp_write_config_table(void *v) device_t dev; mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - memset(mc, 0, sizeof(*mc)); - - memcpy(mc->mpc_signature, sig, sizeof(sig)); - mc->mpc_length = sizeof(*mc); /* initially just the header */ - mc->mpc_spec = 0x04; - mc->mpc_checksum = 0; /* not yet computed */ - memcpy(mc->mpc_oem, oem, sizeof(oem)); - memcpy(mc->mpc_productid, productid, sizeof(productid)); - mc->mpc_oemptr = 0; - mc->mpc_oemsize = 0; - mc->mpc_entry_count = 0; /* No entries yet... */ - mc->mpc_lapic = LAPIC_ADDR; - mc->mpe_length = 0; - mc->mpe_checksum = 0; - mc->reserved = 0; - smp_write_processors(mc); + mptable_init(mc, "Truxton ", LAPIC_ADDR); + smp_write_processors(mc); /* AIOC bridge */ dev = dev_find_slot(0, PCI_DEVFN(0x04,0)); diff --git a/src/mainboard/intel/xe7501devkit/mptable.c b/src/mainboard/intel/xe7501devkit/mptable.c index d39e754700..952fb6d978 100644 --- a/src/mainboard/intel/xe7501devkit/mptable.c +++ b/src/mainboard/intel/xe7501devkit/mptable.c @@ -15,7 +15,6 @@ #define INT_D 3 #define PCI_IRQ(dev, intLine) (((dev)<<2) | intLine) - static void xe7501devkit_register_buses(struct mp_config_table *mc) { // Bus ID, Bus Type @@ -132,19 +131,11 @@ static void xe7501devkit_register_interrupts(struct mp_config_table *mc) static void *smp_write_config_table(void* v) { - static const char sig[4] = MPC_SIGNATURE; - static const char oem[8] = "COREBOOT"; - static const char productid[12] = "XE7501DEVKIT"; - struct mp_config_table *mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); - memset(mc, 0, sizeof(*mc)); - - memcpy(mc->mpc_signature, sig, sizeof(sig)); - memcpy(mc->mpc_oem, oem, sizeof(oem)); - memcpy(mc->mpc_productid, productid, sizeof(productid)); - - mc->mpc_length = sizeof(*mc); // initially just the header - mc->mpc_spec = 0x04; // Multiprocessing Spec V1.4 - mc->mpc_lapic = LAPIC_ADDR; + struct mp_config_table *mc; + + mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); + + mptable_init(mc, "XE7501DEVKIT", LAPIC_ADDR); smp_write_processors(mc); |