blob: f466caa4937d650396d123685db27bc661041101 [file] [log] [blame]
Christopher Ferris7ac54f52024-08-07 21:07:12 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
7#ifndef _UAPI_ASM_POWERPC_PAPR_PDSM_H_
8#define _UAPI_ASM_POWERPC_PAPR_PDSM_H_
9#include <linux/types.h>
10#include <linux/ndctl.h>
11#define ND_PDSM_PAYLOAD_MAX_SIZE 184
12#define ND_PDSM_HDR_SIZE (sizeof(struct nd_pkg_pdsm) - ND_PDSM_PAYLOAD_MAX_SIZE)
13#define PAPR_PDSM_DIMM_HEALTHY 0
14#define PAPR_PDSM_DIMM_UNHEALTHY 1
15#define PAPR_PDSM_DIMM_CRITICAL 2
16#define PAPR_PDSM_DIMM_FATAL 3
17#define PDSM_DIMM_HEALTH_RUN_GAUGE_VALID 1
18#define PDSM_DIMM_DSC_VALID 2
19struct nd_papr_pdsm_health {
20 union {
21 struct {
22 __u32 extension_flags;
23 __u8 dimm_unarmed;
24 __u8 dimm_bad_shutdown;
25 __u8 dimm_bad_restore;
26 __u8 dimm_scrubbed;
27 __u8 dimm_locked;
28 __u8 dimm_encrypted;
29 __u16 dimm_health;
30 __u16 dimm_fuel_gauge;
31 __u64 dimm_dsc;
32 };
33 __u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE];
34 };
35};
36#define PDSM_SMART_INJECT_HEALTH_FATAL (1 << 0)
37#define PDSM_SMART_INJECT_BAD_SHUTDOWN (1 << 1)
38struct nd_papr_pdsm_smart_inject {
39 union {
40 struct {
41 __u32 flags;
42 __u8 fatal_enable;
43 __u8 unsafe_shutdown_enable;
44 };
45 __u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE];
46 };
47};
48enum papr_pdsm {
49 PAPR_PDSM_MIN = 0x0,
50 PAPR_PDSM_HEALTH,
51 PAPR_PDSM_SMART_INJECT,
52 PAPR_PDSM_MAX,
53};
54union nd_pdsm_payload {
55 struct nd_papr_pdsm_health health;
56 struct nd_papr_pdsm_smart_inject smart_inject;
57 __u8 buf[ND_PDSM_PAYLOAD_MAX_SIZE];
58} __attribute__((__packed__));
59struct nd_pkg_pdsm {
60 __s32 cmd_status;
61 __u16 reserved[2];
62 union nd_pdsm_payload payload;
63} __attribute__((__packed__));
64#endif