Hi Ard,

   There is some information in UEFI 2.4 spec  section 7.5.3  p258:  "The EFI 
System Table entry must use the GUID from the CapsuleGuid field of the 
EFI_CAPSULE_HEADER. The EFI System Table entry must point to an array of 
capsules that contain the same CapsuleGuid value. The array must be prefixed by 
a UINT32 that represents the size of the array of capsules". 

So my understanding is that the per-GUID capsule configuration table entries 
look like below layout:

For capsule guid xxx:          |  (u32) capsule number a | (u64)  1st capsule 
physical addr  | (u64)  2nd capsule physical addr | ...  |  (u64)  a-st capsule 
physical addr |
For capsule guid yyy:          |  (u32) capsule number b | (u64)  1st capsule 
physical addr  | (u64)  2nd capsule physical addr | ...  |  (u64)  b-st capsule 
physical addr |
...  
For capsule guid zzz:           |  (u32) capsule number c | (u64)  1st capsule 
physical addr  | (u64)  2nd capsule physical addr | ...  |  (u64)  c-st capsule 
physical addr |

The way you mentioned to go over the config table array (then we can get rid of 
global staff 'capsule' in struct efi) to get a group of capsules per-GUID is 
suitable.

This is my understanding, if wrong please correct me, thanks!

BR
qiuxu

-----Original Message-----
From: Ard Biesheuvel [mailto:[email protected]] 
Sent: Friday, March 3, 2017 11:20 PM
To: Zhuo, Qiuxu <[email protected]>
Cc: Matt Fleming <[email protected]>; [email protected]; Luck, 
Tony <[email protected]>
Subject: Re: [PATCH v2 0/2] capsule pstore backend

On 1 March 2017 at 17:59, Qiuxu Zhuo <[email protected]> wrote:
> *** BLURB HERE ***
>

FYI the UEFI spec is vague about the exact format of the per-GUID capsule 
configuration table entries, and so we have asked the USWG for clarification. 
In the mean time, I'd like to refrain from merging anything based on it, so 
unfortunately, we are going to have to park this for now.

Regards,
Ard.

> Qiuxu Zhuo (2):
>   efi/capsule: Add 'capsule' lookup support
>   efi: capsule pstore backend
>
>  drivers/firmware/efi/Kconfig          |  21 ++
>  drivers/firmware/efi/Makefile         |   1 +
>  drivers/firmware/efi/capsule-pstore.c | 527 
> ++++++++++++++++++++++++++++++++++
>  drivers/firmware/efi/capsule.c        | 107 +++++++
>  drivers/firmware/efi/efi.c            |   4 +
>  include/linux/efi.h                   |   4 +
>  6 files changed, 664 insertions(+)
>  create mode 100644 drivers/firmware/efi/capsule-pstore.c
> --
>
> Change Log (v1->v2):
>   - Use memremap() instead of ioremap() for firmware tables
>   - Remove "default n" in Kconfig file
>   - Move check_capsule_support() up a bit
>   - Update SoB chain
> --
> 2.9.0.GIT
>

Reply via email to