diff mbox

New documentation for the LatticeMicro32 target

Message ID 77a5aebb06185f4de234d720d220fa57@walle.cc (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Walle July 18, 2017, 11:44 a.m. UTC
Am 2017-07-17 17:18, schrieb Programmingkid:
>> On Jul 17, 2017, at 10:56 AM, Programmingkid 
>> <programmingkidx@gmail.com> wrote:
>> 
>> 
>>> On Jul 17, 2017, at 1:40 AM, Michael Walle <michael@walle.cc> wrote:
>>> 
>>> Am 2017-07-09 17:39, schrieb Programmingkid:
>>>> I just made a documentation page for the LatticeMicro32 target. I 
>>>> need
>>>> to know its current status, how much of this system is implemented,
>>>> what software runs on it. If anyone could supply more information 
>>>> that
>>>> would be appreciated. Pictures of this target running would be great
>>>> as well. Thanks.
>>>> Here is the page: 
>>>> http://wiki.qemu.org/Documentation/Platforms/LatticeMico32
>>> 
>>> Hi,
>>> 
>>> thank you for your efforts. I have to admit that the current status 
>>> is unknown.
>>> 
>>> I've just compiled the latest head and it looks like the BQL is 
>>> missing for the interrupt helpers. I'll post a patch soon. With the 
>>> patch, the basic stuff is working but there seems to be an issue with 
>>> OpenGL.
>>> 
>>> You can read the quickstart instructions at:
>>> http://milkymist.walle.cc/README.qemu
>>> 
>>> The flash image isn't working because it will boot right into the 
>>> visualization mode, which is using the OpenGL stuff. The "-kernel 
>>> flickernoise" method is working though. You can get the flickernoise 
>>> binary at:
>>> http://milkymist.walle.cc/updates/current/flickernoise
>>> 
>>> Besides the milkymist emulation, there is plain lm32 emulation based 
>>> on the Lattice reference design which should be ok, because the tests 
>>> are working (make -C tests/tcg/lm32 check)
>>> 
>>> -michael
>> 
>> Thank you for all this information. It has been added to the wiki 
>> page.
>> 
> 
> I just tried qemu-system-lm32 and it crashed.
> 
> Command-line: qemu-system-lm32 -M milkymist -kernel flickernoise
> 
> Error message: audio: Failed to create voice `mm_ac97.in'
> **
> ERROR: /accel/tcg/tcg-all.c:42:tcg_handle_interrupt: assertion failed:
> (qemu_mutex_iothread_locked())
> Abort trap: 6
> 
> Host: Mac OS 10.12.5

As I said before, I guess the BQL is missing here. Try the following 
patch:

  void HELPER(wcsr_jtx)(CPULM32State *env, uint32_t jtx)



-michael

Comments

Programmingkid July 18, 2017, 2:05 p.m. UTC | #1
> On Jul 18, 2017, at 7:44 AM, Michael Walle <michael@walle.cc> wrote:
> 
> Am 2017-07-17 17:18, schrieb Programmingkid:
>>> On Jul 17, 2017, at 10:56 AM, Programmingkid <programmingkidx@gmail.com> wrote:
>>>> On Jul 17, 2017, at 1:40 AM, Michael Walle <michael@walle.cc> wrote:
>>>> Am 2017-07-09 17:39, schrieb Programmingkid:
>>>>> I just made a documentation page for the LatticeMicro32 target. I need
>>>>> to know its current status, how much of this system is implemented,
>>>>> what software runs on it. If anyone could supply more information that
>>>>> would be appreciated. Pictures of this target running would be great
>>>>> as well. Thanks.
>>>>> Here is the page: http://wiki.qemu.org/Documentation/Platforms/LatticeMico32
>>>> Hi,
>>>> thank you for your efforts. I have to admit that the current status is unknown.
>>>> I've just compiled the latest head and it looks like the BQL is missing for the interrupt helpers. I'll post a patch soon. With the patch, the basic stuff is working but there seems to be an issue with OpenGL.
>>>> You can read the quickstart instructions at:
>>>> http://milkymist.walle.cc/README.qemu
>>>> The flash image isn't working because it will boot right into the visualization mode, which is using the OpenGL stuff. The "-kernel flickernoise" method is working though. You can get the flickernoise binary at:
>>>> http://milkymist.walle.cc/updates/current/flickernoise
>>>> Besides the milkymist emulation, there is plain lm32 emulation based on the Lattice reference design which should be ok, because the tests are working (make -C tests/tcg/lm32 check)
>>>> -michael
>>> Thank you for all this information. It has been added to the wiki page.
>> I just tried qemu-system-lm32 and it crashed.
>> Command-line: qemu-system-lm32 -M milkymist -kernel flickernoise
>> Error message: audio: Failed to create voice `mm_ac97.in'
>> **
>> ERROR: /accel/tcg/tcg-all.c:42:tcg_handle_interrupt: assertion failed:
>> (qemu_mutex_iothread_locked())
>> Abort trap: 6
>> Host: Mac OS 10.12.5
> 
> As I said before, I guess the BQL is missing here. Try the following patch:
> 
> diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c
> index 2177c8ad12..93b8d09794 100644
> --- a/target/lm32/op_helper.c
> +++ b/target/lm32/op_helper.c
> @@ -102,12 +102,16 @@ void HELPER(wcsr_dc)(CPULM32State *env, uint32_t dc)
> 
> void HELPER(wcsr_im)(CPULM32State *env, uint32_t im)
> {
> +    qemu_mutex_lock_iothread();
>     lm32_pic_set_im(env->pic_state, im);
> +    qemu_mutex_unlock_iothread();
> }
> 
> void HELPER(wcsr_ip)(CPULM32State *env, uint32_t im)
> {
> +    qemu_mutex_lock_iothread();
>     lm32_pic_set_ip(env->pic_state, im);
> +    qemu_mutex_unlock_iothread();
> }
> 
> void HELPER(wcsr_jtx)(CPULM32State *env, uint32_t jtx)
> 
> 
> 
> -michael
> 

Thank you very much for the patch. It fixed the problem. Now I can take a picture of the screen and add it to the wiki page.
Peter Maydell Jan. 9, 2018, 11:58 a.m. UTC | #2
On 18 July 2017 at 12:44, Michael Walle <michael@walle.cc> wrote:
> Am 2017-07-17 17:18, schrieb Programmingkid:
>> I just tried qemu-system-lm32 and it crashed.
>>
>> Command-line: qemu-system-lm32 -M milkymist -kernel flickernoise
>>
>> Error message: audio: Failed to create voice `mm_ac97.in'
>> **
>> ERROR: /accel/tcg/tcg-all.c:42:tcg_handle_interrupt: assertion failed:
>> (qemu_mutex_iothread_locked())
>> Abort trap: 6
>>
>> Host: Mac OS 10.12.5
>
>
> As I said before, I guess the BQL is missing here. Try the following patch:
>
> diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c
> index 2177c8ad12..93b8d09794 100644
> --- a/target/lm32/op_helper.c
> +++ b/target/lm32/op_helper.c
> @@ -102,12 +102,16 @@ void HELPER(wcsr_dc)(CPULM32State *env, uint32_t dc)
>
>  void HELPER(wcsr_im)(CPULM32State *env, uint32_t im)
>  {
> +    qemu_mutex_lock_iothread();
>      lm32_pic_set_im(env->pic_state, im);
> +    qemu_mutex_unlock_iothread();
>  }
>
>  void HELPER(wcsr_ip)(CPULM32State *env, uint32_t im)
>  {
> +    qemu_mutex_lock_iothread();
>      lm32_pic_set_ip(env->pic_state, im);
> +    qemu_mutex_unlock_iothread();
>  }
>
>  void HELPER(wcsr_jtx)(CPULM32State *env, uint32_t jtx)

I just fell over this, it looks like this fix never made it into master.

Michael, could you submit this as a full patch with a commit message
and signed-off-by, please? cc: qemu-stable@nongnu.org as well, since
it fixes a "breaks the board completely" bug.

thanks
-- PMM
Michael Walle Jan. 9, 2018, 5:04 p.m. UTC | #3
Am 2018-01-09 12:58, schrieb Peter Maydell:
> I just fell over this, it looks like this fix never made it into 
> master.
> 
> Michael, could you submit this as a full patch with a commit message
> and signed-off-by, please? cc: qemu-stable@nongnu.org as well, since
> it fixes a "breaks the board completely" bug.

oops, sorry about that :(

-michael
diff mbox

Patch

diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c
index 2177c8ad12..93b8d09794 100644
--- a/target/lm32/op_helper.c
+++ b/target/lm32/op_helper.c
@@ -102,12 +102,16 @@  void HELPER(wcsr_dc)(CPULM32State *env, uint32_t 
dc)

  void HELPER(wcsr_im)(CPULM32State *env, uint32_t im)
  {
+    qemu_mutex_lock_iothread();
      lm32_pic_set_im(env->pic_state, im);
+    qemu_mutex_unlock_iothread();
  }

  void HELPER(wcsr_ip)(CPULM32State *env, uint32_t im)
  {
+    qemu_mutex_lock_iothread();
      lm32_pic_set_ip(env->pic_state, im);
+    qemu_mutex_unlock_iothread();
  }