[Qemu-devel] [PATCH V9 14/20] pc: split out memory allocation from pc_init1() into pc_memory_init()

2009-12-08 Thread Isaku Yamahata
Split out memory allocation and rom/bios loading which doesn't depend on piix from pc_init1() into pc_memory_init(). Later it will be used. Signed-off-by: Isaku Yamahata --- hw/pc.c | 67 +++--- 1 files changed, 42 insertions(+), 25 delet

[Qemu-devel] [PATCH V9 11/20] pc: introduce a function to allocate cpu irq.

2009-12-08 Thread Isaku Yamahata
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq in order to make pic_irq_request() piix independent. Later piix code will be split out to another file keeping pic_irq_request() static. Signed-off-by: Isaku Yamahata --- hw/pc.c |7 ++- 1 files changed, 6 insertions(+), 1

[Qemu-devel] [PATCH V9 09/20] pc: remove a global variable, floppy_controller.

2009-12-08 Thread Isaku Yamahata
Remove a global variable, floppy_controller. Since it is unnecessarily global, make it local and pass it as a function argument. Signed-off-by: Isaku Yamahata --- hw/pc.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index c728486..dcf7eeb 1006

[Qemu-devel] [PATCH V9 18/20] pc: split out piix specific part from pc.c into pc_piix.c

2009-12-08 Thread Isaku Yamahata
Finally, we can safely split out the piix specific part from pc.c into pc_piix.c. Signed-off-by: Isaku Yamahata --- Makefile.target |2 +- hw/pc.c | 256 +- hw/pc.h | 32 +++ hw/pc_piix.c| 244 +++

[Qemu-devel] [PATCH V9 08/20] pc: make an unnecessary global variable, pit, local.

2009-12-08 Thread Isaku Yamahata
remove unnecessary global static variables, pit. Make it local. Signed-off-by: Isaku Yamahata --- hw/pc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index fc7ee8a..c728486 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -66,7 +66,6 @@ static fdctrl_t *fl

[Qemu-devel] [PATCH V9 02/20] acpi: split out apm register emulation from acpi.c

2009-12-08 Thread Isaku Yamahata
Split out apm register emulation for acpi.c into pc_apm.c. The apm emulation will be used later. Signed-off-by: Isaku Yamahata --- Makefile.target |4 +- hw/acpi.c | 57 ++-- hw/pc_apm.c | 85 ++

[Qemu-devel] [PATCH V9 19/20] pc: move rtc declarations from pc.h into a dedicated header file.

2009-12-08 Thread Isaku Yamahata
Move rtc_xxx declarations from pc.h into mc146818rtc.h. Signed-off-by: Isaku Yamahata --- hw/mc146818rtc.h | 10 ++ hw/pc.h | 10 ++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 hw/mc146818rtc.h diff --git a/hw/mc146818rtc.h b/hw/mc146818rtc

[Qemu-devel] [PATCH V9 07/20] pc, i440fx: Make smm enable/disable function i440fx independent.

2009-12-08 Thread Isaku Yamahata
make cpu_smm_update() generic to be independent on i440fx by registering a callback. Signed-off-by: Isaku Yamahata --- hw/pc.c | 18 +++--- hw/pc.h |8 +++- hw/piix_pci.c |5 - 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/hw/pc.c b/hw/

[Qemu-devel] [PATCH V9 10/20] pc: Remove reference to a global variable, RTCState *rtc_state.

2009-12-08 Thread Isaku Yamahata
Remove unnecessary reference to a global variable, RTCState *rtc_state, by passing it as function argument. Only the cmos_set_s3_resume_init() needs it global. So introduce a registering function and use it. Signed-off-by: Isaku Yamahata Cc: Paolo Bonzini --- hw/pc.c | 25

[Qemu-devel] [PATCH V9 15/20] pc: split out vga initialization from pc_init1() into pc_vga_init().

2009-12-08 Thread Isaku Yamahata
Split out vga initialization which is independent of piix from pc_init1() as pc_vga_init(). Later it will be used. Signed-off-by: Isaku Yamahata --- hw/pc.c | 41 +++-- 1 files changed, 23 insertions(+), 18 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index

[Qemu-devel] [PATCH V9 03/20] acpi: add acpi constants from linux header files and use them.

2009-12-08 Thread Isaku Yamahata
add acpi constants from linux header files and replace the old constants with them. The acpi constants will be used by other file. Signed-off-by: Isaku Yamahata --- hw/acpi.c | 56 +++ hw/acpi.h | 78

[Qemu-devel] [PATCH V9 12/20] pc: make pc_init1() not refer ferr_irq directly.

2009-12-08 Thread Isaku Yamahata
By introducing a registering function, make pc_init1() not refer to ferr_irq directly in order to make ferr_irq piix independent. Later pc_init1() will be split out into another file keeping ferr_irq static. Signed-off-by: Isaku Yamahata --- hw/pc.c |8 +++- hw/pc.h |2 ++ 2 files ch

[Qemu-devel] [PATCH V9 00/20] split out piix specific part from pc emulator

2009-12-08 Thread Isaku Yamahata
This time, I fixed up the patch series. - fixed up copyright notice. - make rtc_xxx functions accept/return ISADevice. - move up ioapic initalization patch. Although Gerd suggested to use DeviceState, I used ISADevice. Gerd, do you want me to use DeviceState instead of ISADevice? patch seri

[Qemu-devel] [PATCH V9 17/20] pc: split out pci device init from pc_init1() into pc_pci_device_init()

2009-12-08 Thread Isaku Yamahata
Split out pci device initialization from pc_init1() into pc_pci_device_init(). and removed unnecessary braces. Signed-off-by: Isaku Yamahata --- hw/pc.c | 35 +++ 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 7d7c800..b

Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends

2009-12-08 Thread Markus Armbruster
Anthony Liguori writes: > Markus Armbruster wrote: >> Commit a7d27b53 made zero-sized allocations a fatal error, deviating >> from ISO C's malloc() & friends. Revert that, but take care never to >> return a null pointer, like malloc() & friends may do (it's >> implementation defined), because th

Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends

2009-12-08 Thread Markus Armbruster
malc writes: > On Mon, 7 Dec 2009, Markus Armbruster wrote: > >> malc writes: >> >> > On Mon, 30 Nov 2009, Markus Armbruster wrote: >> > >> >> Commit a7d27b53 made zero-sized allocations a fatal error, deviating >> >> from ISO C's malloc() & friends. Revert that, but take care never to >> >> r

<    1   2