Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

What cause this problem?

I modify the nios2 cpu and run the program that contains my own defined instruction on linux. After the execution, when I use the command "ls", the following problem will happen and the linux will be rebooted.

-----------------------------------------------------------------------------------------------------------------------------

Buffer layer error at /cygdrive/f/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/fs/buffer.c:1262

This architecture does not implement dump_stack()

attempt to access beyond end of device

-----------------------------------------------------------------------------------------------------------------------------

does someone have ideas what cause this problem?

thanks!

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by ken@Dec 16 2004, 03:22 PM

    out of curiousity, what does your custom instruction do?

    --- Quote End ---

    Oh, I use the instruction "call 0x600000*" to load a certain number of instructions from main memory into onchip memory. The added hardware component will interpret this instruction and load operation.

    Maybe the hardware change the state of the CPU and thus make the linux collapsed?

    Thanks!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That sounds like a distinct possibility... I'm not a low-level programming kinda guy so I couldn't say one way or the other.

    Sorry I can't be of more help...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Okay, you just freaked me out. You've modified the Nios II CPU so that a call instruction to a special address causes data transfers between main memory and onchip memory?

    Here's the way I would recommend doing this. Create a custom instruction that has an Avalon master interface. When you execute the custom instruction, have it perform the equivalent of a DMA operation and do the memory transfer. If you Nios II has a data cache and this data could have been in that cache, it needs to be flushed.