diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-05-14 16:29:04 +0900 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-05-15 15:33:08 +0000 |
commit | f885f1eaa8711c06033ceb1599e3750fb37c306f (patch) | |
tree | f03808086454c9bd232ec4e2d948a93fe43d6b55 /hw/piix_pci.c | |
parent | b8d6f53986c56dfcffe1961cb01877e81d0f8bb5 (diff) | |
download | qemu-f885f1eaa8711c06033ceb1599e3750fb37c306f.zip qemu-f885f1eaa8711c06033ceb1599e3750fb37c306f.tar.gz qemu-f885f1eaa8711c06033ceb1599e3750fb37c306f.tar.bz2 |
pc, i440fx: Make smm enable/disable function i440fx independent.
make cpu_smm_update() generic to be independent on i440fx by
registering a callback.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r-- | hw/piix_pci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 97519db..aff7f6d 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -114,8 +114,10 @@ static void i440fx_update_memory_mappings(PCII440FXState *d) } } -void i440fx_set_smm(PCII440FXState *d, int val) +static void i440fx_set_smm(int val, void *arg) { + PCII440FXState *d = arg; + val = (val != 0); if (d->smm_enabled != val) { d->smm_enabled = val; @@ -210,6 +212,7 @@ static int i440fx_initfn(PCIDevice *dev) d->dev.config[I440FX_SMRAM] = 0x02; + cpu_smm_register(&i440fx_set_smm, d); return 0; } |