BTW, here is a patch that you might want to apply to qemu if you intend
to run RTEMS on leon3. The plug&play area must support byte accesses,
which is used by the RTEMS grlib scanning functions...

Jiri.

On 10/23/19 8:37 PM, Jiri Gaisler wrote:
> Leon3 uses the GRETH ethernet IP core for networking. You would need to
> write a qemu emulation model of it to get networking support. The GRETH
> is fairly well described in the GRLIB IP manual, so it should not be
> impossible. The core is also available in open-source (VHDL) if you need
> to look up some finer details ... :-)
>
> Jiri.
>
> On 10/23/19 6:59 PM, Joshua Shaffer wrote:
>> Does anyone know what needs implemented to get networking supported?
>>
>> Joshua
>>
>> On Wed, Oct 16, 2019 at 6:34 AM Fabien Chouteau <chout...@adacore.com> wrote:
>>> Hello people,
>>>
>>> On 15/10/2019 18:57, Philippe Mathieu-Daudé wrote:
>>>> Hi Joshua,
>>>>
>>>> On 10/15/19 3:17 PM, Joshua Shaffer wrote:
>>>>> Hello,
>>>>>
>>>>> I've been using the LEON3 port of qemu, and am wondering if anyone has 
>>>>> touched the networking setup for such since the thread here: 
>>>>> https://lists.rtems.org/pipermail/users/2014-September/028224.html
>>>> Thanks for sharing this!
>>>>
>>>> Good news, Jiri keeps rebasing his patch with the latest stable version.
>>>> Bad news, he didn't not signed his work with a "Signed-off-by" tag so we 
>>>> can not take this as it into the mainstream repository, see 
>>>> https://wiki.qemu.org/Contribute/SubmitAPatch#Patch_emails_must_include_a_Signed-off-by:_line
>>>>
>>> The Gaisler patches have been rewrote by my colleague Frederic (in CC) and 
>>> they are now in mainstream.
>>> (see https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03869.html)
>>>
>>> But none of them are implementing network support, and I never heard of 
>>> someone working on network for leon3.
>>>
>>> Regards,
>>>
diff --git a/hw/misc/grlib_ahb_apb_pnp.c b/hw/misc/grlib_ahb_apb_pnp.c
index 7338461694..eaaedbfbcc 100644
--- a/hw/misc/grlib_ahb_apb_pnp.c
+++ b/hw/misc/grlib_ahb_apb_pnp.c
@@ -228,6 +228,9 @@ static uint64_t grlib_apb_pnp_read(void *opaque, hwaddr offset, unsigned size)
 {
     APBPnp *apb_pnp = GRLIB_APB_PNP(opaque);
 
+    if (size != 4)
+        return apb_pnp->regs[offset >> 2] >> ((~offset & 3) * 8);
+
     return apb_pnp->regs[offset >> 2];
 }
 

Reply via email to