[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 10/11] hw/arm/virt-acpi-build: Generation of
From: |
Shannon Zhao |
Subject: |
Re: [Qemu-devel] [RFC PATCH 10/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices |
Date: |
Tue, 27 Jan 2015 15:19:30 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 2015/1/26 18:40, Igor Mammedov wrote:
> On Sat, 24 Jan 2015 17:21:19 +0800
> Shannon Zhao <address@hidden> wrote:
>
>> > DSDT consists of the usual common table header plus a definition
>> > block in AML encoding which describes all devices in the platform.
>> >
>> > After initializing DSDT with header information the namespace is
>> > created which is followed by the device encodings. The devices are
>> > described using the Resource Template for the 32-Bit Fixed Memory
>> > Range and the Extended Interrupt Descriptors.
>> >
>> > The following devices are included in the DSDT:
>> > - CPUs
>> > - UART
>> > - RTC
>> > - NAND Flash
>> > - virtio-mmio
>> >
>> > Signed-off-by: Shannon Zhao <address@hidden>
>> > ---
>> > hw/arm/virt-acpi-build.c | 120
>> > ++++++++++++++++++++++++++++++++++++++++++++++
>> > 1 files changed, 120 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
>> > index de1f307..5c76ca2 100644
>> > --- a/hw/arm/virt-acpi-build.c
>> > +++ b/hw/arm/virt-acpi-build.c
>> > @@ -98,6 +98,111 @@ static inline void acpi_add_table(GArray
>> > *table_offsets, GArray *table_data)
>> > g_array_append_val(table_offsets, offset);
>> > }
>> >
>> > +static void acpi_dsdt_add_cpus(AcpiAml *scope, int smp_cpus)
>> > +{
>> > + AcpiAml dev, crs;
>> > + int i;
>> > + char name[5];
>> > + for (i = 0; i < smp_cpus; i++) {
> I'm not sure about ARM butm shouldn't not present but possble CPUs
> also described here?
>
In struct VirtGuestInfo there are nb_cpus and max_cpus. nb_cpus stands present
CPUs while
max_cpus stands possible CPUs. We can use them to create bitmap.
> PS:
> One more thing about CPU hotplug, I'd like current (x86) bitmap based
> QEMU<->APCI interface (which scales only upto 256 CPU) have redone
> to a one similar to memory hotplug first.
> So that ARM wouldn't have to support compatibility mode for it in the future.
>
Good idea :-)
Thanks,
Shannon
- [Qemu-devel] [RFC PATCH 06/11] hw/arm/virt-acpi-build: Generate GTDT table, (continued)
- [Qemu-devel] [RFC PATCH 06/11] hw/arm/virt-acpi-build: Generate GTDT table, Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 09/11] hw/acpi/acpi-build-utils: Add acpi_fixed_memory32() and acpi_extended_irq(), Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 04/11] hw/arm/virt-acpi-build: Generate XSDT table and add a build_header function, Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 10/11] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices, Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 08/11] hw/arm/virt-acpi-build: Generate FACS table and update ACPI headers, Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 11/11] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables, Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table, Shannon Zhao, 2015/01/24
- [Qemu-devel] [RFC PATCH 01/11] hw/i386: Move ACPI header definitions in an arch-independent location, Shannon Zhao, 2015/01/24