xref: /openbmc/bmcweb/features/redfish/include/registries/platform_message_registry.hpp (revision 4a102cd48c588d32c0a4d6610b4a9ed616f255f3)
140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3665e7602SGunnar Mills #pragma once
4665e7602SGunnar Mills /****************************************************************
5665e7602SGunnar Mills  *                 READ THIS WARNING FIRST
6665e7602SGunnar Mills  * This is an auto-generated header which contains definitions
7665e7602SGunnar Mills  * for Redfish DMTF defined messages.
8665e7602SGunnar Mills  * DO NOT modify this registry outside of running the
9665e7602SGunnar Mills  * parse_registries.py script.  The definitions contained within
10665e7602SGunnar Mills  * this file are owned by DMTF.  Any modifications to these files
11665e7602SGunnar Mills  * should be first pushed to the relevant registry in the DMTF
12665e7602SGunnar Mills  * github organization.
13665e7602SGunnar Mills  ***************************************************************/
14665e7602SGunnar Mills #include "registries.hpp"
15665e7602SGunnar Mills 
16665e7602SGunnar Mills #include <array>
17665e7602SGunnar Mills 
18665e7602SGunnar Mills // clang-format off
19665e7602SGunnar Mills 
20*4a102cd4SPatrick Williams namespace redfish::registries
21665e7602SGunnar Mills {
22*4a102cd4SPatrick Williams struct Platform
23*4a102cd4SPatrick Williams {
24*4a102cd4SPatrick Williams static constexpr Header header = {
25665e7602SGunnar Mills     "Copyright 2023 DMTF. All rights reserved.",
26665e7602SGunnar Mills     "#MessageRegistry.v1_6_2.MessageRegistry",
2756b81992SEd Tanous     1,
2856b81992SEd Tanous     0,
2956b81992SEd Tanous     1,
30665e7602SGunnar Mills     "Compute Platform Message Registry",
31665e7602SGunnar Mills     "en",
32665e7602SGunnar Mills     "This registry defines messages for compute platforms, covering topics related to processor, memory, and I/O device connectivity.",
33665e7602SGunnar Mills     "Platform",
34665e7602SGunnar Mills     "DMTF",
35665e7602SGunnar Mills };
36*4a102cd4SPatrick Williams 
37*4a102cd4SPatrick Williams static constexpr const char* url =
38665e7602SGunnar Mills     "https://redfish.dmtf.org/registries/Platform.1.0.1.json";
39665e7602SGunnar Mills 
40*4a102cd4SPatrick Williams static constexpr std::array registry =
41665e7602SGunnar Mills {
42665e7602SGunnar Mills     MessageEntry{
43665e7602SGunnar Mills         "OperatingSystemCrash",
44665e7602SGunnar Mills         {
45665e7602SGunnar Mills             "Indicates the operating system was halted due to a catastrophic error.",
46665e7602SGunnar Mills             "An operating system crash occurred.",
47665e7602SGunnar Mills             "Critical",
48665e7602SGunnar Mills             0,
49665e7602SGunnar Mills             {},
50665e7602SGunnar Mills             "Check additional diagnostic data if available.",
51665e7602SGunnar Mills         }},
52665e7602SGunnar Mills     MessageEntry{
53665e7602SGunnar Mills         "PlatformError",
54665e7602SGunnar Mills         {
55665e7602SGunnar Mills             "Indicates that a platform error occurred.",
56665e7602SGunnar Mills             "A platform error occurred.",
57665e7602SGunnar Mills             "Warning",
58665e7602SGunnar Mills             0,
59665e7602SGunnar Mills             {},
60665e7602SGunnar Mills             "Check additional diagnostic data if available.",
61665e7602SGunnar Mills         }},
62665e7602SGunnar Mills     MessageEntry{
63665e7602SGunnar Mills         "PlatformErrorAtLocation",
64665e7602SGunnar Mills         {
65665e7602SGunnar Mills             "Indicates that a platform error occurred and device or other location information is available.",
66665e7602SGunnar Mills             "A platform error occurred at location '%1'.",
67665e7602SGunnar Mills             "Warning",
68665e7602SGunnar Mills             1,
69665e7602SGunnar Mills             {
70665e7602SGunnar Mills                 "string",
71665e7602SGunnar Mills             },
72665e7602SGunnar Mills             "Check additional diagnostic data if available.",
73665e7602SGunnar Mills         }},
74665e7602SGunnar Mills     MessageEntry{
75665e7602SGunnar Mills         "UnhandledExceptionDetectedAfterReset",
76665e7602SGunnar Mills         {
77665e7602SGunnar Mills             "Indicates that an unhandled exception caused the platform to reset.",
78665e7602SGunnar Mills             "An unhandled exception caused a platform reset.",
79665e7602SGunnar Mills             "Critical",
80665e7602SGunnar Mills             0,
81665e7602SGunnar Mills             {},
82665e7602SGunnar Mills             "Check additional diagnostic data if available.",
83665e7602SGunnar Mills         }},
84665e7602SGunnar Mills 
85665e7602SGunnar Mills };
86665e7602SGunnar Mills 
87665e7602SGunnar Mills enum class Index
88665e7602SGunnar Mills {
89665e7602SGunnar Mills     operatingSystemCrash = 0,
90665e7602SGunnar Mills     platformError = 1,
91665e7602SGunnar Mills     platformErrorAtLocation = 2,
92665e7602SGunnar Mills     unhandledExceptionDetectedAfterReset = 3,
93665e7602SGunnar Mills };
94*4a102cd4SPatrick Williams }; // struct platform
95*4a102cd4SPatrick Williams 
96*4a102cd4SPatrick Williams [[gnu::constructor]] inline void registerPlatform()
97*4a102cd4SPatrick Williams { registerRegistry<Platform>(); }
98*4a102cd4SPatrick Williams 
99*4a102cd4SPatrick Williams } // namespace redfish::registries
100