qemu-e2k/hw/i386
Igor Mammedov f404220e27 q35: implement 128K SMRAM at default SMBASE address
It's not what real HW does, implementing which would be overkill [**]
and would require complex cross stack changes (QEMU+firmware) to make
it work.
So considering that SMRAM is owned by MCH, for simplicity (ab)use
reserved Q35 register, which allows QEMU and firmware easily init
and make RAM at SMBASE available only from SMM context.

Patch uses commit (2f295167e0 q35/mch: implement extended TSEG sizes)
for inspiration and uses reserved register in config space at 0x9c
offset [*] to extend q35 pci-host with ability to use 128K at
0x30000 as SMRAM and hide it (like TSEG) from non-SMM context.

Usage:
  1: write 0xff in the register
  2: if the feature is supported, follow up read from the register
     should return 0x01. At this point RAM at 0x30000 is still
     available for SMI handler configuration from non-SMM context
  3: writing 0x02 in the register, locks SMBASE area, making its contents
     available only from SMM context. In non-SMM context, reads return
     0xff and writes are ignored. Further writes into the register are
     ignored until the system reset.

*) https://www.mail-archive.com/qemu-devel@nongnu.org/msg455991.html
**) https://www.mail-archive.com/qemu-devel@nongnu.org/msg646965.html

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1575896942-331151-3-git-send-email-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
2020-01-22 00:23:07 -05:00
..
kvm hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler() 2019-12-17 19:33:51 +01:00
xen hw/pci-host/piix: Define and use the PIIX IRQ Route Control Registers 2019-11-05 23:33:12 +01:00
acpi-build.c hmat acpi: Build Memory Proximity Domain Attributes Structure(s) 2020-01-05 07:03:03 -05:00
acpi-build.h
amd_iommu.c hw/i386/amd_iommu: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
amd_iommu.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
e820_memory_layout.c hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
e820_memory_layout.h hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
fw_cfg.c x86: move more x86-generic functions out of PC files 2019-12-17 19:33:50 +01:00
fw_cfg.h x86: move more x86-generic functions out of PC files 2019-12-17 19:33:50 +01:00
intel_iommu_internal.h intel_iommu: add present bit check for pasid table entries 2020-01-06 12:04:51 -05:00
intel_iommu.c intel_iommu: add present bit check for pasid table entries 2020-01-06 12:04:51 -05:00
Kconfig hw/i386/Kconfig: Let the MicroVM machine select the SERIAL_ISA config 2020-01-07 12:08:39 +01:00
kvmvapic.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
Makefile.objs hw/i386/pc: Extract the port92 device 2019-12-17 19:33:51 +01:00
microvm.c x86: move more x86-generic functions out of PC files 2019-12-17 19:33:50 +01:00
multiboot.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
multiboot.h
pc_piix.c hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35 2020-01-07 12:08:39 +01:00
pc_q35.c hw: fix using 4.2 compat in 5.0 machine types for i440fx/q35 2020-01-07 12:08:39 +01:00
pc_sysfw.c hw/i386/pc: move shared x86 functions to x86.c and export them 2019-10-22 09:38:42 +02:00
pc.c q35: implement 128K SMRAM at default SMBASE address 2020-01-22 00:23:07 -05:00
port92.c hw/i386/pc: Extract the port92 device 2019-12-17 19:33:51 +01:00
trace-events hw/i386/pc: Extract the port92 device 2019-12-17 19:33:51 +01:00
vmmouse.c vmmouse: replace PROP_PTR with PROP_LINK 2020-01-07 17:24:29 +04:00
vmport.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
x86-iommu-stub.c hw/i386/x86-iommu: Add missing stubs 2020-01-09 11:41:25 +00:00
x86-iommu.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
x86.c hw/i386/pc: fix regression in parsing vga cmdline parameter 2020-01-07 12:08:39 +01:00