From: "Jan Beulich" Subject: Re: [PATCH V4 07/15] Move x86 specific video and disk probing code Date: Fri, 12 Sep 2014 08:12:33 +0100 Message-ID: <5412B9010200007800034501@mail.emea.novell.com> References: <1410310325-4509-1-git-send-email-roy.franz@linaro.org> <1410310325-4509-8-git-send-email-roy.franz@linaro.org> <5411CD2E0200007800033F66@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roy Franz Cc: keir , Ian Campbell , tim , xen-devel , Stefano Stabellini , Fu Wei List-Id: xen-devel@lists.xenproject.org >>> On 11.09.14 at 20:30, wrote: > On Thu, Sep 11, 2014 at 7:26 AM, Jan Beulich wrote: >>>>> On 10.09.14 at 02:51, wrote: >>> @@ -811,189 +785,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE > *SystemTable) >>> cfg.addr = 0; >>> >>> dir_handle->Close(dir_handle); >>> - >>> - if ( gop && !base_video ) >>> - { >>> - for ( i = size = 0; i < gop->Mode->MaxMode; ++i ) >>> - { >>> - unsigned int bpp = 0; >>> - >>> - status = gop->QueryMode(gop, i, &info_size, &mode_info); >>> - if ( EFI_ERROR(status) ) >>> - continue; >>> - switch ( mode_info->PixelFormat ) >>> - { >>> - case PixelBitMask: >>> - bpp = hweight32(mode_info->PixelInformation.RedMask | >>> - mode_info->PixelInformation.GreenMask | >>> - mode_info->PixelInformation.BlueMask); >>> - break; >>> - case PixelRedGreenBlueReserved8BitPerColor: >>> - case PixelBlueGreenRedReserved8BitPerColor: >>> - bpp = 24; >>> - break; >>> - default: >>> - continue; >>> - } >>> - if ( cols == mode_info->HorizontalResolution && >>> - rows == mode_info->VerticalResolution && >>> - (!depth || bpp == depth) ) >>> - { >>> - gop_mode = i; >>> - break; >>> - } >>> - if ( !cols && !rows && >>> - mode_info->HorizontalResolution * >>> - mode_info->VerticalResolution > size ) >>> - { >>> - size = mode_info->HorizontalResolution * >>> - mode_info->VerticalResolution; >>> - gop_mode = i; >>> - } >>> - } >>> - } >> >> This together with ... >> >>> @@ -1075,77 +867,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE > *SystemTable) >>> l3_bootmap[l3_table_offset(xen_phys_start + (8 << L2_PAGETABLE_SHIFT) - > 1)] = >>> l3e_from_paddr((UINTN)l2_bootmap, __PAGE_HYPERVISOR); >>> >>> - if ( gop ) >>> - { >>> - int bpp = 0; >>> - >>> - /* Set graphics mode. */ >>> - if ( gop_mode < gop->Mode->MaxMode && gop_mode != gop->Mode->Mode ) >>> - gop->SetMode(gop, gop_mode); >> >> ... this isn't arch-specific again. > > I'll review the video stuff again, but I only moved what seemed to be > VGA support specific code to the x86 arch file. > VGA support is currently not part of the ARM build - the VGA setup > code in boot.c updates global variables that are > not present. I really doubt that VGA support is relevant to ARM so I > move the code to the x86 specific file rather than > trying to add VGA support to ARM. Yes, VGA specific code very likely is x86-specific. But some parts of this are video related in a fashion broader than VGA, and I don't think there's no video at all on ARM's EFI (now and forever)? Jan