> On 08/04/2017 08:45, Anthony Xu wrote: > > split PAM SMRAM functions in piix.c > > create mch_init_pam in q35.c > > Could you further move > > MemoryRegion *ram_memory; > MemoryRegion *system_memory; > MemoryRegion *pci_address_space; > PAMMemoryRegion pam_regions[13]; > > from the northbridge devices up to PCMachineState, and move the common > code for PIIX and Q35 to hw/pci-host/pam.c? > > It looks like you can define a better API than what pam.c currently > provides: > > void pc_init_pam(PCMachineState *pc_machine, DeviceState *d); > void pc_update_pam(PCMachineState *pc_machine, uint8_t *pam_config); > > or even remove "DeviceState *d" because the owner of the memory regions > can be the PCMachineState. >
Good idea! Will do. Anthony