All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] Pad iommu with an empty slot (necessary for SunOS 4.1.4)
@ 2010-05-08 14:10 Artyom Tarasenko
  2010-05-08 14:10 ` [Qemu-devel] [PATCH 2/2] reformatted SS-5 and LX definitions Artyom Tarasenko
  2010-05-09  7:30 ` [Qemu-devel] Re: [PATCH 1/2] Pad iommu with an empty slot (necessary for SunOS 4.1.4) Blue Swirl
  0 siblings, 2 replies; 18+ messages in thread
From: Artyom Tarasenko @ 2010-05-08 14:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, Artyom Tarasenko

On the real hardware (SS-5, LX) the MMU is not padded, but aliased.
Software shouldn't use aliased addresses, neither should it crash
when it uses (on the real hardware it wouldn't). Using empty_slot
instead of aliasing can help with debugging such accesses.
---
 hw/sun4m.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/hw/sun4m.c b/hw/sun4m.c
index 9a79120..e31d039 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -93,7 +93,7 @@
 #define ESCC_CLOCK 4915200
 
 struct sun4m_hwdef {
-    target_phys_addr_t iommu_base, slavio_base;
+    target_phys_addr_t iommu_base, iommu_pad_base, iommu_pad_len, slavio_base;
     target_phys_addr_t intctl_base, counter_base, nvram_base, ms_kb_base;
     target_phys_addr_t serial_base, fd_base;
     target_phys_addr_t afx_base, idreg_base, dma_base, esp_base, le_base;
@@ -850,6 +850,14 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
     iommu = iommu_init(hwdef->iommu_base, hwdef->iommu_version,
                        slavio_irq[30]);
 
+    if (hwdef->iommu_pad_base) {
+        /* On the real hardware (SS-5, LX) the MMU is not padded, but aliased.
+           Software shouldn't use aliased addresses, neither should it crash
+           when does. Using empty_slot instead of aliasing can help with
+           debugging such accesses */
+        empty_slot_init(hwdef->iommu_pad_base,hwdef->iommu_pad_len);
+    }
+
     espdma = sparc32_dma_init(hwdef->dma_base, slavio_irq[18],
                               iommu, &espdma_irq);
 
@@ -961,6 +969,8 @@ static const struct sun4m_hwdef sun4m_hwdefs[] = {
     /* SS-5 */
     {
         .iommu_base   = 0x10000000,
+        .iommu_pad_base = 0x10004000,
+        .iommu_pad_len  = 0x0fffb000,
         .tcx_base     = 0x50000000,
         .cs_base      = 0x6c000000,
         .slavio_base  = 0x70000000,
@@ -1087,6 +1097,8 @@ static const struct sun4m_hwdef sun4m_hwdefs[] = {
     /* LX */
     {
         .iommu_base   = 0x10000000,
+        .iommu_pad_base = 0x10004000,
+        .iommu_pad_len  = 0x0fffb000,
         .tcx_base     = 0x50000000,
         .slavio_base  = 0x70000000,
         .ms_kb_base   = 0x71000000,
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-05-29 15:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-08 14:10 [Qemu-devel] [PATCH 1/2] Pad iommu with an empty slot (necessary for SunOS 4.1.4) Artyom Tarasenko
2010-05-08 14:10 ` [Qemu-devel] [PATCH 2/2] reformatted SS-5 and LX definitions Artyom Tarasenko
2010-05-09  7:44   ` [Qemu-devel] " Blue Swirl
2010-05-09  7:30 ` [Qemu-devel] Re: [PATCH 1/2] Pad iommu with an empty slot (necessary for SunOS 4.1.4) Blue Swirl
2010-05-09  8:29   ` Artyom Tarasenko
2010-05-09  8:48     ` Blue Swirl
2010-05-09 22:32       ` Artyom Tarasenko
2010-05-10 18:27         ` Blue Swirl
2010-05-10 20:51           ` Artyom Tarasenko
2010-05-10 21:05             ` Blue Swirl
2010-05-21 17:23               ` Artyom Tarasenko
2010-05-21 21:12                 ` Blue Swirl
2010-05-25 17:00                   ` Artyom Tarasenko
2010-05-25 19:56                     ` Blue Swirl
2010-05-26 19:04                       ` Artyom Tarasenko
2010-05-27 16:34                         ` Bob Breuer
2010-05-28 21:53         ` Artyom Tarasenko
2010-05-29  8:23           ` Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.