[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform. |
Date: |
Tue, 17 Feb 2009 16:55:51 +0200 |
On 2/17/09, Liu Yu <address@hidden> wrote:
> MPIC and OpenPIC have very similar design.
> So a lot of code can be reused.
>
> Modification mainly include:
> 1. keep struct openpic_t to the maximum size of both MPIC and OpenPIC.
> 2. endianess swap.
> MPIC has the same endianess as target, so no need to swap for MPIC.
I don't think this is correct, the host can still be different endian
from target.
> 3. using different init functions and function pointers for reset and irq
> raise.
You didn't register the reset handler with qemu_register_reset.
> Haven't test OpenPIC.
>
> Signed-off-by: Liu Yu <address@hidden>
> +static void mpic_src_write (void *opaque, uint32_t addr, uint32_t val)
> + if (addr < 0x180) {
> + idx = MPIC_EXT_IRQ;
> + } else if (addr >= 0x200 && addr < 0xa00) {
> + idx = MPIC_INT_IRQ;
> + addr -= 0x200;
> + } else if (addr >= 0x1600 && addr < 0x1700) {
> + idx = MPIC_MSG_IRQ;
> + addr -= 0x1600;
> + } else if (addr >= 0x1C00 && addr < 0x1D00) {
> + idx = MPIC_MSI_IRQ;
> + addr -= 0x1C00;
> + } else {
> + return;
It would be faster and simpler to register different handlers for
these memory areas, same goes for mpic_src_read, mpic_writel and
mpic_readl.
> + register_savevm("mpic", 0, 1, openpic_save, openpic_load, mpp);
When the save format changes, the version number should be bumped.
- [Qemu-devel] [PATCH 3/5] kvm/powerpc: Add irq support for E500 core, (continued)
- [Qemu-devel] [PATCH 3/5] kvm/powerpc: Add irq support for E500 core, Liu Yu, 2009/02/17
- [Qemu-devel] [PATCH 4/5] kvm/powerpc: Add MPC8544DS board support, Liu Yu, 2009/02/17
- [Qemu-devel] [PATCH 5/5] kvm/powerpc: flat device tree files for MPC8544DS, Liu Yu, 2009/02/17
- Re: [Qemu-devel] [PATCH 4/5] kvm/powerpc: Add MPC8544DS board support, Blue Swirl, 2009/02/17
- RE: [Qemu-devel] [PATCH 4/5] kvm/powerpc: Add MPC8544DS board support, Liu Yu-B13201, 2009/02/18
- Re: [Qemu-devel] [PATCH 2/5] kvm/powerpc: Add freescale pci controller's support, Blue Swirl, 2009/02/17
- Re: [Qemu-devel] [PATCH 2/5] kvm/powerpc: Add freescale pci controller's support, M. Warner Losh, 2009/02/17
- Re: [Qemu-devel] [PATCH 2/5] kvm/powerpc: Add freescale pci controller's support, M. Warner Losh, 2009/02/17
- Re: [Qemu-devel] [PATCH 2/5] kvm/powerpc: Add freescale pci controller's support, Jamie Lokier, 2009/02/17
- RE: [Qemu-devel] [PATCH 2/5] kvm/powerpc: Add freescale pci controller's support, Liu Yu-B13201, 2009/02/18
Re: [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform.,
Blue Swirl <=
Re: [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform., Paulev, 2009/02/19