diff options
Diffstat (limited to 'src/mainboard/tyan')
-rw-r--r-- | src/mainboard/tyan/s2735/mptable.c | 18 | ||||
-rw-r--r-- | src/mainboard/tyan/s2850/mptable.c | 23 | ||||
-rw-r--r-- | src/mainboard/tyan/s2875/mptable.c | 21 | ||||
-rw-r--r-- | src/mainboard/tyan/s2880/mptable.c | 23 | ||||
-rw-r--r-- | src/mainboard/tyan/s2881/mptable.c | 26 | ||||
-rw-r--r-- | src/mainboard/tyan/s2882/mptable.c | 22 | ||||
-rw-r--r-- | src/mainboard/tyan/s2885/mptable.c | 26 | ||||
-rw-r--r-- | src/mainboard/tyan/s2891/mptable.c | 24 | ||||
-rw-r--r-- | src/mainboard/tyan/s2892/mptable.c | 24 | ||||
-rw-r--r-- | src/mainboard/tyan/s2895/mptable.c | 24 | ||||
-rw-r--r-- | src/mainboard/tyan/s2912/mptable.c | 25 | ||||
-rw-r--r-- | src/mainboard/tyan/s2912_fam10/mptable.c | 25 | ||||
-rw-r--r-- | src/mainboard/tyan/s4880/mptable.c | 22 | ||||
-rw-r--r-- | src/mainboard/tyan/s4882/mptable.c | 23 |
14 files changed, 27 insertions, 299 deletions
diff --git a/src/mainboard/tyan/s2735/mptable.c b/src/mainboard/tyan/s2735/mptable.c index 5e4afaee01..3e47388f0b 100644 --- a/src/mainboard/tyan/s2735/mptable.c +++ b/src/mainboard/tyan/s2735/mptable.c @@ -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); diff --git a/src/mainboard/tyan/s2850/mptable.c b/src/mainboard/tyan/s2850/mptable.c index d452dd9c3a..bc61e8e4d6 100644 --- a/src/mainboard/tyan/s2850/mptable.c +++ b/src/mainboard/tyan/s2850/mptable.c @@ -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 @@ static unsigned node_link_to_bus(unsigned node, unsigned link) 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 @@ static void *smp_write_config_table(void *v) 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); { diff --git a/src/mainboard/tyan/s2875/mptable.c b/src/mainboard/tyan/s2875/mptable.c index a2aa275e34..db159d0a01 100644 --- a/src/mainboard/tyan/s2875/mptable.c +++ b/src/mainboard/tyan/s2875/mptable.c @@ -44,11 +44,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link) 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 @@ static void *smp_write_config_table(void *v) 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); diff --git a/src/mainboard/tyan/s2880/mptable.c b/src/mainboard/tyan/s2880/mptable.c index 176aed2212..970b5a53ef 100644 --- a/src/mainboard/tyan/s2880/mptable.c +++ b/src/mainboard/tyan/s2880/mptable.c @@ -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 @@ static unsigned node_link_to_bus(unsigned node, unsigned link) 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 @@ static void *smp_write_config_table(void *v) 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); diff --git a/src/mainboard/tyan/s2881/mptable.c b/src/mainboard/tyan/s2881/mptable.c index 3e9c55d5d4..e7ffe14b8e 100644 --- a/src/mainboard/tyan/s2881/mptable.c +++ b/src/mainboard/tyan/s2881/mptable.c @@ -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 apicid_8131_2; 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++) { diff --git a/src/mainboard/tyan/s2882/mptable.c b/src/mainboard/tyan/s2882/mptable.c index f824025cc8..8c51e65e76 100644 --- a/src/mainboard/tyan/s2882/mptable.c +++ b/src/mainboard/tyan/s2882/mptable.c @@ -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 unsigned node_link_to_bus(unsigned node, unsigned link) 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 @@ static void *smp_write_config_table(void *v) 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); { diff --git a/src/mainboard/tyan/s2885/mptable.c b/src/mainboard/tyan/s2885/mptable.c index 3d2d5a939f..b918b354ed 100644 --- a/src/mainboard/tyan/s2885/mptable.c +++ b/src/mainboard/tyan/s2885/mptable.c @@ -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 apicid_8131_2; 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); diff --git a/src/mainboard/tyan/s2891/mptable.c b/src/mainboard/tyan/s2891/mptable.c index b2571b1a6d..f641d9ef4e 100644 --- a/src/mainboard/tyan/s2891/mptable.c +++ b/src/mainboard/tyan/s2891/mptable.c @@ -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 apicid_8131_2; 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); diff --git a/src/mainboard/tyan/s2892/mptable.c b/src/mainboard/tyan/s2892/mptable.c index f30e0d737a..37737a792e 100644 --- a/src/mainboard/tyan/s2892/mptable.c +++ b/src/mainboard/tyan/s2892/mptable.c @@ -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 apicid_8131_2; 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); diff --git a/src/mainboard/tyan/s2895/mptable.c b/src/mainboard/tyan/s2895/mptable.c index 3c857ed875..4128cff786 100644 --- a/src/mainboard/tyan/s2895/mptable.c +++ b/src/mainboard/tyan/s2895/mptable.c @@ -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 apicid_ck804b; 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); diff --git a/src/mainboard/tyan/s2912/mptable.c b/src/mainboard/tyan/s2912/mptable.c index ec1fea7ef8..018ea90054 100644 --- a/src/mainboard/tyan/s2912/mptable.c +++ b/src/mainboard/tyan/s2912/mptable.c @@ -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); diff --git a/src/mainboard/tyan/s2912_fam10/mptable.c b/src/mainboard/tyan/s2912_fam10/mptable.c index d8b6f8e31c..68c68555f4 100644 --- a/src/mainboard/tyan/s2912_fam10/mptable.c +++ b/src/mainboard/tyan/s2912_fam10/mptable.c @@ -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); diff --git a/src/mainboard/tyan/s4880/mptable.c b/src/mainboard/tyan/s4880/mptable.c index edef047c9b..b0952633e6 100644 --- a/src/mainboard/tyan/s4880/mptable.c +++ b/src/mainboard/tyan/s4880/mptable.c @@ -44,11 +44,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link) 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,24 +56,10 @@ static void *smp_write_config_table(void *v) 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; - smp_write_processors(mc); + mptable_init(mc, "S4880 ", LAPIC_ADDR); + smp_write_processors(mc); { device_t dev; diff --git a/src/mainboard/tyan/s4882/mptable.c b/src/mainboard/tyan/s4882/mptable.c index 1c791fcfd2..fb6f91e76f 100644 --- a/src/mainboard/tyan/s4882/mptable.c +++ b/src/mainboard/tyan/s4882/mptable.c @@ -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 unsigned node_link_to_bus(unsigned node, unsigned link) 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,24 +56,10 @@ static void *smp_write_config_table(void *v) 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; - smp_write_processors(mc); + mptable_init(mc, "S4882 ", LAPIC_ADDR); + smp_write_processors(mc); { device_t dev; |