RE: [PATCH v2 1/8] efi: Fix IA32/X64 Processor Error Record definition

2018-02-27 Thread Ghannam, Yazen
> -Original Message-
> From: Borislav Petkov [mailto:b...@suse.de]
> Sent: Tuesday, February 27, 2018 5:47 AM
> To: Ghannam, Yazen <yazen.ghan...@amd.com>
> Cc: linux-efi@vger.kernel.org; linux-ker...@vger.kernel.org;
> ard.biesheu...@linaro.org; x...@kernel.org
> Subject: Re: [PATCH v2 1/8] efi: Fix IA32/X64 Processor Error Record
> definition
> 
> On Mon, Feb 26, 2018 at 01:38:57PM -0600, Yazen Ghannam wrote:
> > From: Yazen Ghannam <yazen.ghan...@amd.com>
> >
> > Based on UEFI 2.7 Table 255. Processor Error Record, the "Local APIC_ID"
> 
> My pdf says this is table 252.
> 

Right. I'm using the latest which is UEFI 2.7 Errata A. It turns out that the 
table
numbering is different between the base and the errata specs. I can change this.

> > field is 8 bytes but Linux defines this field as 1 byte.
> >
> > Fix this in the struct cper_sec_proc_ia definition.
> >
> > Signed-off-by: Yazen Ghannam <yazen.ghan...@amd.com>
> > ---
> > Link:
> > https://lkml.kernel.org/r/20180223200333.6410-2-
> yazen.ghan...@amd.com
> >
> > v1->v2:
> > * No changes.
> >
> >  include/linux/cper.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/cper.h b/include/linux/cper.h
> > index d14ef4e77c8a..4b5f8459b403 100644
> > --- a/include/linux/cper.h
> > +++ b/include/linux/cper.h
> > @@ -381,7 +381,7 @@ struct cper_sec_proc_generic {
> >  /* IA32/X64 Processor Error Section */
> >  struct cper_sec_proc_ia {
> > __u64   validation_bits;
> > -   __u8lapic_id;
> > +   __u64   lapic_id;
> > __u8cpuid[48];
> 
> Ok, that processor error record has a variable length structure at byte
> offset 64 and we don't have it in this struct.
> 
> I guess I'll see it in the following patches but right now it looks
> like that "Processor Error Info" thing is simply situated after that
> Processor Error Record so we are supposed to simply find the info at
> offset 64...
> 
> /me continues reading...

The error and context info tables are defined in other structs and we
access them by offsetting from the previous table.

Thanks,
Yazen


Re: [PATCH v2 1/8] efi: Fix IA32/X64 Processor Error Record definition

2018-02-27 Thread Borislav Petkov
On Mon, Feb 26, 2018 at 01:38:57PM -0600, Yazen Ghannam wrote:
> From: Yazen Ghannam 
> 
> Based on UEFI 2.7 Table 255. Processor Error Record, the "Local APIC_ID"

My pdf says this is table 252.

> field is 8 bytes but Linux defines this field as 1 byte.
> 
> Fix this in the struct cper_sec_proc_ia definition.
> 
> Signed-off-by: Yazen Ghannam 
> ---
> Link:
> https://lkml.kernel.org/r/20180223200333.6410-2-yazen.ghan...@amd.com
> 
> v1->v2:
> * No changes.
> 
>  include/linux/cper.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/cper.h b/include/linux/cper.h
> index d14ef4e77c8a..4b5f8459b403 100644
> --- a/include/linux/cper.h
> +++ b/include/linux/cper.h
> @@ -381,7 +381,7 @@ struct cper_sec_proc_generic {
>  /* IA32/X64 Processor Error Section */
>  struct cper_sec_proc_ia {
>   __u64   validation_bits;
> - __u8lapic_id;
> + __u64   lapic_id;
>   __u8cpuid[48];

Ok, that processor error record has a variable length structure at byte
offset 64 and we don't have it in this struct.

I guess I'll see it in the following patches but right now it looks
like that "Processor Error Info" thing is simply situated after that
Processor Error Record so we are supposed to simply find the info at
offset 64...

/me continues reading...

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/8] efi: Fix IA32/X64 Processor Error Record definition

2018-02-26 Thread Yazen Ghannam
From: Yazen Ghannam 

Based on UEFI 2.7 Table 255. Processor Error Record, the "Local APIC_ID"
field is 8 bytes but Linux defines this field as 1 byte.

Fix this in the struct cper_sec_proc_ia definition.

Signed-off-by: Yazen Ghannam 
---
Link:
https://lkml.kernel.org/r/20180223200333.6410-2-yazen.ghan...@amd.com

v1->v2:
* No changes.

 include/linux/cper.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cper.h b/include/linux/cper.h
index d14ef4e77c8a..4b5f8459b403 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -381,7 +381,7 @@ struct cper_sec_proc_generic {
 /* IA32/X64 Processor Error Section */
 struct cper_sec_proc_ia {
__u64   validation_bits;
-   __u8lapic_id;
+   __u64   lapic_id;
__u8cpuid[48];
 };
 
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html