Skip to contentSkip to conversation

sal record header concern

PATCH xb 3 participants 5 messages Dec 12, 2005 – Dec 13, 2005

lore
Share & tools
lore

xb

author
#0 lore raw

Hello Keith and all

It seems there is a concern around the SAL record header:
SEVERITY item is defined as a 8 bits item in SAL documentation
($B.2.1 rev december 2003), but as an u16 in sal.h.
This has the side effect that current code in mca.c does not call ia64_sal_clear_state_info() upon receiving corrected platform errors (priority is reported as 258 instead of 2).

include/asm-ia64/sal.h 2005-12-12 10:19:17.000000000 +0100 renamed from include/asm-ia64/sal.h~ 2005-08-29 18:55:27.000000000 +0200 +0 -0
@@ -320,7 +320,8 @@

typedef struct sal_log_record_header {
u64 id; /* Unique monotonically increasing ID */
sal_log_revision_t revision; /* Major and Minor revision of
header */

-    u16 severity;            /* Error Severity */
+    u8 severity;            /* Error Severity */
+    u8 validation_bits;        /* Validation Bits */

u32 len; /* Length of this error log in bytes */
sal_log_timestamp_t timestamp; /* Timestamp */
efi_guid_t platform_guid; /* Unique OEM Platform ID */

begin:vcard
fn:Xavier Bru
n:Bru;Xavier
adr:;;1 rue de Provence, BP 208;38432 Echirolles Cedex;;;France email;internet:[email protected]
title:BULL/DT/Open Software/linux/ia64
tel;work:+33 (0)4 76 29 77 45
tel;fax:+33 (0)4 76 29 77 70
x-mozilla-html:TRUE
url:http://www.bull.com
version:2.1
end:vcard

#1 lore raw
Quoted 4 lines · xb

This is a multi-part message in MIME format. --------------040306040709010208040006
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Please change your mailer not to use format=flowed. It destroys the patch format.

Quoted 6 lines

It seems there is a concern around the SAL record header:
SEVERITY item is defined as a 8 bits item in SAL documentation
($B.2.1 rev december 2003), but as an u16 in sal.h.
This has the side effect that current code in mca.c does not call ia64_sal_clear_state_info() upon receiving corrected platform errors (priority is reported as 258 instead of 2).

I agree that the record definition is wrong, it should be a pair of bytes. However I want to check why you are seeing a value of 258 instead of 2. hd output on a typical SGI salinfo record header

0000  03 00 00 03  F4 A1 02 00  02 00 02 00  38 02 00 00  * ............8... *
      |-------- ID ----------|  |rev| |sev|  |--length-|

Even though the severity code is defined as 2 bytes instead of the correct 1 byte, it still gives the value '2' in little endian mode.

Is your severity "code" set to 02 80? VALIDATION_BITS Bit 0 = if 1, the OEM_PLATFORM_ID field below contains valid information.

Useful command 'hd', defined as

hexdump  -e '"%04.4_Ax\n"' \
         -e '"%04.4_ax  "' \
         -e '4/1 "%02X " "  " 4/1 "%02X " "  " 4/1 "%02X " "  " 4/1 "%02X "' \
         -e '"  * " 16/1 "%_p" " *"' \
         -e '"\n"' \
         $*
#2 lore raw
In reply to xb
Quoted 2 lines

Is your severity "code" set to 02 80? VALIDATION_BITS Bit 0 = if 1, the OEM_PLATFORM_ID field below contains valid information.

If the 16-bit value is 258, then the two bytes must be "02 01" (since 258 = 2 + 1*256). This looks perfectly legal ... the "1" in the next byte up (the VALIDATION_BITS) indicating that the OEM_PLATFORM_ID contains information.

-Tony

#3 lore raw
In reply to xb
Quoted 7 lines · Tony
Quoted 2 lines

Is your severity "code" set to 02 80? VALIDATION_BITS Bit 0 = if 1, the OEM_PLATFORM_ID field below contains valid information.

If the 16-bit value is 258, then the two bytes must be "02 01" (since 258 = 2 + 1*256). This looks perfectly legal ... the "1" in the next byte up (the VALIDATION_BITS) indicating that the OEM_PLATFORM_ID contains information.

-ENOTENOUGHCOFFEE. Every now and again my brain slips into big endian mode (spending too much time on IBM mainframes) and starts numbering bits left to right :(

author
#4 lore raw
In reply to xb
Quoted 12 lines · Tony
Quoted 4 lines

Is your severity "code" set to 02 80? VALIDATION_BITS Bit 0 = if 1, the OEM_PLATFORM_ID field below contains valid information.

If the 16-bit value is 258, then the two bytes must be "02 01" (since 258 = 2 + 1*256). This looks perfectly legal ... the "1" in the next byte up (the VALIDATION_BITS) indicating that the OEM_PLATFORM_ID contains information.

(quoted diff) +0 -2
-Tony
-
Quoted 6 lines

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

This is exactly what occurs. Thanks.

begin:vcard
fn:Xavier Bru
n:Bru;Xavier
adr:;;1 rue de Provence, BP 208;38432 Echirolles Cedex;;;France email;internet:[email protected]
title:BULL/DT/Open Software/linux/ia64
tel;work:+33 (0)4 76 29 77 45
tel;fax:+33 (0)4 76 29 77 70
x-mozilla-html:TRUE
url:http://www.bull.com
version:2.1
end:vcard