hw/nvram/fw_cfg: Add fw_cfg_arch_key_name()

Add fw_cfg_arch_key_name() which returns the name of
an architecture-specific key.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190422195020.1494-3-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2019-04-22 15:49:41 +02:00
parent 1f80b0d67e
commit b15c0f7d55
5 changed files with 38 additions and 1 deletions

View file

@ -226,4 +226,18 @@ FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr,
FWCfgState *fw_cfg_find(void);
bool fw_cfg_dma_enabled(void *opaque);
/**
* fw_cfg_arch_key_name:
*
* @key: The uint16 selector key.
*
* The key is architecture-specific (the FW_CFG_ARCH_LOCAL mask is expected
* to be set in the key).
*
* Returns: The stringified architecture-specific name if the selector
* refers to a well-known numerically defined item, or NULL on
* key lookup failure.
*/
const char *fw_cfg_arch_key_name(uint16_t key);
#endif