<div dir="ltr">I managed to get it to call my callbacks.<div style>Calling PDMDevHlpMMIORegister with the phys address and the full size does not work. By calling PDMDevHlpMMIORegister with smaller sizes (and the correct phys address) it works.</div>
<div style><br></div><div style>Calling PDMDevHlpMMIORegister with phys addr 0x40000000 and size 0x20000000 fails.<br></div><div style>Calling PDMDevHlpMMIORegister 4 times with phys addr 0x40000000, 0x48000000, 0x50000000 and 0x58000000, and size 0x8000000 works.</div>
<div style><br></div><div style>Jose</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 24, 2013 at 10:30 AM, José Massada <span dir="ltr"><<a href="mailto:jose.massada@gmail.com" target="_blank">jose.massada@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Not sure if relevant but I got the following errors on the log (the machine still loads) when using the ICH9 chipset:</div>
<div><br></div><div>00:00:11.500658 VMSetError: /home/vbox/vbox-4.2.10/src/VBox/VMM/VMMR3/PGMPhys.cpp(4502) int pgmPhysFreePage(VM*, GMMFREEPAGESREQ*, uint32_t*, PGMPAGE*, RTGCPHYS); rc=VERR_PGM_PHYS_NOT_RAM</div>
<div>00:00:11.500676 VMSetError: GCPhys=0000000020001000 type=6</div><div>00:00:11.500723 AssertLogRel /home/vbox/vbox-4.2.10/src/VBox/VMM/VMMR3/PGMPhys.cpp(911) int pgmR3PhysFreePageRange(VM*, PGMRAMRANGE*, RTGCPHYS, RTGCPHYS, uint8_t): RT_SUCCESS_NP(rc)</div>

<div>00:00:11.501156 VERR_PGM_PHYS_NOT_RAM (-1639) - Trying to free a page that isn't RAM.</div><div>00:00:11.581464 AssertLogRel /home/vbox/vbox-4.2.10/src/VBox/VMM/VMMR3/PGMPhys.cpp(2248) int PGMR3PhysMMIORegister(VM*, RTGCPHYS, RTGCPHYS, int (*)(VM*, RTGCPHYS, void*, void*, size_t, PGMACCESSTYPE, void*), void*, RTHCUINTPTR, RTR0PTR, RTRCPTR, RTRCPTR, const char*): RT_SUCCESS_NP(rc)</div>

<div>00:00:11.581495 cbRamRange=2097280</div><div><br></div><div><br></div><div>And when using PIIX3, I only get this next one:</div><div><br></div><div><div>00:00:11.926143 AssertLogRel /home/vbox/vbox-4.2.10/src/VBox/VMM/VMMR3/PGMPhys.cpp(2248) int PGMR3PhysMMIORegister(VM*, RTGCPHYS, RTGCPHYS, int (*)(VM*, RTGCPHYS, void*, void*, size_t, PGMACCESSTYPE, void*), void*, RTHCUINTPTR, RTR0PTR, RTRCPTR, RTRCPTR, const char*): RT_SUCCESS_NP(rc)</div>

<div>00:00:11.926178 cbRamRange=2097280</div><div><br></div><div>Jose</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 24, 2013 at 8:18 AM, José Massada <span dir="ltr"><<a href="mailto:jose.massada@gmail.com" target="_blank">jose.massada@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I tried both but lately I've been testing with ICH9. Same behaviour.</div><div><br></div><div>

Jose</div><div><div><div><br>On 24/04/2013, at 08:08, Nikolay Igotti <<a href="mailto:igotti@gmail.com" target="_blank">igotti@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
  
    
  
  
    <div> Which chipset you are using? ICH9
      generally shall be better suited for your needs, due to recent <br>
      PCI features support.<br>
      <br>
        Nikolay<br>
      <br>
      23.04.2013 18:25, José Massada пишет:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div>
          <div>I'm working on a PDM virtual PCI device module and I need
            to have a bar size of 512MB.</div>
          <div>This particular PCI device uses bar 0 and 1 for register
            blocks (64KB each) and bar 2 for memory (this one I need to
            be 512MB or even bigger).</div>
          <div><br>
          </div>
          <div>Registering the memory bar using the MMIO2 functions
            fails when the size is bigger than 256MB (hard coded limit
            in the allocation function) so I tried registering using
            MMIO. It seems to work but my read and write callbacks never
            get called (bar 0 and 1 also use MMIO and their callbacks
            always get called). I tried decreasing the bar 2 size and
            the callbacks got called.</div>
        </div>
        <div><br>
        </div>
        <div>Is this even possible without modifying VBox source code?
          What am I missing?</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Jose</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
vbox-dev mailing list
<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
    </blockquote>
    <br>
  

</div></blockquote></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>