Hi, On Wed, Jul 11, 2012 at 06:48:38PM +0800, Wen Congyang wrote: > > + if (enabled) > > + add_e820(mem_base, mem_len, E820_RAM); > > add_e820() is declared in memmap.h. You should include this header file, > otherwise, seabios cannot be built. thanks. you had the same comment on v1 but I forgot to address it. I will update. - Vasilis > > Thanks > Wen Congyang > > > + memslot_status = memslot_status >> 1; > > + entry++; > > + } > > + build_header((void*)ssdt, SSDT_SIGNATURE, ssdt_ptr - ssdt, 1); > > + > > + return ssdt; > > +} > > + > > #include "ssdt-pcihp.hex" > > > > #define PCI_RMV_BASE 0xae0c > > @@ -618,9 +739,6 @@ build_srat(void) > > { > > int nb_numa_nodes = qemu_cfg_get_numa_nodes(); > > > > - if (nb_numa_nodes == 0) > > - return NULL; > > - > > u64 *numadata = malloc_tmphigh(sizeof(u64) * (MaxCountCPUs + nb_numa_nodes)); > > if (!numadata) { > > warn_noalloc(); > > @@ -629,10 +747,11 @@ build_srat(void) > > > > qemu_cfg_get_numa_data(numadata, MaxCountCPUs + nb_numa_nodes); > > > > + qemu_cfg_get_numa_data(&nb_hp_memslots, 1); > > struct system_resource_affinity_table *srat; > > int srat_size = sizeof(*srat) + > > sizeof(struct srat_processor_affinity) * MaxCountCPUs + > > - sizeof(struct srat_memory_affinity) * (nb_numa_nodes + 2); > > + sizeof(struct srat_memory_affinity) * (nb_numa_nodes + nb_hp_memslots + 2); > > > > srat = malloc_high(srat_size); > > if (!srat) { > > @@ -667,7 +786,7 @@ build_srat(void) > > * from 640k-1M and possibly another one from 3.5G-4G. > > */ > > struct srat_memory_affinity *numamem = (void*)core; > > - int slots = 0; > > + int slots = 0, node; > > u64 mem_len, mem_base, next_base = 0; > > > > acpi_build_srat_memory(numamem, 0, 640*1024, 0, 1); > > @@ -694,10 +813,36 @@ build_srat(void) > > next_base += (1ULL << 32) - RamSize; > > } > > acpi_build_srat_memory(numamem, mem_base, mem_len, i-1, 1); > > + > > numamem++; > > slots++; > > + > > + } > > + mem = (void*)numamem; > > + > > + if (nb_hp_memslots) { > > + u64 *hpmemdata = malloc_tmphigh(sizeof(u64) * (3 * nb_hp_memslots)); > > + if (!hpmemdata) { > > + warn_noalloc(); > > + free(hpmemdata); > > + free(numadata); > > + return NULL; > > + } > > + > > + qemu_cfg_get_numa_data(hpmemdata, 3 * nb_hp_memslots); > > + > > + for (i = 1; i < nb_hp_memslots + 1; ++i) { > > + mem_base = *hpmemdata++; > > + mem_len = *hpmemdata++; > > + node = *hpmemdata++; > > + acpi_build_srat_memory(numamem, mem_base, mem_len, node, 1); > > + numamem++; > > + slots++; > > + } > > + free(hpmemdata); > > } > > - for (; slots < nb_numa_nodes + 2; slots++) { > > + > > + for (; slots < nb_numa_nodes + nb_hp_memslots + 2; slots++) { > > acpi_build_srat_memory(numamem, 0, 0, 0, 0); > > numamem++; > > } > > @@ -748,6 +893,7 @@ acpi_bios_init(void) > > ACPI_INIT_TABLE(build_madt()); > > ACPI_INIT_TABLE(build_hpet()); > > ACPI_INIT_TABLE(build_srat()); > > + ACPI_INIT_TABLE(build_memssdt()); > > ACPI_INIT_TABLE(build_pcihp()); > > > > u16 i, external_tables = qemu_cfg_acpi_additional_tables(); > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html