acpi: Prevent GPL-only code from seeping into non-GPL binaries
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 28 Sep 2016 13:21:48 +0000 (09:21 -0400)
committerWei Liu <wei.liu2@citrix.com>
Wed, 28 Sep 2016 13:31:49 +0000 (14:31 +0100)
commitc3397311a658ceea5cb5c4e632861616edda5a7d
treec6f31de4ca1d015e0f1dfadae5ed7f25675430e4
parente8c4e3af734df1b73f25f459385fe7683dffcc5f
acpi: Prevent GPL-only code from seeping into non-GPL binaries

Some code (specifically, introduced by commit 801d469ad ("[HVM] ACPI
support patch 3 of 4: ACPI _PRT table.")) has only been licensed under
GPLv2. We want to prevent this code from showing up in non-GPL
binaries which might become possible after we make ACPI builder code
available to users other than hvmloader.

There are two pieces that we need to be careful about:
(1) A small chunk of code in dsdt.asl that implements _PIC method
(2) A chunk of ASL generator in mk_dsdt.c that describes with PCI
    interrupt routing.

This code will now be generated by a GPL-only script which will be
invoked only when ACPI builder's Makefile is called with GPL variable
set.

We also strip license header from generated ASL files to prevent
inadverent use of those files with incorrect license.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/firmware/hvmloader/Makefile
tools/firmware/hvmloader/acpi/Makefile
tools/firmware/hvmloader/acpi/dsdt.asl
tools/firmware/hvmloader/acpi/gpl/mk_dsdt_gpl.sh [new file with mode: 0755]
tools/firmware/hvmloader/acpi/mk_dsdt.c