Into a helper function pc_machine_init_smbios() in preparation for
subsequent code to upgrade default SMBIOS entry point type.
Then, call the helper function from the pc_machine_initfn() to eliminate
duplicate code in pc_q35.c and pc_pixx.c. However, this changes the
ordering of when the smbios_set_defaults() is called to before
pc_machine_set_smbios_ep() (i.e. before handling the user specified
QEMU option "-M ...,smbios-entry-point-type=[32|64]" to override
the default type.)
Therefore, also call the helper function in pc_machine_set_smbios_ep()
to update the defaults.
There is no functional change.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
hw/i386/pc.c | 24 +++++++++++++++++++++++-
hw/i386/pc_piix.c | 9 ---------
hw/i386/pc_q35.c | 8 --------
3 files changed, 23 insertions(+), 18 deletions(-)