qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Help initializing a hw module


From: Juan Antonio Moya Vicén
Subject: Re: [Qemu-devel] Help initializing a hw module
Date: Thu, 03 Feb 2011 15:22:30 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11

I'm sorry I made a typo.

The code in the kernel module that makes the call REALLY IS:
         iobase = ioremap(0xFED40000, 0x5000);
         if(ioread8(iobase) == 0)
            return -ENODEV;



On 03/02/11 14:58, Juan Antonio Moya Vicén wrote:
> Hi list,
> I'm new to qemu, and developing a new hw module. And I'll appreciate any
> help or link any of you can provide relating to the following problem
> I'm experiencing, that I'm certain it is because of inexperience:
>
>
> I'm getting ENODEV error codes each time I load the kernel module for my
> specific device.
>
> ** I have a guest OS Linux. The hw I'm emulating is a stupid device,
> whose kernel module tries to find at a certain IO mem position: 0xFED40000
> The code in the kernel module that makes the call:
>          ioremap(0xFED40000, 0x5000);
>          if(ioread8(0xFED40000) == 0)
>             return -ENODEV;
>
> ** My device initialization code in qemu:
>
> static uint32_t my_access_read(void* opaque, target_phys_addr_t addr) {
>     return (uint32_t) 0xFF;
> }
> static CPUReadMemoryFunc* const my_access_read_str[3] = {
> my_access_read, NULL, NULL };
>
> void my_register_function(void) {
>         int addr = cpu_register_io_memory(my_access_read_str, NULL, s);
>         cpu_register_physical_memory(0xFED40000, 0x5000, addr);
> }
>
>
> ** I do know that Qemu is calling and executing "my_register_function()"
> ** I do know that the guest OS kernel module is executing the two lines
> I pasted before.
>
> But looks like "my_access_read()" function gets never called. Do you
> guys have any idea how to fix this mess?
> Thanks in advance
>
>
>   

-- 


*Juan Antonio Moya*

Scientific Developer, Securiforest
Sant Joan de La Salle 42, 4th floor
08022 Barcelona (Spain)
Email: address@hidden <mailto:address@hidden>
Web:   http://www.securiforest.com
        


/ /!\ Disclaimer -- The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose the
contents to any other person, use it for any purpose, or store or copy the
information by any means./




reply via email to

[Prev in Thread] Current Thread [Next in Thread]