Avi Kivity ae0a54664c 440fx: fix PAM, PCI holes
The current implementation of PAM and the PCI holes is broken in several
ways:

  - PCI BARs are not restricted to the PCI hole (a BAR may hide memory)
  - PCI devices do not respect PAM (if a PCI device maps a region while
    PAM maps the region to RAM, the request will be honored)

This patch fixes things by introducing a pci address space, and using
memory region aliases to represent PAM regions, SMRAM, and PCI holes.

The memory hierarchy looks something like

system_memory
 |
 +--- low memory alias (0-0xe0000000)
 |      |
 |      +-- ram@0
 |
 +--- high memory alias (0x100000000-EOM)
 |      |
 |      +-- ram@0xe0000000
 |
 +--- pci hole alias (end of low memory-0x100000000)
 |      |
 |      +-- pci@end-of-low-memory
 |
 |
 +--- pam[n] (0xc0000-0xc3fff etc) (when set to pci, priority 1)
 |      |
 |      +-- pci@0xc4000 etc
 |
 +--- smram (0xa0000-0xbffff) (when set to pci/vga, priority 1)
        |
        +-- pci@0xa0000 etc

ram (simple ram region)

pci
 |
 +--- BARn
 |
 +--- VGA 0xa0000-0xbffff
 |
 +--- ROMs

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22 10:47:49 -05:00
..
2010-06-13 19:00:50 +01:00
2011-07-23 11:26:12 -05:00
2011-04-10 14:00:14 +02:00
2011-04-22 14:41:40 -05:00
2011-07-23 11:26:12 -05:00
2011-08-22 10:20:10 -05:00
2011-08-22 10:20:10 -05:00
2010-06-19 07:47:42 +00:00
2010-05-15 17:36:13 +00:00
2011-07-23 11:26:12 -05:00
2011-08-22 10:20:10 -05:00
2011-07-23 11:26:12 -05:00
2011-08-22 10:20:39 -05:00
2011-08-22 10:20:40 -05:00
2011-07-23 11:26:12 -05:00
2011-08-22 10:20:10 -05:00
2011-08-22 10:20:40 -05:00
2010-11-01 17:57:22 +03:00
2011-08-22 10:17:44 -05:00
2011-07-24 14:48:57 +00:00
2009-11-22 21:27:40 +00:00
2011-07-23 11:26:12 -05:00
2009-11-09 08:43:03 -06:00
2010-12-11 15:24:25 +00:00
2011-08-08 10:22:29 -05:00
2010-02-07 19:28:32 +00:00
2010-07-06 10:36:28 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2010-12-11 15:24:25 +00:00
2010-04-18 08:55:12 +00:00
2011-08-08 10:22:29 -05:00
2009-10-01 16:12:16 -05:00
2011-08-11 11:12:16 +02:00
2011-02-20 09:34:06 +00:00
2009-03-28 16:17:50 +00:00
2009-10-01 16:12:16 -05:00
2011-01-24 20:54:34 +00:00
2011-08-22 10:20:40 -05:00
2009-09-10 19:48:00 +04:00
2010-11-09 16:51:12 +03:00
2011-08-10 14:14:00 +02:00
2010-06-14 11:12:53 -05:00
2011-07-12 20:00:26 +00:00
2011-08-10 14:14:00 +02:00
2011-07-23 11:26:12 -05:00
2011-08-08 10:22:29 -05:00
2011-07-23 11:26:12 -05:00
2010-11-09 16:51:11 +03:00
2010-10-20 12:06:43 +02:00
2011-08-22 10:47:49 -05:00
2011-08-22 10:47:49 -05:00
2011-08-05 12:04:27 -03:00
2011-07-23 11:26:12 -05:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2010-12-11 21:32:47 +00:00
2011-08-08 10:22:29 -05:00
2011-04-22 14:41:43 -05:00
2011-02-11 23:31:17 +01:00
2009-10-01 16:12:16 -05:00
2011-08-22 10:20:10 -05:00
2011-07-12 20:00:28 +00:00
2010-10-19 14:09:06 +02:00
2011-08-08 10:22:30 -05:00
2011-07-23 11:26:12 -05:00
2011-08-08 10:22:29 -05:00
2011-08-08 10:22:29 -05:00
2010-02-07 08:05:03 +00:00
2011-08-22 10:22:03 -05:00
2011-08-08 10:22:29 -05:00
2011-07-30 06:00:40 +02:00
2011-08-22 10:47:49 -05:00
2011-08-22 10:47:49 -05:00
2011-08-22 10:47:49 -05:00
2011-07-27 10:57:22 +03:00
2011-08-22 10:47:49 -05:00
2011-08-22 10:47:49 -05:00
2011-08-22 10:22:03 -05:00
2011-08-22 10:22:03 -05:00
2010-11-22 10:00:06 +02:00
2010-08-24 15:22:24 +00:00
2011-08-22 10:47:49 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-08-17 23:01:47 +00:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-08-22 10:47:42 -05:00
2011-08-22 10:47:42 -05:00
2011-08-22 10:47:42 -05:00
2009-10-01 16:12:16 -05:00
2011-08-08 10:22:29 -05:00
2011-04-01 18:34:55 +02:00
2008-12-13 09:32:43 +00:00
2011-02-25 12:13:38 +01:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2009-10-01 16:12:16 -05:00
2009-10-01 16:12:16 -05:00
2011-08-22 10:20:10 -05:00
2010-12-11 15:24:25 +00:00
2011-08-12 08:31:28 -05:00
2009-10-01 16:12:16 -05:00
2011-06-07 13:52:30 -05:00
2011-08-22 10:47:48 -05:00
2009-10-01 16:12:16 -05:00
2009-10-01 16:12:16 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2009-10-01 16:12:16 -05:00
2011-07-30 09:41:14 +00:00
2011-07-12 20:00:33 +00:00
2009-10-01 16:12:16 -05:00
2011-07-30 06:21:31 +02:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2009-10-01 16:12:16 -05:00
2011-04-22 14:41:40 -05:00
2011-04-22 14:41:40 -05:00
2011-08-22 10:47:48 -05:00
2011-08-22 10:47:48 -05:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2011-08-10 14:14:00 +02:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2010-04-04 21:18:26 +01:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2011-08-10 14:14:00 +02:00
2011-08-08 10:22:30 -05:00
2011-03-22 07:44:15 +01:00
2011-02-14 12:39:46 -02:00
2011-07-26 06:43:11 +02:00
2011-04-08 11:32:21 +02:00
2010-10-20 12:06:50 +02:00
2011-07-30 07:08:30 +02:00