Skip to contentSkip to conversation

i386/linux: add support for ext_lfb_base

PATCH In review Arindam Nath 2 participants 10 messages Jun 27, 2018 – Jul 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386/linux: add support for ext_lfb_base

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
 grub-core/loader/i386/linux.c | 2 ++
 include/grub/i386/linux.h     | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +2 -0
index 083f9417c..1644e8132 100644
@@ -306,6 +306,8 @@ grub_linux_setup_video (struct linux_kernel_params *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t) framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
 
   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +4 -1
index da0ca3b83..e3f91e7c0 100644
@@ -188,8 +188,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base is 64-bit */
+  grub_uint32_t ext_lfb_base;		/* 3a */
 
-  grub_uint8_t padding3[0x40 - 0x3a];
+  grub_uint8_t padding3[0x40 - 0x3e];
 
   grub_uint16_t apm_version;		/* 40 */
   grub_uint16_t apm_code_segment;	/* 42 */
Signature · 1 line
2.17.1
#1 lore raw
Quoted 64 lines

-----Original Message-----
From: Arindam Nath <[email protected]> On Behalf Of Arindam Nath
Sent: Wednesday, June 27, 2018 8:26 PM
To: [email protected]
Cc: Nath, Arindam <[email protected]>
Subject: [PATCH] i386/linux: add support for ext_lfb_base

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
 grub-core/loader/i386/linux.c | 2 ++
 include/grub/i386/linux.h     | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +2 -0
index 083f9417c..1644e8132 100644
@@ -306,6 +306,8 @@ grub_linux_setup_video (struct linux_kernel_params
 *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t)
 framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height,

65536);

   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +2 -0
index da0ca3b83..e3f91e7c0 100644
@@ -188,8 +188,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base

is 64-bit */

include/grub/i386/linux.h +2 -2
+  grub_uint32_t ext_lfb_base;		/* 3a */
 
-  grub_uint8_t padding3[0x40 - 0x3a];
+  grub_uint8_t padding3[0x40 - 0x3e];
 
   grub_uint16_t apm_version;		/* 40 */
   grub_uint16_t apm_code_segment;	/* 42 */
--
Quoted 1 line

2.17.1

Could you help review the changes?

Thanks,
Arindam

#2 lore raw
Quoted 61 lines · Arindam
Quoted 61 lines

-----Original Message-----
From: Arindam Nath <[email protected]> On Behalf Of Arindam Nath
Sent: Wednesday, June 27, 2018 8:26 PM
To: [email protected]
Cc: Nath, Arindam <[email protected]>
Subject: [PATCH] i386/linux: add support for ext_lfb_base

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
 grub-core/loader/i386/linux.c | 2 ++
 include/grub/i386/linux.h     | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +2 -0
index 083f9417c..1644e8132 100644
@@ -306,6 +306,8 @@ grub_linux_setup_video (struct linux_kernel_params
 *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t)
 framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height,

65536);

   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +2 -0
index da0ca3b83..e3f91e7c0 100644
@@ -188,8 +188,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base

is 64-bit */

include/grub/i386/linux.h +2 -1
+  grub_uint32_t ext_lfb_base;		/* 3a */
 
-  grub_uint8_t padding3[0x40 - 0x3a];
+  grub_uint8_t padding3[0x40 - 0x3e];
Quoted 6 lines
Quoted 4 lines
   grub_uint16_t apm_version;		/* 40 */
   grub_uint16_t apm_code_segment;	/* 42 */

--
2.17.1

Could you help review the changes?

I have just come back from the vacation. So, I will take a look at this probably this week after clearing my backlog.

By the way, please remember that the reviewers are also busy with other stuff and they may not be able to review the patches on day to day basis. So, please give them a week or two to do that. If this does not happen in that timeframe then just bump the thread but not earlier please.

Daniel

#3 lore raw
In reply to Arindam Nath
Quoted 27 lines · Arindam Nath

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
 grub-core/loader/i386/linux.c | 2 ++
 include/grub/i386/linux.h     | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +0 -0
index 083f9417c..1644e8132 100644

grub-core/loader/i386/linux.c grub_linux_setup_video (struct linux_kernel_params *params) · line 308

Quoted 3 lines
grub-core/loader/i386/linux.c +0 -0
@@ -306,6 +306,8 @@ grub_linux_setup_video (struct linux_kernel_params *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;

I think that you should add this:

#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)

grub-core/loader/i386/linux.c grub_linux_setup_video (struct linux_kernel_params *params) · line 310

Quoted 2 lines
grub-core/loader/i386/linux.c +2 -0
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t) framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;

#endif

.. or at least #ifdef __x86_64__...

include/grub/i386/linux.h struct linux_kernel_params · line 192

Quoted 13 lines
grub-core/loader/i386/linux.c +0 -0
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
 
   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +2 -0
index da0ca3b83..e3f91e7c0 100644
@@ -188,8 +188,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base is 64-bit */

My I ask you to put this constants definitions at the beginning of the file together with other constants?

Daniel

#4 lore raw
Quoted 42 lines

-----Original Message-----
From: Daniel Kiper <[email protected]>
Sent: Friday, July 6, 2018 11:42 PM
To: The development of GNU GRUB <[email protected]>
Cc: Nath, Arindam <[email protected]>
Subject: Re: [PATCH] i386/linux: add support for ext_lfb_base

grub-core/loader/i386/linux.c grub_linux_setup_video (struct

Quoted 27 lines · Arindam Nath

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
 grub-core/loader/i386/linux.c | 2 ++
 include/grub/i386/linux.h     | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +0 -0
index 083f9417c..1644e8132 100644
@@ -306,6 +306,8 @@ grub_linux_setup_video (struct

linux_kernel_params *params)

grub-core/loader/i386/linux.c grub_linux_setup_video (struct linux_kernel_params *params) · line 308

Quoted 3 lines
grub-core/loader/i386/linux.c +0 -0
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;

I think that you should add this:

Quoted 7 lines

#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)

grub-core/loader/i386/linux.c grub_linux_setup_video (struct · line 309

Quoted 1 line
grub-core/loader/i386/linux.c +1 -0
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t)

framebuffer) >> 32);

grub-core/loader/i386/linux.c grub_linux_setup_video (struct linux_kernel_params *params) · line 310

Quoted 1 line
grub-core/loader/i386/linux.c +1 -0
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;

#endif

That makes sense. Will add the #if in next version of patch.

Quoted 19 lines

.. or at least #ifdef __x86_64__...

Quoted 9 lines
grub-core/loader/i386/linux.c +0 -0
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params-
 lfb_height, 65536);
 
   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +0 -0
index da0ca3b83..e3f91e7c0 100644

include/grub/i386/linux.h struct linux_kernel_params · line 192

Quoted 5 lines
include/grub/i386/linux.h +2 -0
@@ -188,8 +188,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base

is 64-bit */

Quoted 2 lines

My I ask you to put this constants definitions at the beginning of the file together with other constants?

Will do. Thanks.

Arindam

Quoted 2 lines

Daniel

#5 lore raw

PATCH 1/1 i386/linux: add support for ext_lfb_base (v2)

In reply to Daniel Kiper

From: Arindam Nath <[email protected]>

v2: changes suggested by Daniel

- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

v1:

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
 grub-core/loader/i386/linux.c |  4 ++++
 include/grub/i386/linux.h     | 12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +4 -0
index 083f9417c..246945abe 100644
@@ -306,6 +306,10 @@ grub_linux_setup_video (struct linux_kernel_params *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t) framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
+#endif
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
 
   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +11 -1
index da0ca3b83..04d277b4e 100644
@@ -43,6 +43,13 @@
 
 #define GRUB_LINUX_CL_MAGIC		0xA33F
 
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base is 64-bit */
+
+#endif
+
 #ifdef __x86_64__
 
 #define GRUB_LINUX_EFI_SIGNATURE	\
@@ -188,8 +195,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+  grub_uint32_t ext_lfb_base;		/* 3a */
+#endif
 
-  grub_uint8_t padding3[0x40 - 0x3a];
+  grub_uint8_t padding3[0x40 - 0x3e];
 
   grub_uint16_t apm_version;		/* 40 */
   grub_uint16_t apm_code_segment;	/* 42 */
Signature · 1 line
2.17.1
#6 lore raw

Re: [PATCH] i386/linux: add support for ext_lfb_base (v2)

Quoted 8 lines · Arindam Nath

From: Arindam Nath <[email protected]>

v2: changes suggested by Daniel

- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

v1:

This should go...

Quoted 12 lines

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

Quoted 6 lines

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---

...here. You should add "---" after SOB and put info about the versions after it. You can find good examples on the list.

grub-core/loader/i386/linux.c grub_linux_setup_video (struct linux_kernel_params *params) · line 309

Quoted 13 lines
 grub-core/loader/i386/linux.c |  4 ++++
 include/grub/i386/linux.h     | 12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +1 -0
index 083f9417c..246945abe 100644
@@ -306,6 +306,10 @@ grub_linux_setup_video (struct linux_kernel_params *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)

Please add one empty line before "#if ...".

grub-core/loader/i386/linux.c grub_linux_setup_video (struct linux_kernel_params *params) · line 312

Quoted 3 lines
grub-core/loader/i386/linux.c +3 -0
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t) framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
+#endif

Please add one empty line after "#endif".

Quoted 8 lines
grub-core/loader/i386/linux.c +0 -0
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
 
   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +0 -0
index da0ca3b83..04d277b4e 100644

include/grub/i386/linux.h line 51

Quoted 9 lines
include/grub/i386/linux.h +6 -0
@@ -43,6 +43,13 @@
 
 #define GRUB_LINUX_CL_MAGIC		0xA33F
 
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base is 64-bit */
+
+#endif

Please drop this #if/#endif. It is not needed here.

include/grub/i386/linux.h struct linux_kernel_params · line 200

Quoted 11 lines
include/grub/i386/linux.h +4 -0
+
 #ifdef __x86_64__
 
 #define GRUB_LINUX_EFI_SIGNATURE	\
@@ -188,8 +195,11 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+  grub_uint32_t ext_lfb_base;		/* 3a */
+#endif

Ditto.

include/grub/i386/linux.h struct linux_kernel_params · line 202

Quoted 3 lines
include/grub/i386/linux.h +1 -1
-  grub_uint8_t padding3[0x40 - 0x3a];
+  grub_uint8_t padding3[0x40 - 0x3e];

And this will be wrong if you do not drop #if/#endif above.

Daniel

#7 lore raw

PATCH v3 1/1 i386/linux: add support for ext_lfb_base

From: Arindam Nath <[email protected]>

---
Cc: Daniel Kiper <[email protected]>
---
v1:

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

v2: changes suggested by Daniel

- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

v3: changes suggested by Daniel

- moved patch version info below SOB
- added empty lines above and below the modified lines
- removed unnecessary #if and #endif from header file

---
 grub-core/loader/i386/linux.c | 6 ++++++
 include/grub/i386/linux.h     | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
grub-core/loader/i386/linux.c +6 -0
index 083f9417c..e66164bac 100644
@@ -306,6 +306,12 @@ grub_linux_setup_video (struct linux_kernel_params *params)
   params->lfb_line_len = mode_info.pitch;
 
   params->lfb_base = (grub_size_t) framebuffer;
+
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+  params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t) framebuffer) >> 32);
+  params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
+#endif
+
   params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
 
   params->red_mask_size = mode_info.red_mask_size;
include/grub/i386/linux.h +5 -1
index da0ca3b83..ebac95e41 100644
@@ -43,6 +43,9 @@
 
 #define GRUB_LINUX_CL_MAGIC		0xA33F
 
+#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
+#define VIDEO_CAPABILITY_64BIT_BASE	(1 << 1)	/* Frame buffer base is 64-bit */
+
 #ifdef __x86_64__
 
 #define GRUB_LINUX_EFI_SIGNATURE	\
@@ -188,8 +191,9 @@ struct linux_kernel_params
   grub_uint16_t lfb_pages;		/* 32 */
   grub_uint16_t vesa_attrib;		/* 34 */
   grub_uint32_t capabilities;		/* 36 */
+  grub_uint32_t ext_lfb_base;		/* 3a */
 
-  grub_uint8_t padding3[0x40 - 0x3a];
+  grub_uint8_t padding3[0x40 - 0x3e];
 
   grub_uint16_t apm_version;		/* 40 */
   grub_uint16_t apm_code_segment;	/* 42 */
Signature · 1 line
2.17.1
#8 lore raw
Quoted 26 lines · Arindam Nath

From: Arindam Nath <[email protected]>

---
Cc: Daniel Kiper <[email protected]>
---
v1:

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

v2: changes suggested by Daniel

Quoted 8 lines

- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

v3: changes suggested by Daniel

- moved patch version info below SOB
- added empty lines above and below the modified lines
- removed unnecessary #if and #endif from header file

Code looks good but the commit message is a mess. The commit message should look like this in your editor.

i386/linux: add support for ext_lfb_base

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
Cc: Daniel Kiper <[email protected]>

v2: changes suggested by Daniel
- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

v3: changes suggested by Daniel
- moved patch version info below SOB
- added empty lines above and below the modified lines
- removed unnecessary #if and #endif from header file

I will fix that before committing the patch. I will do that in a week or so if there are no objections.

Next time please adhere to the commit message layout presented above.

Thank you for doing the work.

Daniel

#9 lore raw
Quoted 74 lines

-----Original Message-----
From: Daniel Kiper <[email protected]>
Sent: Friday, July 13, 2018 5:20 PM
To: Nath, Arindam <[email protected]>
Cc: [email protected]; Daniel Kiper <[email protected]>; Arindam Nath <[email protected]>
Subject: Re: [PATCH v3] i386/linux: add support for ext_lfb_base

Quoted 26 lines · Arindam Nath

From: Arindam Nath <[email protected]>

---
Cc: Daniel Kiper <[email protected]>
---
v1:

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

v2: changes suggested by Daniel

Quoted 8 lines

- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

v3: changes suggested by Daniel

- moved patch version info below SOB
- added empty lines above and below the modified lines
- removed unnecessary #if and #endif from header file

Code looks good but the commit message is a mess. The commit message should look like this in your editor.

i386/linux: add support for ext_lfb_base

The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address.

The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now.

This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario.

---
Cc: Daniel Kiper <[email protected]>

v2: changes suggested by Daniel
- added #if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
- moved constant definitions to the beginning of header file

Quoted 8 lines

v3: changes suggested by Daniel
- moved patch version info below SOB
- added empty lines above and below the modified lines
- removed unnecessary #if and #endif from header file

I will fix that before committing the patch. I will do that in a week or so if there are no objections.

Thanks.

Quoted 2 lines

Next time please adhere to the commit message layout presented above.

Will do.

Arindam

Quoted 4 lines

Thank you for doing the work.

Daniel