Author: uwe Date: Mon Oct 25 17:32:07 2010 New Revision: 5987 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5987
Log: Factor out common mptable code to mptable_init().
- Drop sig[], oem[], and productid[] fields in all mptable.c files, no longer needed. The sig[] is always the same ("PCMP"), the oem[] is currently also always the same ("COREBOOT"), and productid is being passed into mptable_init() directly as string now.
- LAPIC_ADDR is passed in as parameter, too. While at the moment it's always the same value that is passed in, the LAPIC base address could also be relocated theoretically, so keep it as parameter for now.
- Fix a few productid entries, they were (partially) incorrect:
- DK8S2 (was "DK8X", copypaste) - 939A785GMH (was "MAHOGANY", copypaste) - X6DHE-G (was "X6DHE", incomplete board name) - H8DME-2 (was "H8DMR", copypaste) - H8QME-2+ (was "H8QME", incomplete board name) - X6DHE-G2 (was "X6DHE", incomplete board name) - X6DHR-iG2 (was "X6DHR-iG", incomplete board name) - GA-M57SLI-S4 (was "M57SLI", incomplete board name) - KINO-780AM2 (was "KINO", incomplete board name) - DL145 G1 (was "DL145G1", small fix as per vendor website) - DL145 G3 (was "TREX", wrong board name) - DL165 G6 (was "HP DL165 G6", drop vendor) - S2912 (was "S2895", copypaste) - VT8454c (was "VIA VT8454C", drop vendor, lower-case "c") - EPIA-N (was "P4DPE", copypaste) - pc2500e (was "PC2500", incorrect name) - S1850 (was "S2850", copy-paste) - MS-7135 (was "MS7135") - MS-9282 (was "MS9282") - MS-9185 (was "MS9185") - MS-9652 (was "K9ND MS-9652") - Ultra 40 (was "ultra40") - E326 (was "E325", copypaste) - M4A785-M (was "TILAPIA", copypaste) - P2B-D (was "ASUS P2B-D", drop vendor) - P2B-DS (was "ASUS P2B-DS", drop vendor)
- Adapt the mptable utility to use mptable_init() too.
Abuild-tested.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Patrick Georgi patrick.georgi@coresystems.de
Modified: trunk/src/arch/i386/boot/mpspec.c trunk/src/arch/i386/include/arch/smp/mpspec.h trunk/src/mainboard/amd/dbm690t/mptable.c trunk/src/mainboard/amd/mahogany/mptable.c trunk/src/mainboard/amd/mahogany_fam10/mptable.c trunk/src/mainboard/amd/pistachio/mptable.c trunk/src/mainboard/amd/serengeti_cheetah/mptable.c trunk/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c trunk/src/mainboard/amd/tilapia_fam10/mptable.c trunk/src/mainboard/arima/hdama/mptable.c trunk/src/mainboard/asrock/939a785gmh/mptable.c trunk/src/mainboard/asus/a8n_e/mptable.c trunk/src/mainboard/asus/a8v-e_se/mptable.c trunk/src/mainboard/asus/m4a785-m/mptable.c trunk/src/mainboard/asus/p2b-d/mptable.c trunk/src/mainboard/asus/p2b-ds/mptable.c trunk/src/mainboard/broadcom/blast/mptable.c trunk/src/mainboard/dell/s1850/mptable.c trunk/src/mainboard/getac/p470/mptable.c trunk/src/mainboard/gigabyte/ga_2761gxdk/mptable.c trunk/src/mainboard/gigabyte/m57sli/mptable.c trunk/src/mainboard/gigabyte/ma785gmt/mptable.c trunk/src/mainboard/gigabyte/ma78gm/mptable.c trunk/src/mainboard/hp/dl145_g1/mptable.c trunk/src/mainboard/hp/dl145_g3/mptable.c trunk/src/mainboard/hp/dl165_g6_fam10/mptable.c trunk/src/mainboard/ibase/mb899/mptable.c trunk/src/mainboard/ibm/e325/mptable.c trunk/src/mainboard/ibm/e326/mptable.c trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c trunk/src/mainboard/intel/d945gclf/mptable.c trunk/src/mainboard/intel/eagleheights/mptable.c trunk/src/mainboard/intel/jarrell/mptable.c trunk/src/mainboard/intel/mtarvon/mptable.c trunk/src/mainboard/intel/truxton/mptable.c trunk/src/mainboard/intel/xe7501devkit/mptable.c trunk/src/mainboard/iwill/dk8_htx/mptable.c trunk/src/mainboard/iwill/dk8s2/mptable.c trunk/src/mainboard/iwill/dk8x/mptable.c trunk/src/mainboard/jetway/pa78vm5/mptable.c trunk/src/mainboard/kontron/986lcd-m/mptable.c trunk/src/mainboard/kontron/kt690/mptable.c trunk/src/mainboard/msi/ms7135/mptable.c trunk/src/mainboard/msi/ms7260/mptable.c trunk/src/mainboard/msi/ms9185/mptable.c trunk/src/mainboard/msi/ms9282/mptable.c trunk/src/mainboard/msi/ms9652_fam10/mptable.c trunk/src/mainboard/newisys/khepri/mptable.c trunk/src/mainboard/nvidia/l1_2pvv/mptable.c trunk/src/mainboard/roda/rk886ex/mptable.c trunk/src/mainboard/sunw/ultra40/mptable.c trunk/src/mainboard/supermicro/h8dme/mptable.c trunk/src/mainboard/supermicro/h8dmr/mptable.c trunk/src/mainboard/supermicro/h8dmr_fam10/mptable.c trunk/src/mainboard/supermicro/h8qme_fam10/mptable.c trunk/src/mainboard/supermicro/x6dai_g/mptable.c trunk/src/mainboard/supermicro/x6dhe_g/mptable.c trunk/src/mainboard/supermicro/x6dhe_g2/mptable.c trunk/src/mainboard/supermicro/x6dhr_ig/mptable.c trunk/src/mainboard/supermicro/x6dhr_ig2/mptable.c trunk/src/mainboard/technexion/tim5690/mptable.c trunk/src/mainboard/technexion/tim8690/mptable.c trunk/src/mainboard/tyan/s2735/mptable.c trunk/src/mainboard/tyan/s2850/mptable.c trunk/src/mainboard/tyan/s2875/mptable.c trunk/src/mainboard/tyan/s2880/mptable.c trunk/src/mainboard/tyan/s2881/mptable.c trunk/src/mainboard/tyan/s2882/mptable.c trunk/src/mainboard/tyan/s2885/mptable.c trunk/src/mainboard/tyan/s2891/mptable.c trunk/src/mainboard/tyan/s2892/mptable.c trunk/src/mainboard/tyan/s2895/mptable.c trunk/src/mainboard/tyan/s2912/mptable.c trunk/src/mainboard/tyan/s2912_fam10/mptable.c trunk/src/mainboard/tyan/s4880/mptable.c trunk/src/mainboard/tyan/s4882/mptable.c trunk/src/mainboard/via/epia-n/mptable.c trunk/src/mainboard/via/pc2500e/mptable.c trunk/src/mainboard/via/vt8454c/mptable.c trunk/util/mptable/mptable.c
Modified: trunk/src/arch/i386/boot/mpspec.c ============================================================================== --- trunk/src/arch/i386/boot/mpspec.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/arch/i386/boot/mpspec.c Mon Oct 25 17:32:07 2010 (r5987) @@ -7,6 +7,30 @@ #include <arch/cpu.h> #include <cpu/x86/lapic.h>
+/* Initialize the specified "mc" struct with initial values. */ +void mptable_init(struct mp_config_table *mc, const char *productid, + u32 lapic_addr) +{ + /* Error out if 'product_id' length doesn't match exactly. */ + if (strlen(productid) != 12) + die("ERROR: 'productid' must be 12 bytes long!"); + + memset(mc, 0, sizeof(*mc)); + memcpy(mc->mpc_signature, MPC_SIGNATURE, 4); + mc->mpc_length = sizeof(*mc); /* Initially just the header size. */ + mc->mpc_spec = 0x04; /* MultiProcessor specification 1.4 */ + mc->mpc_checksum = 0; /* Not yet computed. */ + memcpy(mc->mpc_oem, "COREBOOT", 8); + memcpy(mc->mpc_productid, productid, 12); + 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; +} + unsigned char smp_compute_checksum(void *v, int len) { unsigned char *bytes;
Modified: trunk/src/arch/i386/include/arch/smp/mpspec.h ============================================================================== --- trunk/src/arch/i386/include/arch/smp/mpspec.h Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/arch/i386/include/arch/smp/mpspec.h Mon Oct 25 17:32:07 2010 (r5987) @@ -232,6 +232,9 @@ /* Default local apic addr */ #define LAPIC_ADDR 0xFEE00000
+void mptable_init(struct mp_config_table *mc, const char *productid, + u32 lapic_addr); + void *smp_next_mpc_entry(struct mp_config_table *mc); void *smp_next_mpe_entry(struct mp_config_table *mc);
Modified: trunk/src/mainboard/amd/dbm690t/mptable.c ============================================================================== --- trunk/src/mainboard/amd/dbm690t/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/dbm690t/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -23,7 +23,6 @@ #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -36,32 +35,14 @@ extern u32 sbdn_rs690; extern u32 sbdn_sb600;
- - 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] = "DBM690T "; struct mp_config_table *mc; int j;
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, "DBM690T ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/amd/mahogany/mptable.c ============================================================================== --- trunk/src/mainboard/amd/mahogany/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/mahogany/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,7 +24,6 @@ #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -37,32 +36,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "MAHOGANY "; struct mp_config_table *mc; int j;
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, "MAHOGANY ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/amd/mahogany_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/mahogany_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "MAHOGANY "; struct mp_config_table *mc; int j;
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, "MAHOGANY ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/amd/pistachio/mptable.c ============================================================================== --- trunk/src/mainboard/amd/pistachio/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/pistachio/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -23,7 +23,6 @@ #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -36,32 +35,14 @@ extern u32 sbdn_rs690; extern u32 sbdn_sb600;
- - 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] = "PISTACHIO "; struct mp_config_table *mc; int j;
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, "PISTACHIO ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/amd/serengeti_cheetah/mptable.c ============================================================================== --- trunk/src/mainboard/amd/serengeti_cheetah/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/serengeti_cheetah/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -7,39 +7,19 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdk8_sysconf.h> #include "mb_sysconf.h"
- - 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] = "SERENGETI "; struct mp_config_table *mc; - unsigned char bus_num; int i, j; struct mb_sysconf_t *m;
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, "SERENGETI ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/serengeti_cheetah_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -26,39 +26,18 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdfam10_sysconf.h> #include "mb_sysconf.h"
- - 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] = "SERENGETI "; + int i, j; struct mp_config_table *mc; - - int i; - int j; struct mb_sysconf_t *m;
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, "SERENGETI ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/amd/tilapia_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/amd/tilapia_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/amd/tilapia_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "TILAPIA "; struct mp_config_table *mc; int j;
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, "TILAPIA ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/arima/hdama/mptable.c ============================================================================== --- trunk/src/mainboard/arima/hdama/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/arima/hdama/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -110,9 +110,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] = "HDAMA "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -126,21 +123,8 @@ unsigned apicid_8131_2;
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, "HDAMA ", LAPIC_ADDR);
smp_write_processors_inorder(mc);
Modified: trunk/src/mainboard/asrock/939a785gmh/mptable.c ============================================================================== --- trunk/src/mainboard/asrock/939a785gmh/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/asrock/939a785gmh/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "MAHOGANY "; struct mp_config_table *mc; int j;
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, "939A785GMH ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/asus/a8n_e/mptable.c ============================================================================== --- trunk/src/mainboard/asus/a8n_e/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/asus/a8n_e/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -33,32 +33,15 @@ extern unsigned apicid_ck804; extern unsigned bus_type[256];
- 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] = "A8N-E "; struct mp_config_table *mc; unsigned sbdn; int bus_num;
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, "A8N-E ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/asus/a8v-e_se/mptable.c ============================================================================== --- trunk/src/mainboard/asus/a8v-e_se/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/asus/a8v-e_se/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -26,32 +26,15 @@
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] = "A8V-E SE "; struct mp_config_table *mc; int bus_isa = 42;
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, "A8V-E SE ", LAPIC_ADDR);
smp_write_processors(mc);
- /* Bus: Bus ID Type */ smp_write_bus(mc, 0, "PCI "); smp_write_bus(mc, 1, "PCI ");
Modified: trunk/src/mainboard/asus/m4a785-m/mptable.c ============================================================================== --- trunk/src/mainboard/asus/m4a785-m/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/asus/m4a785-m/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "TILAPIA "; struct mp_config_table *mc; int j;
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, "M4A785-M ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/asus/p2b-d/mptable.c ============================================================================== --- trunk/src/mainboard/asus/p2b-d/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/asus/p2b-d/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -27,27 +27,11 @@
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] = "ASUS P2B-D "; struct mp_config_table *mc;
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, "P2B-D ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/asus/p2b-ds/mptable.c ============================================================================== --- trunk/src/mainboard/asus/p2b-ds/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/asus/p2b-ds/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -27,27 +27,11 @@
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] = "ASUS P2B-DS "; struct mp_config_table *mc;
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, "P2B-DS ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/broadcom/blast/mptable.c ============================================================================== --- trunk/src/mainboard/broadcom/blast/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/broadcom/blast/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -7,7 +7,6 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -19,34 +18,15 @@
extern unsigned sbdn2;
- - 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] = "BLAST "; struct mp_config_table *mc; - unsigned char bus_num; int i;
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, "BLAST ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/dell/s1850/mptable.c ============================================================================== --- trunk/src/mainboard/dell/s1850/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/dell/s1850/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "S2850 "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -20,21 +17,8 @@ unsigned char bus_ich5r_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, "S1850 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/getac/p470/mptable.c ============================================================================== --- trunk/src/mainboard/getac/p470/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/getac/p470/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -29,29 +29,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] = "P470 "; 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, "P470 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/gigabyte/ga_2761gxdk/mptable.c ============================================================================== --- trunk/src/mainboard/gigabyte/ga_2761gxdk/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/gigabyte/ga_2761gxdk/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -26,8 +26,8 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> + extern unsigned char bus_isa; extern unsigned char bus_sis966[8]; //1
@@ -37,30 +37,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] = "GA-2761GXDK "; struct mp_config_table *mc; unsigned sbdn; - int i,j;
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, "GA-2761GXDK ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/gigabyte/m57sli/mptable.c ============================================================================== --- trunk/src/mainboard/gigabyte/m57sli/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/gigabyte/m57sli/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -25,8 +25,8 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> + extern unsigned char bus_isa; extern unsigned char bus_mcp55[8]; //1
@@ -34,34 +34,15 @@
extern unsigned bus_type[256];
- - 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] = "M57SLI "; struct mp_config_table *mc; unsigned sbdn; - int i,j,k;
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, "GA-M57SLI-S4", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/gigabyte/ma785gmt/mptable.c ============================================================================== --- trunk/src/mainboard/gigabyte/ma785gmt/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/gigabyte/ma785gmt/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "MA785GMT "; struct mp_config_table *mc; int j;
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, "MA785GMT ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/gigabyte/ma78gm/mptable.c ============================================================================== --- trunk/src/mainboard/gigabyte/ma78gm/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/gigabyte/ma78gm/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "MA78GM-US2H "; struct mp_config_table *mc; int j;
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, "MA78GM-US2H ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/hp/dl145_g1/mptable.c ============================================================================== --- trunk/src/mainboard/hp/dl145_g1/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/hp/dl145_g1/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -4,7 +4,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -19,39 +18,19 @@
extern unsigned sbdn3;
- - 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] = "DL145G1 "; struct mp_config_table *mc; - unsigned char bus_num;
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, "DL145 G1 ", LAPIC_ADDR);
smp_write_processors(mc);
get_bus_conf();
- /*Bus: Bus ID Type*/ /* define bus and isa numbers */ for(bus_num = 0; bus_num < bus_isa; bus_num++) {
Modified: trunk/src/mainboard/hp/dl145_g3/mptable.c ============================================================================== --- trunk/src/mainboard/hp/dl145_g3/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/hp/dl145_g3/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -36,38 +36,17 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdk8_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "TREX "; struct mp_config_table *mc; - struct mb_sysconf_t *m;
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, "TREX ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/hp/dl165_g6_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/hp/dl165_g6_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/hp/dl165_g6_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -36,37 +36,19 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdfam10_sysconf.h> - #include "mb_sysconf.h"
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] = "HP DL165 G6 "; struct mp_config_table *mc; int isa_bus;
struct mb_sysconf_t *m;
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, "DL165 G6 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/ibase/mb899/mptable.c ============================================================================== --- trunk/src/mainboard/ibase/mb899/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/ibase/mb899/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -27,9 +27,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] = "MB899 "; struct mp_config_table *mc; struct device *riser = NULL, *firewire = NULL; int i; @@ -37,21 +34,8 @@ int ioapic_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, "MB899 ", LAPIC_ADDR);
smp_write_processors(mc); max_pci_bus=0;
Modified: trunk/src/mainboard/ibm/e325/mptable.c ============================================================================== --- trunk/src/mainboard/ibm/e325/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/ibm/e325/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "E325 "; struct mp_config_table *mc;
unsigned char bus_num; @@ -20,21 +17,8 @@ unsigned char bus_8131_2;
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, "E325 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/ibm/e326/mptable.c ============================================================================== --- trunk/src/mainboard/ibm/e326/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/ibm/e326/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "E325 "; struct mp_config_table *mc;
unsigned char bus_num; @@ -20,21 +17,8 @@ unsigned char bus_8131_2;
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, "E326 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c ============================================================================== --- trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -37,32 +35,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "KINO "; struct mp_config_table *mc; int j;
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, "KINO-780AM2 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/intel/d945gclf/mptable.c ============================================================================== --- trunk/src/mainboard/intel/d945gclf/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/intel/d945gclf/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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);
Modified: trunk/src/mainboard/intel/eagleheights/mptable.c ============================================================================== --- trunk/src/mainboard/intel/eagleheights/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/intel/eagleheights/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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 @@ 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);
Modified: trunk/src/mainboard/intel/jarrell/mptable.c ============================================================================== --- trunk/src/mainboard/intel/jarrell/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/intel/jarrell/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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 @@ 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);
Modified: trunk/src/mainboard/intel/mtarvon/mptable.c ============================================================================== --- trunk/src/mainboard/intel/mtarvon/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/intel/mtarvon/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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);
Modified: trunk/src/mainboard/intel/truxton/mptable.c ============================================================================== --- trunk/src/mainboard/intel/truxton/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/intel/truxton/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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,25 +35,11 @@ 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; + mptable_init(mc, "Truxton ", LAPIC_ADDR);
smp_write_processors(mc);
- /* AIOC bridge */ dev = dev_find_slot(0, PCI_DEVFN(0x04,0)); if (dev) {
Modified: trunk/src/mainboard/intel/xe7501devkit/mptable.c ============================================================================== --- trunk/src/mainboard/intel/xe7501devkit/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/intel/xe7501devkit/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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 *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);
Modified: trunk/src/mainboard/iwill/dk8_htx/mptable.c ============================================================================== --- trunk/src/mainboard/iwill/dk8_htx/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/iwill/dk8_htx/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -7,39 +7,19 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdk8_sysconf.h> #include "mb_sysconf.h"
- - 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] = "DK8-HTX "; struct mp_config_table *mc; - unsigned char bus_num; int i, j; struct mb_sysconf_t *m;
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, "DK8-HTX ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/iwill/dk8s2/mptable.c ============================================================================== --- trunk/src/mainboard/iwill/dk8s2/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/iwill/dk8s2/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "DK8X "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -18,21 +15,8 @@ unsigned char bus_8111_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, "DK8S2 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/iwill/dk8x/mptable.c ============================================================================== --- trunk/src/mainboard/iwill/dk8x/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/iwill/dk8x/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "DK8X "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -18,21 +15,8 @@ unsigned char bus_8111_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, "DK8X ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/jetway/pa78vm5/mptable.c ============================================================================== --- trunk/src/mainboard/jetway/pa78vm5/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/jetway/pa78vm5/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -18,14 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
- #include <console/console.h> #include <arch/smp/mpspec.h> #include <device/pci.h> #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h>
extern u8 bus_isa; @@ -38,32 +36,14 @@ extern u32 sbdn_rs780; extern u32 sbdn_sb700;
- - 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] = "PA78VM5 "; struct mp_config_table *mc; int j;
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, "PA78VM5 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/kontron/986lcd-m/mptable.c ============================================================================== --- trunk/src/mainboard/kontron/986lcd-m/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/kontron/986lcd-m/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -27,30 +27,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] = "986LCD-M "; struct mp_config_table *mc; struct device *riser = NULL, *firewire = NULL; int firewire_bus = 0, riser_bus = 0, isa_bus; int ioapic_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, "986LCD-M ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/kontron/kt690/mptable.c ============================================================================== --- trunk/src/mainboard/kontron/kt690/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/kontron/kt690/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -23,7 +23,6 @@ #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -36,32 +35,14 @@ extern u32 sbdn_rs690; extern u32 sbdn_sb600;
- - 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] = "KT690 "; struct mp_config_table *mc; int j;
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, "KT690 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/msi/ms7135/mptable.c ============================================================================== --- trunk/src/mainboard/msi/ms7135/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/msi/ms7135/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -27,7 +27,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_ck804[6]; @@ -35,9 +34,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] = "MS7135 "; struct mp_config_table *mc; int bus_isa; unsigned sbdn; @@ -46,21 +42,8 @@ sbdn = sysconf.sbdn;
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, "MS-7135 ", LAPIC_ADDR);
smp_write_processors(mc); mptable_write_buses(mc, NULL, &bus_isa);
Modified: trunk/src/mainboard/msi/ms7260/mptable.c ============================================================================== --- trunk/src/mainboard/msi/ms7260/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/msi/ms7260/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -31,33 +31,15 @@ extern unsigned apicid_mcp55; extern unsigned bus_type[256];
- - 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] = "MS-7260 "; struct mp_config_table *mc; unsigned int sbdn; int i, j;
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, "MS-7260 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/msi/ms9185/mptable.c ============================================================================== --- trunk/src/mainboard/msi/ms9185/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/msi/ms9185/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -33,18 +33,11 @@ #if CONFIG_LOGICAL_CPUS==1 #include <cpu/amd/multicore.h> #endif - #include <cpu/amd/amdk8_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "MS9185 "; struct mp_config_table *mc;
unsigned char bus_num; @@ -52,21 +45,8 @@ struct mb_sysconf_t *m;
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, "MS-9185 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/msi/ms9282/mptable.c ============================================================================== --- trunk/src/mainboard/msi/ms9282/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/msi/ms9282/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -27,18 +27,11 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "MS9282 "; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; @@ -46,21 +39,8 @@ int i,j;
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, "MS-9282 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/msi/ms9652_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/msi/ms9652_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/msi/ms9652_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,18 +24,11 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "K9ND MS-9652"; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; @@ -43,21 +36,8 @@ int i,j;
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, "K9ND MS-9652", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/newisys/khepri/mptable.c ============================================================================== --- trunk/src/mainboard/newisys/khepri/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/newisys/khepri/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "KHEPRI "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -18,21 +15,8 @@ unsigned char bus_8111_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, "KHEPRI ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/nvidia/l1_2pvv/mptable.c ============================================================================== --- trunk/src/mainboard/nvidia/l1_2pvv/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/nvidia/l1_2pvv/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,41 +24,20 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "L1_2PVV "; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; - int i,j; unsigned char apicpin[4];
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, "L1_2PVV ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/roda/rk886ex/mptable.c ============================================================================== --- trunk/src/mainboard/roda/rk886ex/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/roda/rk886ex/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -29,29 +29,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] = "RK886EX "; 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, "RK886EX ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/sunw/ultra40/mptable.c ============================================================================== --- trunk/src/mainboard/sunw/ultra40/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/sunw/ultra40/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -35,30 +35,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] = "ultra40 "; struct mp_config_table *mc; - unsigned char bus_num; int i;
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, "Ultra40 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/h8dme/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/h8dme/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/h8dme/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,8 +24,8 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> + extern unsigned char bus_isa; extern unsigned char bus_mcp55[8]; //1
@@ -33,35 +33,16 @@
extern unsigned char bus_pcix[3]; // under bus_mcp55_2
- - 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] = "H8DMR "; struct mp_config_table *mc; unsigned sbdn; - unsigned char bus_num; int i,j;
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, "H8DME-2 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/h8dmr/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/h8dmr/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/h8dmr/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,8 +24,8 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> + extern unsigned char bus_isa; extern unsigned char bus_mcp55[8]; //1
@@ -33,35 +33,16 @@
extern unsigned char bus_pcix[3]; // under bus_mcp55_2
- - 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] = "H8DMR "; struct mp_config_table *mc; unsigned sbdn; - unsigned char bus_num; int i,j;
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, "H8DMR ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/h8dmr_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/h8dmr_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/h8dmr_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,40 +24,19 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "H8DMR "; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; - int i,j;
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, "H8DMR ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/h8qme_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/h8qme_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/h8qme_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,41 +24,21 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h> - #include "mb_sysconf.h"
- extern unsigned sbdn3;
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] = "H8QME "; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; - int i,j;
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, "H8QME-2+ ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/x6dai_g/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/x6dai_g/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/x6dai_g/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -7,30 +7,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] = "X6DAI-G "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; unsigned char bus_6300;
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, "X6DAI-G ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/x6dhe_g/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/x6dhe_g/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/x6dhe_g/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "X6DHE "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -19,21 +16,8 @@ unsigned char bus_esb6300_2;
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, "X6DHE-G ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/x6dhe_g2/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/x6dhe_g2/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/x6dhe_g2/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "X6DHE "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -19,21 +16,8 @@ unsigned char bus_esb6300_2;
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, "X6DHE-G2 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/x6dhr_ig/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/x6dhr_ig/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/x6dhr_ig/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "X6DHR-iG "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -20,21 +17,8 @@ unsigned char bus_ich5r_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, "X6DHR-iG ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/supermicro/x6dhr_ig2/mptable.c ============================================================================== --- trunk/src/mainboard/supermicro/x6dhr_ig2/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/supermicro/x6dhr_ig2/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -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] = "X6DHR-iG "; struct mp_config_table *mc; unsigned char bus_num; unsigned char bus_isa; @@ -20,21 +17,8 @@ unsigned char bus_ich5r_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, "X6DHR-iG2 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/technexion/tim5690/mptable.c ============================================================================== --- trunk/src/mainboard/technexion/tim5690/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/technexion/tim5690/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -23,7 +23,6 @@ #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -36,32 +35,14 @@ extern u32 sbdn_rs690; extern u32 sbdn_sb600;
- - 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] = "TIM5690 "; struct mp_config_table *mc; int j;
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, "TIM5690 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/technexion/tim8690/mptable.c ============================================================================== --- trunk/src/mainboard/technexion/tim8690/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/technexion/tim8690/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -23,7 +23,6 @@ #include <arch/io.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern u8 bus_isa; @@ -36,32 +35,14 @@ extern u32 sbdn_rs690; extern u32 sbdn_sb600;
- - 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] = "TIM8690 "; struct mp_config_table *mc; int j;
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, "TIM8690 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2735/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2735/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2735/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -7,28 +7,12 @@
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] = "S2735 "; struct mp_config_table *mc; int 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, "S2735 ", LAPIC_ADDR);
smp_write_processors(mc); mptable_write_buses(mc, NULL, &isa_bus);
Modified: trunk/src/mainboard/tyan/s2850/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2850/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2850/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -8,7 +8,6 @@ #include <cpu/amd/multicore.h> #endif
- static unsigned node_link_to_bus(unsigned node, unsigned link) { device_t dev; @@ -43,14 +42,9 @@ return 0; }
- 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] = "S2850 "; struct mp_config_table *mc; - int bus_isa; unsigned char bus_chain_0; unsigned char bus_8111_1; @@ -58,21 +52,8 @@ unsigned apicid_8111;
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, "S2850 ", LAPIC_ADDR);
smp_write_processors(mc); {
Modified: trunk/src/mainboard/tyan/s2875/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2875/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2875/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -44,11 +44,7 @@
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] = "S2875 "; struct mp_config_table *mc; - int bus_isa; unsigned char bus_chain_0; unsigned char bus_8111_1; @@ -57,21 +53,8 @@ unsigned apicid_8111;
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, "S2875 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2880/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2880/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2880/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -8,7 +8,6 @@ #include <cpu/amd/multicore.h> #endif
- static unsigned node_link_to_bus(unsigned node, unsigned link) { device_t dev; @@ -43,14 +42,9 @@ return 0; }
- 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] = "S2880 "; struct mp_config_table *mc; - int bus_isa; unsigned char bus_chain_0; unsigned char bus_8131_1; @@ -62,21 +56,8 @@ unsigned apicid_8131_2;
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, "S2880 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2881/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2881/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2881/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -4,7 +4,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -19,41 +18,20 @@
extern unsigned sbdn3;
- - 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] = "S2881 "; struct mp_config_table *mc; - unsigned char bus_num; - int i;
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, "S2881 ", LAPIC_ADDR);
smp_write_processors(mc);
get_bus_conf();
- /*Bus: Bus ID Type*/ /* define bus and isa numbers */ for(bus_num = 0; bus_num < bus_isa; bus_num++) {
Modified: trunk/src/mainboard/tyan/s2882/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2882/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2882/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -9,7 +9,6 @@ #include <cpu/amd/multicore.h> #endif
- static unsigned node_link_to_bus(unsigned node, unsigned link) { device_t dev; @@ -46,11 +45,7 @@
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] = "S2882 "; struct mp_config_table *mc; - unsigned char bus_num; unsigned char bus_isa; unsigned char bus_chain_0; @@ -63,21 +58,8 @@ unsigned apicid_8131_2;
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, "S2882 ", LAPIC_ADDR);
smp_write_processors(mc); {
Modified: trunk/src/mainboard/tyan/s2885/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2885/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2885/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -4,7 +4,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -22,36 +21,15 @@ extern unsigned sbdn3; extern unsigned sbdn5;
- - - 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] = "S2885 "; struct mp_config_table *mc; - unsigned char bus_num; int i;
- 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, "S2885 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2891/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2891/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2891/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -3,7 +3,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -22,35 +21,16 @@
extern unsigned sbdn3;
- - 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] = "S2891 "; struct mp_config_table *mc; unsigned sbdn; - unsigned char bus_num; int i;
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, "S2891 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2892/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2892/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2892/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -3,7 +3,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -22,35 +21,16 @@
extern unsigned sbdn3;
- - 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] = "S2892 "; struct mp_config_table *mc; unsigned sbdn; - unsigned char bus_num; int i;
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, "S2892 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2895/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2895/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2895/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -3,7 +3,6 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h>
extern unsigned char bus_isa; @@ -30,35 +29,16 @@ extern unsigned sbdn3; extern unsigned sbdnb;
- - 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] = "S2895 "; struct mp_config_table *mc; unsigned sbdn; - unsigned char bus_num; int i;
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, "S2895 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2912/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2912/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2912/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,40 +24,19 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdk8_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "S2895 "; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; - int i,j;
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, "S2912 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s2912_fam10/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s2912_fam10/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s2912_fam10/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -24,40 +24,19 @@ #include <device/pci.h> #include <string.h> #include <stdint.h> - #include <cpu/amd/amdfam10_sysconf.h> - #include "mb_sysconf.h"
- - 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] = "S2895 "; struct mp_config_table *mc; struct mb_sysconf_t *m; unsigned sbdn; - int i,j;
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, "S2895 ", LAPIC_ADDR);
smp_write_processors(mc);
Modified: trunk/src/mainboard/tyan/s4880/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s4880/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s4880/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -44,11 +44,7 @@
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] = "S4880 "; struct mp_config_table *mc; - int bus_isa; unsigned char bus_chain_0; unsigned char bus_8131_1; @@ -60,25 +56,11 @@ unsigned apicid_8131_2;
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, "S4880 ", LAPIC_ADDR);
smp_write_processors(mc);
- { device_t dev;
Modified: trunk/src/mainboard/tyan/s4882/mptable.c ============================================================================== --- trunk/src/mainboard/tyan/s4882/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/tyan/s4882/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -8,7 +8,6 @@ #include <cpu/amd/multicore.h> #endif
- static unsigned node_link_to_bus(unsigned node, unsigned link) { device_t dev; @@ -45,11 +44,7 @@
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] = "S4882 "; struct mp_config_table *mc; - int bus_isa; unsigned char bus_chain_0; unsigned char bus_8131_1; @@ -61,25 +56,11 @@ unsigned apicid_8131_2;
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, "S4882 ", LAPIC_ADDR);
smp_write_processors(mc);
- { device_t dev;
Modified: trunk/src/mainboard/via/epia-n/mptable.c ============================================================================== --- trunk/src/mainboard/via/epia-n/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/via/epia-n/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -9,28 +9,12 @@
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] = "P4DPE "; struct mp_config_table *mc; int 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, "EPIA-N ", LAPIC_ADDR);
smp_write_processors(mc); mptable_write_buses(mc, NULL, &isa_bus);
Modified: trunk/src/mainboard/via/pc2500e/mptable.c ============================================================================== --- trunk/src/mainboard/via/pc2500e/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/via/pc2500e/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -32,29 +32,12 @@
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] = "PC2500 "; struct mp_config_table *mc; - int 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, "pc2500e ", LAPIC_ADDR);
smp_write_processors(mc); mptable_write_buses(mc, NULL, &isa_bus);
Modified: trunk/src/mainboard/via/vt8454c/mptable.c ============================================================================== --- trunk/src/mainboard/via/vt8454c/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/src/mainboard/via/vt8454c/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -30,28 +30,12 @@
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] = "VIA VT8454C "; struct mp_config_table *mc; int 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, "VT8454c ", LAPIC_ADDR);
smp_write_processors(mc); mptable_write_buses(mc, NULL, &isa_bus);
Modified: trunk/util/mptable/mptable.c ============================================================================== --- trunk/util/mptable/mptable.c Mon Oct 25 04:12:04 2010 (r5986) +++ trunk/util/mptable/mptable.c Mon Oct 25 17:32:07 2010 (r5987) @@ -307,27 +307,11 @@ "", "static void *smp_write_config_table(void *v)", "{", -" static const char sig[4] = "PCMP";", -" static const char oem[8] = "LNXI ";", -" static const char productid[12] = "P4DPE ";", " struct mp_config_table *mc;", "", " 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, "TODO ", LAPIC_ADDR);", "", " smp_write_processors(mc);", "",