qemu-e2k/include
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
..
authz Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
block block: Add bdrv_qapi_perm_to_blk_perm() 2020-01-06 13:43:06 +01:00
chardev chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
crypto crypto: Fix typo in QCryptoTLSSession's <example> comment 2019-12-18 08:36:15 +01:00
disas plugin: add qemu_plugin_insn_disas helper 2019-10-28 15:12:38 +00:00
exec tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
fpu fpu: make softfloat-macros "self-contained" 2019-08-19 12:07:13 +01:00
hw q35: implement 128K SMRAM at default SMBASE address 2020-01-22 00:23:07 -05:00
io io: Fix Error usage in a comment <example> 2019-12-18 08:36:15 +01:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
monitor hmp: drop Error pointer indirection in hmp_handle_error 2019-12-18 08:36:16 +01:00
net Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
qapi error: make Error **errp const where it is appropriate 2019-12-18 08:36:16 +01:00
qemu migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
qom object: add g_autoptr support 2020-01-02 13:54:57 +04:00
scsi scsi: explicitly list guest-recoverable sense codes 2019-07-15 11:20:42 +02:00
standard-headers linux-headers: Update 2020-01-08 11:01:59 +11:00
sysemu * Compat machines fix (Denis) 2020-01-10 17:16:49 +00:00
tcg tcg: Move TCG headers to include/tcg/ 2020-01-15 15:13:10 -10:00
ui display/gtk: get proper refreshrate 2020-01-14 07:26:36 +01:00
user linux-user: Include trace-root.h in syscall-trace.h 2020-01-15 15:13:09 -10:00
elf.h linux-user: elf: ELF_HWCAP for s390x 2019-06-07 14:53:26 +02:00
glib-compat.h glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
qemu-common.h exec: Split out variable page size support to exec-vary.c 2019-10-28 10:26:02 +01:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00