Felix Held | f0c5276 | 2021-05-28 17:59:09 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
| 4 | #include <arch/bert_storage.h> |
| 5 | #include <console/console.h> |
| 6 | #include <types.h> |
| 7 | |
| 8 | enum cb_err acpi_soc_get_bert_region(void **region, size_t *length) |
| 9 | { |
| 10 | /* |
| 11 | * Skip the table if no errors are present. ACPI driver reports |
| 12 | * a table with a 0-length region: |
| 13 | * BERT: [Firmware Bug]: table invalid. |
| 14 | */ |
| 15 | if (!bert_should_generate_acpi_table()) |
| 16 | return CB_ERR; |
| 17 | |
| 18 | bert_errors_region(region, length); |
Felix Held | 5d084dd | 2021-06-15 19:29:37 +0200 | [diff] [blame] | 19 | if (!*region) { |
Julius Werner | e966595 | 2022-01-21 17:06:20 -0800 | [diff] [blame] | 20 | printk(BIOS_ERR, "Can't find BERT storage area\n"); |
Felix Held | f0c5276 | 2021-05-28 17:59:09 +0200 | [diff] [blame] | 21 | return CB_ERR; |
| 22 | } |
| 23 | |
| 24 | return CB_SUCCESS; |
| 25 | } |