PEL: Add altitude PEL registry entries

These will only be used on systems that use PELs and have the virtual
altitude sensor. The errors come from the sensor-monitor app.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Change-Id: I5fec3ec86a084f8c62f52194f2826c0565be32eb
diff --git a/extensions/openpower-pels/pel_values.cpp b/extensions/openpower-pels/pel_values.cpp
index 17e1d50..1a0343b 100644
--- a/extensions/openpower-pels/pel_values.cpp
+++ b/extensions/openpower-pels/pel_values.cpp
@@ -229,7 +229,7 @@
     {"usb_pgood", "USBPGD"},          {"ambient_temp", "AMBTEMP"},
     {"ambient_temp_back", "AMBBACK"}, {"ambient_perf_loss", "AMBPERF"},
     {"ac_module", "ACMODUL"},         {"fan_cable", "FANCBL"},
-    {"cable_continued", "CBLCONT"}};
+    {"cable_continued", "CBLCONT"},   {"altitude", "ALTTUDE"}};
 
 PELValues::const_iterator findByValue(uint32_t value, const PELValues& fields)
 {
diff --git a/extensions/openpower-pels/registry/message_registry.json b/extensions/openpower-pels/registry/message_registry.json
index daed092..e5ecc07 100644
--- a/extensions/openpower-pels/registry/message_registry.json
+++ b/extensions/openpower-pels/registry/message_registry.json
@@ -2331,6 +2331,67 @@
         },
 
         {
+            "Name": "xyz.openbmc_project.Sensor.Threshold.Error.AltitudeWarningHigh",
+            "Subsystem": "ext_env",
+            "ComponentID": "0x2800",
+            "Severity": "predictive",
+            "ActionFlags": ["service_action", "report"],
+
+            "SRC": {
+                "ReasonCode": "0x280A",
+                "Words6To9": {}
+            },
+
+            "CalloutsUsingAD": {
+                "ADName": "SENSOR_NAME",
+                "CalloutsWithTheirADValues": [
+                    {
+                        "ADValue": "/xyz/openbmc_project/sensors/altitude/Altitude",
+                        "Callouts": [
+                            {
+                                "CalloutList": [
+                                    { "Priority": "high", "SymbolicFRU": "altitude" }
+                                ]
+                            }
+                        ]
+                    }
+                ]
+            },
+
+            "Documentation": {
+                "Description": "An altitude sensor exceeded its warning threshold.",
+                "Message": "An altitude sensor exceeded its warning threshold.",
+                "Notes": [
+                    "The virtual altitude sensor crossed its warning threshold value",
+                    " and a symbolic FRU will be added."
+                ]
+            }
+        },
+
+        {
+            "Name": "xyz.openbmc_project.Sensor.Threshold.Error.AltitudeWarningHighClear",
+            "Subsystem": "ext_env",
+            "ComponentID": "0x2800",
+            "Severity": "non_error",
+            "ActionFlags": ["report"],
+            "EventType": "env_normal",
+
+            "SRC": {
+                "ReasonCode": "0x280B",
+                "Words6To9": {}
+            },
+
+            "Documentation": {
+                "Description": "An altitude sensor is under its warning threshold.",
+                "Message": "An altitude sensor is under its warning threshold.",
+                "Notes": [
+                    "The virtual altitude sensor is under its warning threshold value",
+                    " and a symbolic FRU will be added."
+                ]
+            }
+        },
+
+        {
             "Name": "com.ibm.VPD.Error.InvalidEepromPath",
             "Subsystem": "cec_vpd",
             "ComponentID": "0x4000",
diff --git a/extensions/openpower-pels/registry/schema/schema.json b/extensions/openpower-pels/registry/schema/schema.json
index 48397a9..fe42ff1 100644
--- a/extensions/openpower-pels/registry/schema/schema.json
+++ b/extensions/openpower-pels/registry/schema/schema.json
@@ -438,7 +438,7 @@
         {
             "description": "The symbolic FRU callout.",
             "type": "string",
-            "enum": ["service_docs", "pwrsply", "air_mover", "pgood_part", "usb_pgood", "ambient_temp", "ambient_temp_back", "ambient_perf_loss", "ac_module", "fan_cable", "cable_continued"]
+            "enum": ["service_docs", "pwrsply", "air_mover", "pgood_part", "usb_pgood", "ambient_temp", "ambient_temp_back", "ambient_perf_loss", "ac_module", "fan_cable", "cable_continued", "altitude"]
         },
 
         "symbolicFRUTrusted":