|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 6/6] use uint32_t for ioport port and value instead of int. |
Date: | Mon, 13 Jul 2009 16:28:54 -0500 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Stuart Brady wrote:
On Mon, Jul 13, 2009 at 01:59:31PM -0500, Anthony Liguori wrote:If so, I would think that we should use ram_addr_t for addr and then we can use the appropriate uintN_t type for value. Switching value like that though could have some subtle consequences. For instance, cpu_outb(env, ..., 128) would have worked properly before as would cpu_outb(env, ..., -32).Isn't ram_addr_t solely for return values from (and internals of) qemu_ram_alloc() and friends?
Well it's sort of our internal address type.
Perhaps port IO addresses should have their own type?
Certainly not a bad idea but I'd still recommend typedef ram_addr_t pio_addr_t.
TBH, I'm not so sure that port IO is particularly 'special' in any way.
Right, that's why I suggested ram_addr_t. ram_addr_t is just an internal address and what we map it to is up to us.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |