[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/4] Grab the EFI System Resource Table and check it


  • To: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 27 Apr 2022 10:42:28 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wd/lS6DAzvGxXNKYuj+6202qrNiR9inebJj7nAq0WMg=; b=gdXl8INe217FLIqvlqIOVdTYIyAMVV/2uQFw7oTEDmgZ4y0XBptfJs2q8eMzHhW3zoqoQGZ3L+ZGlNKMc/CFuV47IixHDGKRPri+tPaYDpbA4+FAaRLCfNlzB2wMORf8ZB3Xw4/mQNEd5uT7VkZZ4pdM2zBhUL8jmaEZUl28nnurwq4EsCeiNKnyI5mymUv2bg5rq0h5trvaSqU7ereGJR3vN129sSRAsPKFWT0POmAU4AWGxQZhyCruufo++ftamR/T1I2d4M/MhGt9LqjX962+BsFul7aaylnPwTTsJHecEYG6Mu1rDGGesp+qTch+zcV5ho614gPlHjjtUiYPiA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nXHqLgEHOt0rnfe1GhPxF16ciy/sWVg4in7lCd945NrmkZ7xsxU8TO2tTgXPCergBnnnHPS8XB9aePhCDYRPJXdDGQfas+ocpcajpFx7K4cNUdGx7jYTsdXylyosZc9AIPYM6iflMrkYtQtjaqYUT3GlqEhlMTxdKfGI/1j0LViPAsdFOGjqRZN3uASDcjlPCAv9ZREVJvPqBHY8V3RKEV5nD0g/s+YH8uO214zOqxVw3lftsLFACoXVz+3H6IkXDWt3sa4ufO7QXTjXC+CmFAvBf/Xx83EFpw2iRHotCZeE7mp/Bmgmp5b2gV61XfwgIMT+BKqrOtOySxnRjEjlkA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 27 Apr 2022 08:42:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.04.2022 17:40, Demi Marie Obenour wrote:
> @@ -1056,19 +1091,19 @@ static void __init efi_exit_boot(EFI_HANDLE 
> ImageHandle, EFI_SYSTEM_TABLE *Syste
>      EFI_STATUS status;
>      UINTN info_size = 0, map_key;
>      bool retry;
> -#ifdef CONFIG_EFI_SET_VIRTUAL_ADDRESS_MAP
>      unsigned int i;
> -#endif
>  
>      efi_bs->GetMemoryMap(&info_size, NULL, &map_key,
>                           &efi_mdesc_size, &mdesc_ver);
> -    info_size += 8 * efi_mdesc_size;
> +    info_size += 8 * (efi_mdesc_size + 1);
>      efi_memmap = efi_arch_allocate_mmap_buffer(info_size);
>      if ( !efi_memmap )
>          blexit(L"Unable to allocate memory for EFI memory map");
>  
>      for ( retry = false; ; retry = true )
>      {
> +        esrt_desc = (const EFI_MEMORY_DESCRIPTOR *)EFI_INVALID_TABLE_ADDR;

Sorry, one more question here: Why is NULL not good enough?

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.