[okl4-developer] unhandled page fault - please help

Gabi Voiculescu boy3dfx2 at yahoo.com
Thu Mar 6 12:23:10 EST 2008


Hello again and sorry for being so pushy.

I have made a stub driver for LCD under PXA in two ways: with my own h file and with a dx file. My current goal is to trigger the LCD to appear in Skyeye.

I have edited device_core.c for platform/pxa/iguana/devicecore/src/ in the scan_devices function to include the following:
    printf("looking for LCD device...memsection lookup\n");                    //
     memsection_lookup((objref_t) env_memsection_base(iguana_getenv("OKL4_VLCD_SERVER")),    //
                    &server_);                                    //
    printf("assigning to lcd_server\n");                        //
    lcd_server = thread_l4tid(server_);                        //
    printf ("device_add_resource (...MEMEORY_RESOURCE..); thread ID ...\n");    
    device_add_resource(lcd_server, /*LCD_PHYS*/ 0x44000000, 0, MEMORY_RESOURCE, &env);//LCD_PHYS=0x44000000 for pxa255
    printf ("device_add_resource (...INTERRUPT_RESOURCE..): \n");
    device_add_resource(lcd_server, 17 ,0, INTERRUPT_RESOURCE,&env);    //
    printf ("assigning to device\n");                    // 17 is interrupt for LCD 
    device = device_create(lcd_server, &me, LCD, &env);            //  table on page 11 e     
    printf ("assigning device to lcd_device\n");                //  PXA 255 developers guid
    lcd_device = device.ref.obj;                                                            //
    printf ("Done with LCD...anything pop up?\n");

I have also modified the gumstix class in machines.py of platform/pxa by adding lcd driver called pxa_lcd. Here I copy-pasted class gumstix and added the lcd reference whenever necessary.
class gumstix2(pxa):
    virtual = False
    timer_driver = "pxa250_timer"
    lcd_driver= "pxa_lcd_dx"
    uart = "FFUART"
    subplatform = "pxa255"    
    drivers = [timer_driver, lcd_driver] + pxa.drivers

    device_core = "gumstix"
    v2_drivers = [  ("pxa250_timer", "vtimer"),
                    ("pxa_lcd_dx","vlcd"),
                    ("uart_8250", "vserial"),
                 ]


    skyeye = "gumstix2.skyeye"
    memory = pxa.memory.copy()
    memory['physical'] = [(0xa0000000L, 0xa3800000L)]
    memory['rom'] = [(0xa3800000L, 0xa4000000L)]
    cpp_defines = pxa.cpp_defines + [("PLATFORM_PXA", 1), ("SERIAL_FFUART", 1)]
    run_methods = copy.copy(pxa.run_methods)
    run_methods['hardware'] = gumstix_boot

Gumstix2.skyeye is the same as gumstix.skyeye except for the lcd line:
lcd: state=on, type=pxa, mod=gtk

After building the naming example for the gumstix2 machine I get the output
scons: done building targets.
[gabi at vlad okl4_release_1.5.2]$ skyeye -c tools/sim_config/gumstix2.skyeye -e build4/images/image.boot
big_endian is false.
arch: arm
cpu info: xscale, pxa25x, 69052100, fffffff0, 2 
mach info: name pxa_lubbock, mach_init addr 0x806db10
lcd_mod:1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use xscale mmu ops
exec file "build4/images/image.boot"'s format is elf32-little.
load section kernel.text: addr = 0xa0000000  size = 0x00010814.
load section kernel.glue_7: addr = 0xa0010814  size = 0x00000000.
load section kernel.glue_7t: addr = 0xa0010814  size = 0x00000000.
load section kernel.rodata: addr = 0xa0010814  size = 0x00003d61.
load section kernel.kdebug: addr = 0xa0014575  size = 0x0000452b.
load section kernel.init: addr = 0xa0018aa0  size = 0x0000218c.
load section kernel.data: addr = 0xa001b000  size = 0x00001b94.
load section kernel.got: addr = 0xa001cb94  size = 0x00000004.
load section kernel.got.plt: addr = 0xa001cb98  size = 0x0000000c.
load section kernel.kdebug-data: addr = 0xa001cba4  size = 0x00000388.
not load section kernel.bss: addr = 0xa001cf2c  size = 0x00002608 .
load section kernel.kspace: addr = 0xa0020000  size = 0x00004000.
load section kernel.kip: addr = 0xa0024000  size = 0x00000a94.
load section kernel.traps: addr = 0xa0025000  size = 0x00001000.
load section ig_server.text: addr = 0xa0030000  size = 0x0000f5b4.
load section ig_server.rodata: addr = 0xa003f5b8  size = 0x00001b63.
load section ig_server.data: addr = 0xa0049120  size = 0x0000021c.
load section ig_server.got: addr = 0xa004933c  size = 0x00000010.
not load section ig_server.bss: addr = 0xa004a000  size = 0x00012000 .
load section ig_naming.text: addr = 0xa0028000  size = 0x000074bc.
load section ig_naming.rodata: addr = 0xa002f4c0  size = 0x000009a3.
load section ig_naming.data: addr = 0xa0026e64  size = 0x000000d8.
load section ig_naming.got: addr = 0xa0026f3c  size = 0x00000010.
not load section ig_naming.bss: addr = 0xa0026f4c  size = 0x0000006c .
load section event.text: addr = 0xa005c000  size = 0x00006b70.
load section event.rodata: addr = 0xa0062b70  size = 0x00000953.
load section event.data: addr = 0xa00644c4  size = 0x000000d8.
load section event.got: addr = 0xa006459c  size = 0x00000010.
not load section event.bss: addr = 0xa00645ac  size = 0x00000094 .
load section vtimer.text: addr = 0xa0068000  size = 0x00008110.
load section vtimer.rodata: addr = 0xa0070110  size = 0x00000d33.
load section vtimer.data: addr = 0xa0065e44  size = 0x00000114.
load section vtimer.got: addr = 0xa0065f58  size = 0x00000010.
not load section vtimer.bss: addr = 0xa0065f68  size = 0x0000006c .
load section vlcd.text: addr = 0xa0078000  size = 0x0000783c.
load section vlcd.rodata: addr = 0xa007f840  size = 0x00000a13.
load section vlcd.data: addr = 0xa0066254  size = 0x00000110.
load section vlcd.got: addr = 0xa0066364  size = 0x00000010.
not load section vlcd.bss: addr = 0xa0066374  size = 0x00000074 .
load section vserial.text: addr = 0xa0088000  size = 0x00007d18.
load section vserial.rodata: addr = 0xa008fd18  size = 0x00000acb.
load section vserial.data: addr = 0xa00717e4  size = 0x00000104.
load section vserial.got: addr = 0xa00718e8  size = 0x00000010.
not load section vserial.bss: addr = 0xa00718f8  size = 0x0000007c .
load section devicecore.text: addr = 0xa0094000  size = 0x00007414.
load section devicecore.rodata: addr = 0xa009b418  size = 0x00000af3.
load section devicecore.data: addr = 0xa0072000  size = 0x000000d8.
load section devicecore.got: addr = 0xa00720d8  size = 0x00000010.
not load section devicecore.bss: addr = 0xa00720e8  size = 0x00000084 .
load section naming_example.text: addr = 0xa009c000  size = 0x00007348.
load section naming_example.rodata: addr = 0xa00a3348  size = 0x00000cb3.
load section naming_example.data: addr = 0xa0073000  size = 0x000000d8.
load section naming_example.got: addr = 0xa00730d8  size = 0x00000010.
not load section naming_example.bss: addr = 0xa00730e8  size = 0x00000068 .
load section bootinfo: addr = 0xa00a4000  size = 0x00005000.
call ARMul_InitSymTable,kernel filename is build4/images/image.boot. 
start addr is set to 0xa0000000 by exec file.

OKL4 - (provider: Open Kernel Labs) built on Mar  5 2008 16:09:47 using gcc version 3.4.4.

 *****************************************
 *  Iguana system, Copyright 1996-2006   *
 *  ERTOS - National ICT Australia       *
 *****************************************

vbase is 0xa4000000, vend is 0xcfffffff
addr is 0xa4000000, vbase is 0xa4000000
doing setup
looking for LCD device...memsection lookup
assigning to lcd_server
device_add_resource (...MEMEORY_RESOURCE..); thread ID ...
adding mem 0x8040b000 to 0x8007feb0
device_add_resource (...INTERRUPT_RESOURCE..): 
assigning to device
Unhandled page fault:
  addr=0x4/??? priv=R
  ip=0x8040317c, sp=80048ea0
  pd=0x800271d8 thread=0x1e8001

I can't figure out what I did wrong. Where could this page fault be generated from?

Gabi Voiculescu








PS: It might help to know the current pxa_lcd_dx.dx:
<device name="pxa_lcd_dx">
<!--
....
i took out the text here to keep the mail small

....
-->


<state name="deep_standby" />
<state name="sleep" />
<state name="normal" />

<interface name="fb" interface_type="fb" />
                                                                                            
<resource name="jbt_space" rtype="bus_space_t" />
<block name="jbt" space="jbt_space" space_type="bus" register_size="8">

</block>

                                                                                            
<resource name="pxa_space" rtype="mem_space_t" />                                           
<block name="pxa" space="pxa_space" space_type="mem" register_size="32">                    
                                                                                            
 <register name="lccr0"   offset="0x00" type="rw">                                                                                                            
         <field name="enb"        bits="0"    />   <!-- LCD Controller Enable               -->                
         <field name="cms"      bits="1"  />     <!-- Color/Monochrome Select           -->                                          
    <field name="sds"      bits="2"  />     <!-- Single/Double panel Display Select       -->                           
    <field name="ldm"        bits="3"    />   <!-- LCD Disambe Done Mask             -->                                
         <field name="sfm"       bits="4" />      <!-- Start of Frame Mask               -->                                      
         <field name="ium"    bits="5"/>       <!-- Input FIFO Underrun Mask            -->                       
    <field name="efm"    bits="6"/>       <!-- End of Frame Mask                 -->                                              
    <field name="pas"    bits="7"/>       <!-- Pasive/Active Display               -->                                
    <field name="8rsv"    bits="8"/>       <!-- Reserved                  -->                                  
    <field name="dpd"    bits="9"/>       <!-- LCD Double Pixel Data pin mode           -->                            
    <field name="dis"    bits="10"/>      <!-- LCD is Disabled               -->                                  
    <field name="qdm"    bits="11"/>      <!-- LCD Quick Disable Mask              -->                              
    <field name="pdd"    bits="19:12"/>   <!-- Palette DMA Request Delay            -->                   
    <field name="bm"    bits="20"/>      <!-- Branch Mask                   -->                              
    <field name="oum"    bits="21"/>      <!-- FIFO Underrun Error Interrupt Enable        -->                                
    <field name="ursv"    bits="31:22"/>   <!-- Reserved                  -->                
      </register>                                                                           
                                                                                            
 <register name="lccr1"   offset="0x04" type="rw">                                          
         <field name="blw"        bits="31:24"       />       <!-- Pixels per line                 -->                    
    <field name="elw"      bits="23:16"      />         <!-- Horizontal sync pulse width    -->                    
    <field name="hsw"      bits="15:10"      />         <!-- End of line pixel clock wait    -->                    
    <field name="ppl"        bits="9:0"        />       <!-- Beginning of line pixel clock wait    -->                                                                                     
 </register>                                                                                
                                                                                            
 <register name="lccr2"   offset="0x08" type="rw">                                                     
     
 </register>
 
 <register name="lccr3"   offset="0x0c" type="rw">
     
 </register>
 
</block>

</device>



and device_enable_impl() in pxa_lcd_dx.c:

static int
device_enable_impl(struct device_interface *di, struct pxa_lcd_dx *device)
{

#if 0

#else
    lccr0_write(0x00000001);
    lccr1_write(0x00000000);
    lccr2_write(0x00000000);
    lccr3_write(0x00000000);
    
#endif

    device->state = STATE_NORMAL;

    dprintf("%s: done\n", __func__);

    return DEVICE_ENABLED;
}


       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080305/c157a104/attachment-0001.htm 


More information about the Developer mailing list