All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 13:04 ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA
  Cc: nicstange-Re5JQEeQqe8AvxtiuMwx3w,
	leif.lindholm-QSEj5FYQhm4dnm+yROfE0A,
	sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w,
	pjones-H+wXaHxf7aLQT0dZR+AlfA,
	bhupesh.linux-Re5JQEeQqe8AvxtiuMwx3w, Bhupesh Sharma,
	Ard Biesheuvel, Ingo Molnar, Matt Fleming, Dan Williams,
	Dave Young, Thomas Gleixner, Mark Rutland, Will Deacon

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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>

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%)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 13:04 ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-efi, linux-arm-kernel, linux-kernel, x86, linux-acpi
  Cc: nicstange, leif.lindholm, sai.praneeth.prakhya, pjones,
	bhupesh.linux, Bhupesh Sharma, Ard Biesheuvel, Ingo Molnar,
	Matt Fleming, Dan Williams, Dave Young, Thomas Gleixner,
	Mark Rutland, Will Deacon

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 <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>

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%)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 13:04 ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

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 <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>

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%)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/2] x86/efi-bgrt: Move efi-bgrt handling out of arch/x86
  2017-02-15 13:04 ` Bhupesh Sharma
  (?)
@ 2017-02-15 13:04     ` Bhupesh Sharma
  -1 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA
  Cc: nicstange-Re5JQEeQqe8AvxtiuMwx3w,
	leif.lindholm-QSEj5FYQhm4dnm+yROfE0A,
	sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w,
	pjones-H+wXaHxf7aLQT0dZR+AlfA,
	bhupesh.linux-Re5JQEeQqe8AvxtiuMwx3w, Bhupesh Sharma,
	Ard Biesheuvel, Ingo Molnar, Matt Fleming, Dan Williams,
	Dave Young, Thomas Gleixner

Now with open-source boot firmware (EDK2) supporting ACPI BGRT table addition
even for architecures like AARCH64, it makes sense to move out the 'efi-bgrt.c'
file and supporting infrastructure from 'arch/x86' directory and house it
inside 'drivers/firmware/efi', so that this common code can be used accross
architecures.

This patch (1) of a series having (2) patches, prepares the background
so that handling of ACPI BGRT tables and BGRT image can be added
in other architectures.

Cc: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>

Signed-off-by: Bhupesh Sharma <bhsharma-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/x86/platform/efi/Makefile                         | 1 -
 drivers/firmware/efi/Makefile                          | 1 +
 {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c (100%)

diff --git a/arch/x86/platform/efi/Makefile b/arch/x86/platform/efi/Makefile
index 066619b..f1d83b3 100644
--- a/arch/x86/platform/efi/Makefile
+++ b/arch/x86/platform/efi/Makefile
@@ -1,6 +1,5 @@
 OBJECT_FILES_NON_STANDARD_efi_thunk_$(BITS).o := y
 
 obj-$(CONFIG_EFI) 		+= quirks.o efi.o efi_$(BITS).o efi_stub_$(BITS).o
-obj-$(CONFIG_ACPI_BGRT) += efi-bgrt.o
 obj-$(CONFIG_EARLY_PRINTK_EFI)	+= early_printk.o
 obj-$(CONFIG_EFI_MIXED)		+= efi_thunk_$(BITS).o
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index ad67342..0329d31 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -9,6 +9,7 @@
 #
 KASAN_SANITIZE_runtime-wrappers.o	:= n
 
+obj-$(CONFIG_ACPI_BGRT) 		+= efi-bgrt.o
 obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o memattr.o
 obj-$(CONFIG_EFI)			+= capsule.o memmap.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
diff --git a/arch/x86/platform/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
similarity index 100%
rename from arch/x86/platform/efi/efi-bgrt.c
rename to drivers/firmware/efi/efi-bgrt.c
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 1/2] x86/efi-bgrt: Move efi-bgrt handling out of arch/x86
@ 2017-02-15 13:04     ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-efi, linux-arm-kernel, linux-kernel, x86, linux-acpi
  Cc: nicstange, leif.lindholm, sai.praneeth.prakhya, pjones,
	bhupesh.linux, Bhupesh Sharma, Ard Biesheuvel, Ingo Molnar,
	Matt Fleming, Dan Williams, Dave Young, Thomas Gleixner

Now with open-source boot firmware (EDK2) supporting ACPI BGRT table addition
even for architecures like AARCH64, it makes sense to move out the 'efi-bgrt.c'
file and supporting infrastructure from 'arch/x86' directory and house it
inside 'drivers/firmware/efi', so that this common code can be used accross
architecures.

This patch (1) of a series having (2) patches, prepares the background
so that handling of ACPI BGRT tables and BGRT image can be added
in other architectures.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
---
 arch/x86/platform/efi/Makefile                         | 1 -
 drivers/firmware/efi/Makefile                          | 1 +
 {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c (100%)

diff --git a/arch/x86/platform/efi/Makefile b/arch/x86/platform/efi/Makefile
index 066619b..f1d83b3 100644
--- a/arch/x86/platform/efi/Makefile
+++ b/arch/x86/platform/efi/Makefile
@@ -1,6 +1,5 @@
 OBJECT_FILES_NON_STANDARD_efi_thunk_$(BITS).o := y
 
 obj-$(CONFIG_EFI) 		+= quirks.o efi.o efi_$(BITS).o efi_stub_$(BITS).o
-obj-$(CONFIG_ACPI_BGRT) += efi-bgrt.o
 obj-$(CONFIG_EARLY_PRINTK_EFI)	+= early_printk.o
 obj-$(CONFIG_EFI_MIXED)		+= efi_thunk_$(BITS).o
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index ad67342..0329d31 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -9,6 +9,7 @@
 #
 KASAN_SANITIZE_runtime-wrappers.o	:= n
 
+obj-$(CONFIG_ACPI_BGRT) 		+= efi-bgrt.o
 obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o memattr.o
 obj-$(CONFIG_EFI)			+= capsule.o memmap.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
diff --git a/arch/x86/platform/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
similarity index 100%
rename from arch/x86/platform/efi/efi-bgrt.c
rename to drivers/firmware/efi/efi-bgrt.c
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 1/2] x86/efi-bgrt: Move efi-bgrt handling out of arch/x86
@ 2017-02-15 13:04     ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

Now with open-source boot firmware (EDK2) supporting ACPI BGRT table addition
even for architecures like AARCH64, it makes sense to move out the 'efi-bgrt.c'
file and supporting infrastructure from 'arch/x86' directory and house it
inside 'drivers/firmware/efi', so that this common code can be used accross
architecures.

This patch (1) of a series having (2) patches, prepares the background
so that handling of ACPI BGRT tables and BGRT image can be added
in other architectures.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
---
 arch/x86/platform/efi/Makefile                         | 1 -
 drivers/firmware/efi/Makefile                          | 1 +
 {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {arch/x86/platform => drivers/firmware}/efi/efi-bgrt.c (100%)

diff --git a/arch/x86/platform/efi/Makefile b/arch/x86/platform/efi/Makefile
index 066619b..f1d83b3 100644
--- a/arch/x86/platform/efi/Makefile
+++ b/arch/x86/platform/efi/Makefile
@@ -1,6 +1,5 @@
 OBJECT_FILES_NON_STANDARD_efi_thunk_$(BITS).o := y
 
 obj-$(CONFIG_EFI) 		+= quirks.o efi.o efi_$(BITS).o efi_stub_$(BITS).o
-obj-$(CONFIG_ACPI_BGRT) += efi-bgrt.o
 obj-$(CONFIG_EARLY_PRINTK_EFI)	+= early_printk.o
 obj-$(CONFIG_EFI_MIXED)		+= efi_thunk_$(BITS).o
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index ad67342..0329d31 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -9,6 +9,7 @@
 #
 KASAN_SANITIZE_runtime-wrappers.o	:= n
 
+obj-$(CONFIG_ACPI_BGRT) 		+= efi-bgrt.o
 obj-$(CONFIG_EFI)			+= efi.o vars.o reboot.o memattr.o
 obj-$(CONFIG_EFI)			+= capsule.o memmap.o
 obj-$(CONFIG_EFI_VARS)			+= efivars.o
diff --git a/arch/x86/platform/efi/efi-bgrt.c b/drivers/firmware/efi/efi-bgrt.c
similarity index 100%
rename from arch/x86/platform/efi/efi-bgrt.c
rename to drivers/firmware/efi/efi-bgrt.c
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/2] bgrt: Make ACPI BGRT parsing code common for ARCHs
  2017-02-15 13:04 ` Bhupesh Sharma
@ 2017-02-15 13:04   ` Bhupesh Sharma
  -1 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-efi, linux-arm-kernel, linux-kernel, x86, linux-acpi
  Cc: nicstange, leif.lindholm, sai.praneeth.prakhya, pjones,
	bhupesh.linux, Bhupesh Sharma, Ard Biesheuvel, Ingo Molnar,
	Matt Fleming, Dan Williams, Dave Young, Thomas Gleixner,
	Mark Rutland, Will Deacon

This patch (2) of a patchset containing (2) patches, allows
the ACPI BGRT table parsing code to be invoked in a similar
fashion accross x86 and AARCH64 ARCHs (which can be later easily extended
for other ARCHs which support ACPI tables in future).

The approach has been tested on QEMU based VMs for both
x86 and AARCH64.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
---
 arch/arm64/kernel/acpi.c    | 3 +++
 arch/x86/kernel/acpi/boot.c | 6 ------
 drivers/acpi/Kconfig        | 2 +-
 drivers/acpi/bgrt.c         | 6 ++++++
 include/linux/efi-bgrt.h    | 2 ++
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
index 64d9cbd6..e25c11e 100644
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -18,6 +18,7 @@
 #include <linux/acpi.h>
 #include <linux/bootmem.h>
 #include <linux/cpumask.h>
+#include <linux/efi-bgrt.h>
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
@@ -233,6 +234,8 @@ void __init acpi_boot_table_init(void)
 			early_init_dt_scan_chosen_stdout();
 	} else {
 		parse_spcr(earlycon_init_is_deferred);
+		if (IS_ENABLED(CONFIG_ACPI_BGRT))
+			acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);
 	}
 }
 
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 7ff007e..4a6ee24 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1558,12 +1558,6 @@ int __init early_acpi_boot_init(void)
 	return 0;
 }
 
-static int __init acpi_parse_bgrt(struct acpi_table_header *table)
-{
-	efi_bgrt_init(table);
-	return 0;
-}
-
 int __init acpi_boot_init(void)
 {
 	/* those are executed after early-quirks are executed */
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 83e5f7e..dad02c0 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -440,7 +440,7 @@ config ACPI_CUSTOM_METHOD
 
 config ACPI_BGRT
 	bool "Boottime Graphics Resource Table support"
-	depends on EFI && X86
+	depends on EFI && (X86 || ARM64)
         help
 	  This driver adds support for exposing the ACPI Boottime Graphics
 	  Resource Table, which allows the operating system to obtain
diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c
index ca28aa57..df1c629 100644
--- a/drivers/acpi/bgrt.c
+++ b/drivers/acpi/bgrt.c
@@ -81,6 +81,12 @@ static struct attribute_group bgrt_attribute_group = {
 	.bin_attrs = bgrt_bin_attributes,
 };
 
+int __init acpi_parse_bgrt(struct acpi_table_header *table)
+{
+	efi_bgrt_init(table);
+	return 0;
+}
+
 static int __init bgrt_init(void)
 {
 	int ret;
diff --git a/include/linux/efi-bgrt.h b/include/linux/efi-bgrt.h
index 2fd3993..33640cd 100644
--- a/include/linux/efi-bgrt.h
+++ b/include/linux/efi-bgrt.h
@@ -6,6 +6,7 @@
 #ifdef CONFIG_ACPI_BGRT
 
 void efi_bgrt_init(struct acpi_table_header *table);
+int __init acpi_parse_bgrt(struct acpi_table_header *table);
 
 /* The BGRT data itself; only valid if bgrt_image != NULL. */
 extern size_t bgrt_image_size;
@@ -14,6 +15,7 @@ extern struct acpi_table_bgrt bgrt_tab;
 #else /* !CONFIG_ACPI_BGRT */
 
 static inline void efi_bgrt_init(struct acpi_table_header *table) {}
+static inline int __init acpi_parse_bgrt(struct acpi_table_header *table) {}
 
 #endif /* !CONFIG_ACPI_BGRT */
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/2] bgrt: Make ACPI BGRT parsing code common for ARCHs
@ 2017-02-15 13:04   ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-15 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

This patch (2) of a patchset containing (2) patches, allows
the ACPI BGRT table parsing code to be invoked in a similar
fashion accross x86 and AARCH64 ARCHs (which can be later easily extended
for other ARCHs which support ACPI tables in future).

The approach has been tested on QEMU based VMs for both
x86 and AARCH64.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
---
 arch/arm64/kernel/acpi.c    | 3 +++
 arch/x86/kernel/acpi/boot.c | 6 ------
 drivers/acpi/Kconfig        | 2 +-
 drivers/acpi/bgrt.c         | 6 ++++++
 include/linux/efi-bgrt.h    | 2 ++
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
index 64d9cbd6..e25c11e 100644
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -18,6 +18,7 @@
 #include <linux/acpi.h>
 #include <linux/bootmem.h>
 #include <linux/cpumask.h>
+#include <linux/efi-bgrt.h>
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
@@ -233,6 +234,8 @@ void __init acpi_boot_table_init(void)
 			early_init_dt_scan_chosen_stdout();
 	} else {
 		parse_spcr(earlycon_init_is_deferred);
+		if (IS_ENABLED(CONFIG_ACPI_BGRT))
+			acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);
 	}
 }
 
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 7ff007e..4a6ee24 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1558,12 +1558,6 @@ int __init early_acpi_boot_init(void)
 	return 0;
 }
 
-static int __init acpi_parse_bgrt(struct acpi_table_header *table)
-{
-	efi_bgrt_init(table);
-	return 0;
-}
-
 int __init acpi_boot_init(void)
 {
 	/* those are executed after early-quirks are executed */
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 83e5f7e..dad02c0 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -440,7 +440,7 @@ config ACPI_CUSTOM_METHOD
 
 config ACPI_BGRT
 	bool "Boottime Graphics Resource Table support"
-	depends on EFI && X86
+	depends on EFI && (X86 || ARM64)
         help
 	  This driver adds support for exposing the ACPI Boottime Graphics
 	  Resource Table, which allows the operating system to obtain
diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c
index ca28aa57..df1c629 100644
--- a/drivers/acpi/bgrt.c
+++ b/drivers/acpi/bgrt.c
@@ -81,6 +81,12 @@ static struct attribute_group bgrt_attribute_group = {
 	.bin_attrs = bgrt_bin_attributes,
 };
 
+int __init acpi_parse_bgrt(struct acpi_table_header *table)
+{
+	efi_bgrt_init(table);
+	return 0;
+}
+
 static int __init bgrt_init(void)
 {
 	int ret;
diff --git a/include/linux/efi-bgrt.h b/include/linux/efi-bgrt.h
index 2fd3993..33640cd 100644
--- a/include/linux/efi-bgrt.h
+++ b/include/linux/efi-bgrt.h
@@ -6,6 +6,7 @@
 #ifdef CONFIG_ACPI_BGRT
 
 void efi_bgrt_init(struct acpi_table_header *table);
+int __init acpi_parse_bgrt(struct acpi_table_header *table);
 
 /* The BGRT data itself; only valid if bgrt_image != NULL. */
 extern size_t bgrt_image_size;
@@ -14,6 +15,7 @@ extern struct acpi_table_bgrt bgrt_tab;
 #else /* !CONFIG_ACPI_BGRT */
 
 static inline void efi_bgrt_init(struct acpi_table_header *table) {}
+static inline int __init acpi_parse_bgrt(struct acpi_table_header *table) {}
 
 #endif /* !CONFIG_ACPI_BGRT */
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
  2017-02-15 13:04 ` Bhupesh Sharma
  (?)
@ 2017-02-15 17:44   ` Ard Biesheuvel
  -1 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-02-15 17:44 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-efi, linux-arm-kernel, linux-kernel, x86, linux-acpi,
	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

Hello Bhupesh,

On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
>
> 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 <ard.biesheuvel@linaro.org>

You only failed to cc the ACPI maintainers, please add Len and Rafael next time.

Thanks,
Ard.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 17:44   ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-02-15 17:44 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-efi, linux-arm-kernel, linux-kernel, x86, linux-acpi,
	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

Hello Bhupesh,

On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
>
> 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 <ard.biesheuvel@linaro.org>

You only failed to cc the ACPI maintainers, please add Len and Rafael next time.

Thanks,
Ard.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 17:44   ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-02-15 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Bhupesh,

On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
>
> 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 <ard.biesheuvel@linaro.org>

You only failed to cc the ACPI maintainers, please add Len and Rafael next time.

Thanks,
Ard.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
  2017-02-15 17:44   ` Ard Biesheuvel
  (?)
@ 2017-02-15 23:44       ` Rafael J. Wysocki
  -1 siblings, 0 replies; 20+ messages in thread
From: Rafael J. Wysocki @ 2017-02-15 23:44 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Bhupesh Sharma, linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA, Nicolai Stange, Leif Lindholm,
	Prakhya, Sai Praneeth, Peter Jones, Bhupesh SHARMA, Ingo Molnar,
	Matt Fleming, Dan Williams, Dave Young, Thomas Gleixner,
	Mark Rutland

On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
> Hello Bhupesh,
> 
> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > Cc: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
> > Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> > Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> > Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> > Cc: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
> >
> > 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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> 
> You only failed to cc the ACPI maintainers, please add Len and Rafael next time.

No worries.

The changes are fine by me.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 23:44       ` Rafael J. Wysocki
  0 siblings, 0 replies; 20+ messages in thread
From: Rafael J. Wysocki @ 2017-02-15 23:44 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Bhupesh Sharma, linux-efi, linux-arm-kernel, linux-kernel, x86,
	linux-acpi, 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

On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
> Hello Bhupesh,
> 
> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Dave Young <dyoung@redhat.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> >
> > 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 <ard.biesheuvel@linaro.org>
> 
> You only failed to cc the ACPI maintainers, please add Len and Rafael next time.

No worries.

The changes are fine by me.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-15 23:44       ` Rafael J. Wysocki
  0 siblings, 0 replies; 20+ messages in thread
From: Rafael J. Wysocki @ 2017-02-15 23:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
> Hello Bhupesh,
> 
> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Dave Young <dyoung@redhat.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> >
> > 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 <ard.biesheuvel@linaro.org>
> 
> You only failed to cc the ACPI maintainers, please add Len and Rafael next time.

No worries.

The changes are fine by me.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
  2017-02-15 23:44       ` Rafael J. Wysocki
  (?)
@ 2017-02-16  4:34           ` Bhupesh Sharma
  -1 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-16  4:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Ard Biesheuvel, linux-efi-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, x86-DgEjT+Ai2ygdnm+yROfE0A,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA, Nicolai Stange, Leif Lindholm,
	Prakhya, Sai Praneeth, Peter Jones, Bhupesh SHARMA, Ingo Molnar,
	Matt Fleming, Dan Williams, Dave Young, Thomas Gleixner,
	Mark Rutland

Hi Ard, Rafael

On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org> wrote:
> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
>> Hello Bhupesh,
>>
>> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> > Cc: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> > Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
>> > Cc: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> > Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> > Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
>> > Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
>> > Cc: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
>> >
>> > 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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>
>> 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 and Ard.

Regards,
Bhupesh

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-16  4:34           ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-16  4:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Ard Biesheuvel, linux-efi, linux-arm-kernel, linux-kernel, x86,
	linux-acpi, 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

Hi Ard, Rafael

On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
>> Hello Bhupesh,
>>
>> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
>> > Cc: Ingo Molnar <mingo@kernel.org>
>> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
>> > Cc: Dan Williams <dan.j.williams@intel.com>
>> > Cc: Dave Young <dyoung@redhat.com>
>> > Cc: Thomas Gleixner <tglx@linutronix.de>
>> > Cc: Mark Rutland <mark.rutland@arm.com>
>> > Cc: Will Deacon <will.deacon@arm.com>
>> >
>> > 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 <ard.biesheuvel@linaro.org>
>>
>> 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 and Ard.

Regards,
Bhupesh

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-16  4:34           ` Bhupesh Sharma
  0 siblings, 0 replies; 20+ messages in thread
From: Bhupesh Sharma @ 2017-02-16  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ard, Rafael

On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
>> Hello Bhupesh,
>>
>> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
>> > Cc: Ingo Molnar <mingo@kernel.org>
>> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
>> > Cc: Dan Williams <dan.j.williams@intel.com>
>> > Cc: Dave Young <dyoung@redhat.com>
>> > Cc: Thomas Gleixner <tglx@linutronix.de>
>> > Cc: Mark Rutland <mark.rutland@arm.com>
>> > Cc: Will Deacon <will.deacon@arm.com>
>> >
>> > 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 <ard.biesheuvel@linaro.org>
>>
>> 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 and Ard.

Regards,
Bhupesh

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
  2017-02-16  4:34           ` Bhupesh Sharma
  (?)
@ 2017-02-16 11:58             ` Ard Biesheuvel
  -1 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-02-16 11:58 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: Rafael J. Wysocki, linux-efi, linux-arm-kernel, linux-kernel,
	x86, linux-acpi, 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 <bhsharma@redhat.com> wrote:
> Hi Ard, Rafael
>
> On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
>>> Hello Bhupesh,
>>>
>>> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
>>> > Cc: Ingo Molnar <mingo@kernel.org>
>>> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
>>> > Cc: Dan Williams <dan.j.williams@intel.com>
>>> > Cc: Dave Young <dyoung@redhat.com>
>>> > Cc: Thomas Gleixner <tglx@linutronix.de>
>>> > Cc: Mark Rutland <mark.rutland@arm.com>
>>> > Cc: Will Deacon <will.deacon@arm.com>
>>> >
>>> > 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 <ard.biesheuvel@linaro.org>
>>>
>>> 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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-16 11:58             ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-02-16 11:58 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: Rafael J. Wysocki, linux-efi, linux-arm-kernel, linux-kernel,
	x86, linux-acpi, 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

On 16 February 2017 at 04:34, Bhupesh Sharma <bhsharma@redhat.com> wrote:
> Hi Ard, Rafael
>
> On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
>>> Hello Bhupesh,
>>>
>>> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
>>> > Cc: Ingo Molnar <mingo@kernel.org>
>>> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
>>> > Cc: Dan Williams <dan.j.williams@intel.com>
>>> > Cc: Dave Young <dyoung@redhat.com>
>>> > Cc: Thomas Gleixner <tglx@linutronix.de>
>>> > Cc: Mark Rutland <mark.rutland@arm.com>
>>> > Cc: Will Deacon <will.deacon@arm.com>
>>> >
>>> > 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 <ard.biesheuvel@linaro.org>
>>>
>>> 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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86
@ 2017-02-16 11:58             ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-02-16 11:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 16 February 2017 at 04:34, Bhupesh Sharma <bhsharma@redhat.com> wrote:
> Hi Ard, Rafael
>
> On Thu, Feb 16, 2017 at 5:14 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> On Wednesday, February 15, 2017 05:44:28 PM Ard Biesheuvel wrote:
>>> Hello Bhupesh,
>>>
>>> On 15 February 2017 at 13:04, Bhupesh Sharma <bhsharma@redhat.com> 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 <ard.biesheuvel@linaro.org>
>>> > Cc: Ingo Molnar <mingo@kernel.org>
>>> > Cc: Matt Fleming <matt@codeblueprint.co.uk>
>>> > Cc: Dan Williams <dan.j.williams@intel.com>
>>> > Cc: Dave Young <dyoung@redhat.com>
>>> > Cc: Thomas Gleixner <tglx@linutronix.de>
>>> > Cc: Mark Rutland <mark.rutland@arm.com>
>>> > Cc: Will Deacon <will.deacon@arm.com>
>>> >
>>> > 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 <ard.biesheuvel@linaro.org>
>>>
>>> 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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-02-16 11:58 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 13:04 [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86 Bhupesh Sharma
2017-02-15 13:04 ` Bhupesh Sharma
2017-02-15 13:04 ` Bhupesh Sharma
     [not found] ` <1487163892-27701-1-git-send-email-bhsharma-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-02-15 13:04   ` [PATCH 1/2] x86/efi-bgrt: Move efi-bgrt handling " Bhupesh Sharma
2017-02-15 13:04     ` Bhupesh Sharma
2017-02-15 13:04     ` Bhupesh Sharma
2017-02-15 13:04 ` [PATCH 2/2] bgrt: Make ACPI BGRT parsing code common for ARCHs Bhupesh Sharma
2017-02-15 13:04   ` Bhupesh Sharma
2017-02-15 17:44 ` [PATCH 0/2] RFC: Move efi bgrt code out of arch/x86 Ard Biesheuvel
2017-02-15 17:44   ` Ard Biesheuvel
2017-02-15 17:44   ` Ard Biesheuvel
     [not found]   ` <CAKv+Gu-qv83fi9qBugA=Od2htcLb966SPBpZXSnXdH=AYw-COw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-15 23:44     ` Rafael J. Wysocki
2017-02-15 23:44       ` Rafael J. Wysocki
2017-02-15 23:44       ` Rafael J. Wysocki
     [not found]       ` <4695986.Exl6llDaHp-yvgW3jdyMHm1GS7QM15AGw@public.gmane.org>
2017-02-16  4:34         ` Bhupesh Sharma
2017-02-16  4:34           ` Bhupesh Sharma
2017-02-16  4:34           ` Bhupesh Sharma
2017-02-16 11:58           ` Ard Biesheuvel
2017-02-16 11:58             ` Ard Biesheuvel
2017-02-16 11:58             ` Ard Biesheuvel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.