Forum Discussion

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

LCD 16207 + NIOS2 MMU - Kernel Panic

I'm working on tring to run LCD 16207 driver on NIOS2 with MMU. The driver which is included in kernel and relased on this website: http://www.alterawiki.com/wiki/lcd_16207 is I mean for NIOS2 without MMU. When I try to load the module lcd_16207 I get kernel panic

root:/> modprobe lcd_16207

Device /dev/lcd16207 registered

CPU 0 Unable to handle kernel paging request at virtual address 04001000, epc == c3c66000, ra == c3c6d0a4

Kernel panic - not syncing: Oops

In source code I see the write function:

static void WriteNios(unsigned long addr, unsigned long value)
{
        (* (volatile unsigned long *)(addr))=value;
}

When module is tring run it, then kernel panic shows. I think this code is for no-MMU NIOS2.

Is anyone who has successfully run lcd module on MMU Nios?

2 Replies

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

    The 'Unable to handle kernel paging request' error sounds like you are running a system with an mmu.

    A driver written for an mmu-less system won't work (actually, I'm not sure that one works anyway since that write probably need to bypass any data cache as well).

    You need to map the physical addresses into the virtual address space.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    All what you said I know. I'm asking if anyone worked with LCD 16207 on NIOS2 with MMU?

    I'm wondering why drivers in uClinux are not marked which one is for MMU and noMMU NIOS2 version.