soc/intel/alderlake: Add ADL-P 4+4 with 28W TDP
[coreboot.git] / src / lib / bmp_logo.c
blob330ed6fff4389bd7430837a67ce6fef1234dcda1
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <bootsplash.h>
5 #include <cbfs.h>
6 #include <cbmem.h>
7 #include <stdint.h>
9 static const struct cbmem_entry *logo_entry;
11 void bmp_load_logo(uint32_t *logo_ptr, uint32_t *logo_size)
13 void *logo_buffer;
15 /* CBMEM is locked for S3 resume path. */
16 if (acpi_is_wakeup_s3())
17 return;
19 logo_entry = cbmem_entry_add(CBMEM_ID_FSP_LOGO, 1 * MiB);
20 if (!logo_entry)
21 return;
23 logo_buffer = cbmem_entry_start(logo_entry);
24 if (!logo_buffer)
25 return;
27 *logo_size = cbfs_load("logo.bmp", logo_buffer, 1 * MiB);
28 if (*logo_size)
29 *logo_ptr = (uintptr_t)logo_buffer;
32 void bmp_release_logo(void)
34 if (logo_entry)
35 cbmem_entry_remove(logo_entry);
36 logo_entry = NULL;