qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device


From: Paolo Bonzini
Subject: Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device
Date: Mon, 6 Apr 2020 13:39:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 06/04/20 12:26, Gerd Hoffmann wrote:
> -    if (isa->iobase != 0x0378) {
> +    for (i = 0; i < ARRAY_SIZE(isa_parallel_io); i++) {
> +        if (isa->iobase == isa_parallel_io[i]) {
> +            uid = i + 1;
> +        }
> +    }
> +    if (!uid) {
>          return;
>      }
>  
> @@ -583,8 +589,9 @@ static void parallel_isa_build_aml(ISADevice *isadev, Aml 
> *scope)
>      aml_append(crs, aml_io(AML_DECODE16, 0x0378, 0x0378, 0x08, 0x08));

FWIW this should be replaced with iso->iobase if you want to support
multiple parallel ports (we probably should since the patch has been
written already :)).

Paolo

>      aml_append(crs, aml_irq_no_flags(7));
>  
> -    dev = aml_device("LPT");
> +    dev = aml_device("LPT%d", uid);
>      aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0400")));
> +    aml_append(dev, aml_name_decl("_UID", aml_int(uid)));
>      aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
>      aml_append(dev, aml_name_decl("_CRS", crs));
>  




reply via email to

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