PEL: Convert component ID list to JSON

With a machine readable list of BMC PEL component IDs, the PEL parsers
will be able to use it to look up component names for display.

The component ID names all have 'bmc' in them to avoid confusion with
similar components in other subsystems, like hostboot.  This was added
at the request of hostboot.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia08dee13695a55f34885940348cb44bce9cb7bb5
diff --git a/extensions/openpower-pels/meson.build b/extensions/openpower-pels/meson.build
index 7116668..11bc4f4 100644
--- a/extensions/openpower-pels/meson.build
+++ b/extensions/openpower-pels/meson.build
@@ -135,6 +135,7 @@
 
 install_data(
     'registry/message_registry.json',
+    'registry/O_component_ids.json',
     install_dir: get_option('datadir') / 'phosphor-logging/pels',
 )
 
diff --git a/extensions/openpower-pels/registry/ComponentIDs.md b/extensions/openpower-pels/registry/ComponentIDs.md
deleted file mode 100644
index 925ff79..0000000
--- a/extensions/openpower-pels/registry/ComponentIDs.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# PEL Component ID List
-
-See [here](README.md#component-ids) for details on how PEL component IDs are
-used.
-
-| Component ID | Repository |
-|--------------|------------|
-| 0x1000       | Common Errors that span repositories |
-| 0x2000       | phosphor-logging |
-| 0x2700       | phosphor-power |
-| 0x2800       | phosphor-fan-presence |
-| 0x3000       | openpower-proc-control |
-| 0x3100       | openpower-hw-isolation |
-| 0x3400       | phosphor-state-manager |
-| 0x3500       | Processor Errors that span repositories |
-| 0x3600       | phosphor-bmc-code-mgmt |
-| 0x4000       | openpower-vpd-parser |
-| 0x5000       | ibm-panel |
-| 0xC100       | openpower-debug-collector |
-| 0xD100       | openpower-hardware-diags (attn-handler) |
-| 0xE500       | openpower-hardware-diags |
diff --git a/extensions/openpower-pels/registry/O_component_ids.json b/extensions/openpower-pels/registry/O_component_ids.json
new file mode 100644
index 0000000..6ffa6ec
--- /dev/null
+++ b/extensions/openpower-pels/registry/O_component_ids.json
@@ -0,0 +1,16 @@
+{
+    "1000": "bmc common function",
+    "2000": "bmc error logging",
+    "2700": "bmc power and thermal",
+    "2800": "bmc fans",
+    "3000": "bmc host processor control",
+    "3100": "bmc hardware isolation",
+    "3400": "bmc state manager",
+    "3500": "bmc common host processor errors",
+    "3600": "bmc code management",
+    "4000": "bmc vpd",
+    "5000": "bmc panel",
+    "C100": "bmc system dump collector",
+    "D100": "bmc hw diags attention handler",
+    "E500": "bmc hw diags"
+}
diff --git a/extensions/openpower-pels/registry/README.md b/extensions/openpower-pels/registry/README.md
index fa6b923..3e55b43 100644
--- a/extensions/openpower-pels/registry/README.md
+++ b/extensions/openpower-pels/registry/README.md
@@ -26,7 +26,9 @@
 Component IDs will be unique on a per-repository basis for errors unique to
 that repository.  When the same errors are created by multiple repositories,
 those errors will all share the same component ID.  The master list of
-component IDs is [here](ComponentIDs.md).
+component IDs is [here](O_component_ids.json).  That file can used by PEL
+parsers to display a name for the component ID.  The 'O' in the name is the
+creator ID value for BMC created PELs.
 
 ## Message Registry Fields
 The message registry schema is [here](schema/schema.json), and the message
@@ -410,7 +412,7 @@
 
 1. Update message_registry.json to add the new errors.
 2. If a new component ID is used (usually the first byte of the SRC reason
-   code), document it in ComponentIDs.md.
+   code), document it in O_component_ids.json.
 3. Validate the file. It must be valid JSON and obey the schema.  The
    `process_registry.py` script in `extensions/openpower-pels/registry/tools`
    will validate both, though it requires the python-jsonschema package to do