diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-04-30 14:28:34 -0400 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-05-01 09:40:02 +0200 |
commit | eed4e0193ee7b00213791f7732bce0fc0c54f3b3 (patch) | |
tree | a2a34483e9df5bbb9e372bdd64b0d58ea681055e /drivers/firmware/efi/libstub/gop.c | |
parent | 019512f1fd373632577ecd3e8d721e48b71fb36a (diff) |
efi/libstub: Add a helper function to split 64-bit values
In several places 64-bit values need to be split up into two 32-bit
fields, in order to be backward-compatible with the old 32-bit ABIs.
Instead of open-coding this, add a helper function to set a 64-bit value
as two 32-bit fields.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200430182843.2510180-3-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/gop.c')
-rw-r--r-- | drivers/firmware/efi/libstub/gop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/firmware/efi/libstub/gop.c b/drivers/firmware/efi/libstub/gop.c index 216327d0b034..64cee0febae0 100644 --- a/drivers/firmware/efi/libstub/gop.c +++ b/drivers/firmware/efi/libstub/gop.c @@ -422,7 +422,6 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, efi_graphics_output_protocol_t *gop; efi_graphics_output_protocol_mode_t *mode; efi_graphics_output_mode_info_t *info; - efi_physical_addr_t fb_base; gop = find_gop(proto, size, handles); @@ -442,9 +441,8 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, si->lfb_width = info->horizontal_resolution; si->lfb_height = info->vertical_resolution; - fb_base = efi_table_attr(mode, frame_buffer_base); - si->lfb_base = lower_32_bits(fb_base); - si->ext_lfb_base = upper_32_bits(fb_base); + efi_set_u64_split(efi_table_attr(mode, frame_buffer_base), + &si->lfb_base, &si->ext_lfb_base); if (si->ext_lfb_base) si->capabilities |= VIDEO_CAPABILITY_64BIT_BASE; |