|
@@ -568,6 +568,16 @@ static void mch_realize(PCIDevice *d, Error **errp)
|
|
/* setup pci memory mapping */
|
|
/* setup pci memory mapping */
|
|
pc_pci_as_mapping_init(mch->system_memory, mch->pci_address_space);
|
|
pc_pci_as_mapping_init(mch->system_memory, mch->pci_address_space);
|
|
|
|
|
|
|
|
+ /* PAM */
|
|
|
|
+ init_pam(&mch->pam_regions[0], OBJECT(mch), mch->ram_memory,
|
|
|
|
+ mch->system_memory, mch->pci_address_space,
|
|
|
|
+ PAM_BIOS_BASE, PAM_BIOS_SIZE);
|
|
|
|
+ for (i = 0; i < ARRAY_SIZE(mch->pam_regions) - 1; ++i) {
|
|
|
|
+ init_pam(&mch->pam_regions[i + 1], OBJECT(mch), mch->ram_memory,
|
|
|
|
+ mch->system_memory, mch->pci_address_space,
|
|
|
|
+ PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE);
|
|
|
|
+ }
|
|
|
|
+
|
|
/* if *disabled* show SMRAM to all CPUs */
|
|
/* if *disabled* show SMRAM to all CPUs */
|
|
memory_region_init_alias(&mch->smram_region, OBJECT(mch), "smram-region",
|
|
memory_region_init_alias(&mch->smram_region, OBJECT(mch), "smram-region",
|
|
mch->pci_address_space, MCH_HOST_BRIDGE_SMRAM_C_BASE,
|
|
mch->pci_address_space, MCH_HOST_BRIDGE_SMRAM_C_BASE,
|
|
@@ -634,15 +644,6 @@ static void mch_realize(PCIDevice *d, Error **errp)
|
|
|
|
|
|
object_property_add_const_link(qdev_get_machine(), "smram",
|
|
object_property_add_const_link(qdev_get_machine(), "smram",
|
|
OBJECT(&mch->smram));
|
|
OBJECT(&mch->smram));
|
|
-
|
|
|
|
- init_pam(&mch->pam_regions[0], OBJECT(mch), mch->ram_memory,
|
|
|
|
- mch->system_memory, mch->pci_address_space,
|
|
|
|
- PAM_BIOS_BASE, PAM_BIOS_SIZE);
|
|
|
|
- for (i = 0; i < ARRAY_SIZE(mch->pam_regions) - 1; ++i) {
|
|
|
|
- init_pam(&mch->pam_regions[i + 1], OBJECT(mch), mch->ram_memory,
|
|
|
|
- mch->system_memory, mch->pci_address_space,
|
|
|
|
- PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
uint64_t mch_mcfg_base(void)
|
|
uint64_t mch_mcfg_base(void)
|