Subrata Banik | 3ba6f8c | 2022-03-23 03:22:28 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <fsp/api.h> |
| 5 | #include <fsp/fsp_debug_event.h> |
| 6 | #include <fsp/util.h> |
| 7 | |
| 8 | static const uint8_t fsp_string_type_guid[16] = { |
| 9 | 0x80, 0x10, 0xd1, 0x92, 0x6f, 0x49, 0x95, 0x4d, |
| 10 | 0xbe, 0x7e, 0x03, 0x74, 0x88, 0x38, 0x2b, 0x0a |
| 11 | }; |
| 12 | |
| 13 | static efi_return_status_t print_fsp_string_data(const efi_status_code_data_t *data) |
| 14 | { |
Subrata Banik | d8f6d2a | 2022-05-18 15:11:38 +0530 | [diff] [blame] | 15 | printk(get_log_level(), "%s", ((efi_status_code_string_data *) data)->String.Ascii); |
Subrata Banik | 3ba6f8c | 2022-03-23 03:22:28 +0530 | [diff] [blame] | 16 | |
| 17 | return FSP_SUCCESS; |
| 18 | } |
| 19 | |
| 20 | efi_return_status_t fsp_debug_event_handler(efi_status_code_type_t ignored1, |
| 21 | efi_status_code_value_t ignored2, efi_uint32_t ignored3, efi_guid_t *ignored4, |
| 22 | efi_status_code_data_t *data) |
| 23 | { |
| 24 | if (!fsp_guid_compare((uint8_t *)&(data->Type), fsp_string_type_guid)) |
| 25 | return FSP_NOT_FOUND; |
| 26 | |
| 27 | return print_fsp_string_data(data); |
| 28 | } |