qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH][RFC v2 2/7] hw/power: add main power chip imple


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH][RFC v2 2/7] hw/power: add main power chip implementation
Date: Tue, 09 Apr 2013 10:29:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 09/04/2013 10:14, li guang ha scritto:
> The approach of power-control may be specific for architectures,
> but, I think the thought beneath is common, e.g. for some ARM and MIPS 
> platforms, OS issue commands to a embedded controller's firmware,
> then this firmware will help to do the real power-control job(
> on/off, of course no suspend), and also, there are some platforms
> directly generate power signals on some specific GPIOs then, 
> these signals via a power chip will affect other devices.
> 1.                          2.
>          -----                     -----
>         | OS  |                   | OS |
>          --+--                           -----
>            |on/off                   |on/off 
>   ---------------------------------------------
>  |   -----+-----                      -----+-----    |
>  |   | firmware  |                    |   GPIO   |   |  
>  |    -----+-----                     -----+-----    |
>   ---------+-----------------        |         | part 2
>            |on/off           |       |on/off   |
>     +------+------+                |   ----+-----    | 
>     |      |      |          |  |power chip|   |
>  ------  -----  ----         |   ----------    |
> | dev0 ||dev1 ||dev2|        --------|on/off---
>  ------  -----  ----          +------+------+
>                             |      |      |
>                          ------  -----  ----
>                           | dev0 ||dev1 ||dev2|
>                          ------  -----  ----
> so, in graph 1, firmware acts like the power chip and related gpios
> in graph 2, then, I boldly assume a conceptual power chip exist,
> it can either be part 2 of graph 1 or 2.

But QEMU doesn't treat conceptual things as devices.  It models them as
APIs, such as the memory API or the one that I pointed out in my
previous message.

Paolo

> as you said, qemu should only model real hardware,
> I am confused, can the demonstration above part 2 be consider a
> real hardware? but it does not have vendor and dev-id ...
> and it's not real hardware? but it dose work just same with
> real hardware.




reply via email to

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