From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ard Biesheuvel Subject: Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86 Date: Thu, 16 Feb 2017 11:58:15 +0000 Message-ID: References: <1487163892-27701-1-git-send-email-bhsharma@redhat.com> <4695986.Exl6llDaHp@aspire.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-it0-f44.google.com ([209.85.214.44]:35595 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbdBPL6Q (ORCPT ); Thu, 16 Feb 2017 06:58:16 -0500 Received: by mail-it0-f44.google.com with SMTP id 203so96749182ith.0 for ; Thu, 16 Feb 2017 03:58:16 -0800 (PST) In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Bhupesh Sharma Cc: "Rafael J. Wysocki" , "linux-efi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-acpi@vger.kernel.org" , Nicolai Stange , Leif Lindholm , "Prakhya, Sai Praneeth" , Peter Jones , Bhupesh SHARMA , Ingo Molnar , Matt Fleming , Dan Williams , Dave Young , Thomas Gleixner , Mark Rutland On 16 February 2017 at 04:34, Bhupesh Sharma wrote: > Hi Ard, Rafael > > On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki wrote: >> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote: >>> Hello Bhupesh, >>> >>> On 15 February 2017 at 13:04, Bhupesh Sharma wrote: >>> > This patchset presents a RFC approach to move the ACPI BGRT table >>> > handling related code out of 'arch/x86' and place it inside >>> > 'drivers/firmware/efi' so that it can be used to support >>> > ACPI BGRT table and BGRT logo across x86 and AARCH64 ARCHs. >>> > >>> > Note that this patchset is primarily tested on Qemu VMs for x86_64 >>> > and AARCH64 environments, while I try to get my hands on a real >>> > AARCH64 hardware which supports a graphic card and whose boot firmware >>> > I can modify to support the ACPI BGRT table to be passed to the kernel. >>> > >>> > Here are some details/outputs about/from the test environment: >>> > >>> > AARCH64: >>> > ======== >>> > 1. I used the latest Qemu (master branch) and compiled it for aarch64 with softmmu support. >>> > Here is the command line I use to launch the same: >>> > >>> > # qemu-system-aarch64 -cpu cortex-a57 -M virt -m 2048 -bios QEMU_EFI.fd -kernel Image -initrd rootfs.cpio -serial stdio --append "acpi=force" -device virtio-gpu-pci >>> > >>> > where, QEMU_EFI.fd is the DEBUG build of EDK2 ArmVirtQemu.dsc (master branch) >>> > rootfs.cpio is the AARCH64 build of Buildroot (Little Endian AARCH64) >>> > -device virtio-gpu-pci provides the Graphical support required to have BGRT logo. >>> > >>> > >>> > 2. Here are some test results once Linux boots up, which show a valid BGRT table/logo being >>> > seen by the kernel: >>> > >>> > # acpidump >>> > ... >>> > >>> > BGRT @ 0x0000000000000000 >>> > 0000: 42 47 52 54 38 00 00 00 01 B4 49 4E 54 45 4C 20 BGRT8.....INTEL >>> > 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 .... >>> > 0020: 13 00 00 01 01 00 01 00 00 80 B0 BA 00 00 00 00 ................ >>> > 0030: 2F 01 00 00 0F 01 00 00 /....... >>> > >>> > # dmesg | grep -i BGRT >>> > [ 0.000000] ACPI: BGRT 0x00000000B8640000 000038 (v01 INTEL EDK2 00000002 01000013) >>> > >>> > >>> > # ls -lah /sys/firmware/acpi/bgrt/image >>> > -r--r--r-- 1 root root 32.9K Feb 15 11:27 /sys/firmware/acpi/bgrt/image >>> > >>> > x86: >>> > ==== >>> > 1. I used the latest Qemu (master branch) and compiled it for x86. >>> > Here is the command line I use to launch the same: >>> > >>> > # qemu-system-x86_64 -enable-kvm -sdl -m 2048 -vga std -boot c -cpu host -bios OVMF_CODE.fd -kernel bzImage -initrd rootfs.cpio -serial stdio >>> > >>> > where, OVMF_CODE.fd is the RELEASE build of EDK2 OvmfPkg (master branch) >>> > rootfs.cpio is the x86_64 build of Buildroot >>> > >>> > 2. Similar test results are seen as noted for the AARCH64 case above, which show a valid BGRT table/logo being >>> > seen by the kernel. >>> > >>> > Cc: Ard Biesheuvel >>> > Cc: Ingo Molnar >>> > Cc: Matt Fleming >>> > Cc: Dan Williams >>> > Cc: Dave Young >>> > Cc: Thomas Gleixner >>> > Cc: Mark Rutland >>> > Cc: Will Deacon >>> > >>> > Bhupesh Sharma (2): >>> > x86/efi-bgrt: Move efi-bgrt handling out of arch/x86 >>> > bgrt: Make ACPI BGRT parsing code common for ARCHs >>> > >>> > arch/arm64/kernel/acpi.c | 3 +++ >>> > arch/x86/kernel/acpi/boot.c | 6 ------ >>> > arch/x86/platform/efi/Makefile | 1 - >>> > drivers/acpi/Kconfig | 2 +- >>> > drivers/acpi/bgrt.c | 6 ++++++ >>> > drivers/firmware/efi/Makefile | 1 + >>> > {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c | 0 >>> > include/linux/efi-bgrt.h | 2 ++ >>> > 8 files changed, 13 insertions(+), 8 deletions(-) >>> > rename {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c (100%) >>> > >>> >>> These patches look fine to me, and I think we should be able to merge >>> them without any changes. >>> >>> Reviewed-by: Ard Biesheuvel >>> >>> You only failed to cc the ACPI maintainers, please add Len and Rafael next time. > > Oops. Will take care in future. > >> No worries. >> >> The changes are fine by me. >> > Thanks Rafael I will queue these for v4.12 in efi/next -- Ard. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754664AbdBPL6T (ORCPT ); Thu, 16 Feb 2017 06:58:19 -0500 Received: from mail-it0-f45.google.com ([209.85.214.45]:35595 "EHLO mail-it0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbdBPL6Q (ORCPT ); Thu, 16 Feb 2017 06:58:16 -0500 MIME-Version: 1.0 In-Reply-To: References: <1487163892-27701-1-git-send-email-bhsharma@redhat.com> <4695986.Exl6llDaHp@aspire.rjw.lan> From: Ard Biesheuvel Date: Thu, 16 Feb 2017 11:58:15 +0000 Message-ID: Subject: Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86 To: Bhupesh Sharma Cc: "Rafael J. Wysocki" , "linux-efi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-acpi@vger.kernel.org" , Nicolai Stange , Leif Lindholm , "Prakhya, Sai Praneeth" , Peter Jones , Bhupesh SHARMA , Ingo Molnar , Matt Fleming , Dan Williams , Dave Young , Thomas Gleixner , Mark Rutland , Will Deacon Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16 February 2017 at 04:34, Bhupesh Sharma wrote: > Hi Ard, Rafael > > On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki wrote: >> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote: >>> Hello Bhupesh, >>> >>> On 15 February 2017 at 13:04, Bhupesh Sharma wrote: >>> > This patchset presents a RFC approach to move the ACPI BGRT table >>> > handling related code out of 'arch/x86' and place it inside >>> > 'drivers/firmware/efi' so that it can be used to support >>> > ACPI BGRT table and BGRT logo across x86 and AARCH64 ARCHs. >>> > >>> > Note that this patchset is primarily tested on Qemu VMs for x86_64 >>> > and AARCH64 environments, while I try to get my hands on a real >>> > AARCH64 hardware which supports a graphic card and whose boot firmware >>> > I can modify to support the ACPI BGRT table to be passed to the kernel. >>> > >>> > Here are some details/outputs about/from the test environment: >>> > >>> > AARCH64: >>> > ======== >>> > 1. I used the latest Qemu (master branch) and compiled it for aarch64 with softmmu support. >>> > Here is the command line I use to launch the same: >>> > >>> > # qemu-system-aarch64 -cpu cortex-a57 -M virt -m 2048 -bios QEMU_EFI.fd -kernel Image -initrd rootfs.cpio -serial stdio --append "acpi=force" -device virtio-gpu-pci >>> > >>> > where, QEMU_EFI.fd is the DEBUG build of EDK2 ArmVirtQemu.dsc (master branch) >>> > rootfs.cpio is the AARCH64 build of Buildroot (Little Endian AARCH64) >>> > -device virtio-gpu-pci provides the Graphical support required to have BGRT logo. >>> > >>> > >>> > 2. Here are some test results once Linux boots up, which show a valid BGRT table/logo being >>> > seen by the kernel: >>> > >>> > # acpidump >>> > ... >>> > >>> > BGRT @ 0x0000000000000000 >>> > 0000: 42 47 52 54 38 00 00 00 01 B4 49 4E 54 45 4C 20 BGRT8.....INTEL >>> > 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 .... >>> > 0020: 13 00 00 01 01 00 01 00 00 80 B0 BA 00 00 00 00 ................ >>> > 0030: 2F 01 00 00 0F 01 00 00 /....... >>> > >>> > # dmesg | grep -i BGRT >>> > [ 0.000000] ACPI: BGRT 0x00000000B8640000 000038 (v01 INTEL EDK2 00000002 01000013) >>> > >>> > >>> > # ls -lah /sys/firmware/acpi/bgrt/image >>> > -r--r--r-- 1 root root 32.9K Feb 15 11:27 /sys/firmware/acpi/bgrt/image >>> > >>> > x86: >>> > ==== >>> > 1. I used the latest Qemu (master branch) and compiled it for x86. >>> > Here is the command line I use to launch the same: >>> > >>> > # qemu-system-x86_64 -enable-kvm -sdl -m 2048 -vga std -boot c -cpu host -bios OVMF_CODE.fd -kernel bzImage -initrd rootfs.cpio -serial stdio >>> > >>> > where, OVMF_CODE.fd is the RELEASE build of EDK2 OvmfPkg (master branch) >>> > rootfs.cpio is the x86_64 build of Buildroot >>> > >>> > 2. Similar test results are seen as noted for the AARCH64 case above, which show a valid BGRT table/logo being >>> > seen by the kernel. >>> > >>> > Cc: Ard Biesheuvel >>> > Cc: Ingo Molnar >>> > Cc: Matt Fleming >>> > Cc: Dan Williams >>> > Cc: Dave Young >>> > Cc: Thomas Gleixner >>> > Cc: Mark Rutland >>> > Cc: Will Deacon >>> > >>> > Bhupesh Sharma (2): >>> > x86/efi-bgrt: Move efi-bgrt handling out of arch/x86 >>> > bgrt: Make ACPI BGRT parsing code common for ARCHs >>> > >>> > arch/arm64/kernel/acpi.c | 3 +++ >>> > arch/x86/kernel/acpi/boot.c | 6 ------ >>> > arch/x86/platform/efi/Makefile | 1 - >>> > drivers/acpi/Kconfig | 2 +- >>> > drivers/acpi/bgrt.c | 6 ++++++ >>> > drivers/firmware/efi/Makefile | 1 + >>> > {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c | 0 >>> > include/linux/efi-bgrt.h | 2 ++ >>> > 8 files changed, 13 insertions(+), 8 deletions(-) >>> > rename {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c (100%) >>> > >>> >>> These patches look fine to me, and I think we should be able to merge >>> them without any changes. >>> >>> Reviewed-by: Ard Biesheuvel >>> >>> You only failed to cc the ACPI maintainers, please add Len and Rafael next time. > > Oops. Will take care in future. > >> No worries. >> >> The changes are fine by me. >> > Thanks Rafael I will queue these for v4.12 in efi/next -- Ard. From mboxrd@z Thu Jan 1 00:00:00 1970 From: ard.biesheuvel@linaro.org (Ard Biesheuvel) Date: Thu, 16 Feb 2017 11:58:15 +0000 Subject: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86 In-Reply-To: References: <1487163892-27701-1-git-send-email-bhsharma@redhat.com> <4695986.Exl6llDaHp@aspire.rjw.lan> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 16 February 2017 at 04:34, Bhupesh Sharma wrote: > Hi Ard, Rafael > > On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki wrote: >> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote: >>> Hello Bhupesh, >>> >>> On 15 February 2017 at 13:04, Bhupesh Sharma wrote: >>> > This patchset presents a RFC approach to move the ACPI BGRT table >>> > handling related code out of 'arch/x86' and place it inside >>> > 'drivers/firmware/efi' so that it can be used to support >>> > ACPI BGRT table and BGRT logo across x86 and AARCH64 ARCHs. >>> > >>> > Note that this patchset is primarily tested on Qemu VMs for x86_64 >>> > and AARCH64 environments, while I try to get my hands on a real >>> > AARCH64 hardware which supports a graphic card and whose boot firmware >>> > I can modify to support the ACPI BGRT table to be passed to the kernel. >>> > >>> > Here are some details/outputs about/from the test environment: >>> > >>> > AARCH64: >>> > ======== >>> > 1. I used the latest Qemu (master branch) and compiled it for aarch64 with softmmu support. >>> > Here is the command line I use to launch the same: >>> > >>> > # qemu-system-aarch64 -cpu cortex-a57 -M virt -m 2048 -bios QEMU_EFI.fd -kernel Image -initrd rootfs.cpio -serial stdio --append "acpi=force" -device virtio-gpu-pci >>> > >>> > where, QEMU_EFI.fd is the DEBUG build of EDK2 ArmVirtQemu.dsc (master branch) >>> > rootfs.cpio is the AARCH64 build of Buildroot (Little Endian AARCH64) >>> > -device virtio-gpu-pci provides the Graphical support required to have BGRT logo. >>> > >>> > >>> > 2. Here are some test results once Linux boots up, which show a valid BGRT table/logo being >>> > seen by the kernel: >>> > >>> > # acpidump >>> > ... >>> > >>> > BGRT @ 0x0000000000000000 >>> > 0000: 42 47 52 54 38 00 00 00 01 B4 49 4E 54 45 4C 20 BGRT8.....INTEL >>> > 0010: 45 44 4B 32 20 20 20 20 02 00 00 00 20 20 20 20 EDK2 .... >>> > 0020: 13 00 00 01 01 00 01 00 00 80 B0 BA 00 00 00 00 ................ >>> > 0030: 2F 01 00 00 0F 01 00 00 /....... >>> > >>> > # dmesg | grep -i BGRT >>> > [ 0.000000] ACPI: BGRT 0x00000000B8640000 000038 (v01 INTEL EDK2 00000002 01000013) >>> > >>> > >>> > # ls -lah /sys/firmware/acpi/bgrt/image >>> > -r--r--r-- 1 root root 32.9K Feb 15 11:27 /sys/firmware/acpi/bgrt/image >>> > >>> > x86: >>> > ==== >>> > 1. I used the latest Qemu (master branch) and compiled it for x86. >>> > Here is the command line I use to launch the same: >>> > >>> > # qemu-system-x86_64 -enable-kvm -sdl -m 2048 -vga std -boot c -cpu host -bios OVMF_CODE.fd -kernel bzImage -initrd rootfs.cpio -serial stdio >>> > >>> > where, OVMF_CODE.fd is the RELEASE build of EDK2 OvmfPkg (master branch) >>> > rootfs.cpio is the x86_64 build of Buildroot >>> > >>> > 2. Similar test results are seen as noted for the AARCH64 case above, which show a valid BGRT table/logo being >>> > seen by the kernel. >>> > >>> > Cc: Ard Biesheuvel >>> > Cc: Ingo Molnar >>> > Cc: Matt Fleming >>> > Cc: Dan Williams >>> > Cc: Dave Young >>> > Cc: Thomas Gleixner >>> > Cc: Mark Rutland >>> > Cc: Will Deacon >>> > >>> > Bhupesh Sharma (2): >>> > x86/efi-bgrt: Move efi-bgrt handling out of arch/x86 >>> > bgrt: Make ACPI BGRT parsing code common for ARCHs >>> > >>> > arch/arm64/kernel/acpi.c | 3 +++ >>> > arch/x86/kernel/acpi/boot.c | 6 ------ >>> > arch/x86/platform/efi/Makefile | 1 - >>> > drivers/acpi/Kconfig | 2 +- >>> > drivers/acpi/bgrt.c | 6 ++++++ >>> > drivers/firmware/efi/Makefile | 1 + >>> > {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c | 0 >>> > include/linux/efi-bgrt.h | 2 ++ >>> > 8 files changed, 13 insertions(+), 8 deletions(-) >>> > rename {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c (100%) >>> > >>> >>> These patches look fine to me, and I think we should be able to merge >>> them without any changes. >>> >>> Reviewed-by: Ard Biesheuvel >>> >>> You only failed to cc the ACPI maintainers, please add Len and Rafael next time. > > Oops. Will take care in future. > >> No worries. >> >> The changes are fine by me. >> > Thanks Rafael I will queue these for v4.12 in efi/next -- Ard.