Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Intel */ |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013, Intel Corporation |
| 4 | * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __FSP_HOB_H__ |
| 8 | #define __FSP_HOB_H__ |
| 9 | |
Park, Aiden | 538aec9 | 2019-08-03 08:30:31 +0000 | [diff] [blame] | 10 | #include <asm/hob.h> |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 11 | |
Bin Meng | 3c8b48a | 2017-08-15 22:41:52 -0700 | [diff] [blame] | 12 | enum pixel_format { |
| 13 | pixel_rgbx_8bpc, /* RGB 8 bit per color */ |
| 14 | pixel_bgrx_8bpc, /* BGR 8 bit per color */ |
| 15 | pixel_bitmask, |
| 16 | }; |
| 17 | |
| 18 | struct __packed hob_graphics_info { |
| 19 | phys_addr_t fb_base; /* framebuffer base address */ |
| 20 | u32 fb_size; /* framebuffer size */ |
| 21 | u32 version; |
| 22 | u32 width; |
| 23 | u32 height; |
| 24 | enum pixel_format pixel_format; |
| 25 | u32 red_mask; |
| 26 | u32 green_mask; |
| 27 | u32 blue_mask; |
| 28 | u32 reserved_mask; |
| 29 | u32 pixels_per_scanline; |
| 30 | }; |
| 31 | |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 32 | /* FSP specific GUID HOB definitions */ |
Bin Meng | db60d86 | 2014-12-17 15:50:49 +0800 | [diff] [blame] | 33 | #define FSP_GUID_DATA1 0x912740be |
| 34 | #define FSP_GUID_DATA2 0x2284 |
| 35 | #define FSP_GUID_DATA3 0x4734 |
| 36 | #define FSP_GUID_DATA4_0 0xb9 |
| 37 | #define FSP_GUID_DATA4_1 0x71 |
| 38 | #define FSP_GUID_DATA4_2 0x84 |
| 39 | #define FSP_GUID_DATA4_3 0xb0 |
| 40 | #define FSP_GUID_DATA4_4 0x27 |
| 41 | #define FSP_GUID_DATA4_5 0x35 |
| 42 | #define FSP_GUID_DATA4_6 0x3f |
| 43 | #define FSP_GUID_DATA4_7 0x0c |
| 44 | |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 45 | #define FSP_GUID_BYTE0 0xbe |
| 46 | #define FSP_GUID_BYTE1 0x40 |
| 47 | #define FSP_GUID_BYTE2 0x27 |
| 48 | #define FSP_GUID_BYTE3 0x91 |
| 49 | #define FSP_GUID_BYTE4 0x84 |
| 50 | #define FSP_GUID_BYTE5 0x22 |
| 51 | #define FSP_GUID_BYTE6 0x34 |
| 52 | #define FSP_GUID_BYTE7 0x47 |
| 53 | #define FSP_GUID_BYTE8 FSP_GUID_DATA4_0 |
| 54 | #define FSP_GUID_BYTE9 FSP_GUID_DATA4_1 |
| 55 | #define FSP_GUID_BYTE10 FSP_GUID_DATA4_2 |
| 56 | #define FSP_GUID_BYTE11 FSP_GUID_DATA4_3 |
| 57 | #define FSP_GUID_BYTE12 FSP_GUID_DATA4_4 |
| 58 | #define FSP_GUID_BYTE13 FSP_GUID_DATA4_5 |
| 59 | #define FSP_GUID_BYTE14 FSP_GUID_DATA4_6 |
| 60 | #define FSP_GUID_BYTE15 FSP_GUID_DATA4_7 |
| 61 | |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 62 | #define FSP_HEADER_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 63 | EFI_GUID(FSP_GUID_DATA1, FSP_GUID_DATA2, FSP_GUID_DATA3, \ |
| 64 | FSP_GUID_DATA4_0, FSP_GUID_DATA4_1, FSP_GUID_DATA4_2, \ |
| 65 | FSP_GUID_DATA4_3, FSP_GUID_DATA4_4, FSP_GUID_DATA4_5, \ |
| 66 | FSP_GUID_DATA4_6, FSP_GUID_DATA4_7) |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 67 | |
| 68 | #define FSP_NON_VOLATILE_STORAGE_HOB_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 69 | EFI_GUID(0x721acf02, 0x4d77, 0x4c2a, \ |
| 70 | 0xb3, 0xdc, 0x27, 0x0b, 0x7b, 0xa9, 0xe4, 0xb0) |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 71 | |
Simon Glass | fffb220 | 2019-09-25 08:11:34 -0600 | [diff] [blame] | 72 | #define FSP_VARIABLE_NV_DATA_HOB_GUID \ |
| 73 | EFI_GUID(0xa034147d, 0x690c, 0x4154, \ |
| 74 | 0x8d, 0xe6, 0xc0, 0x44, 0x64, 0x1d, 0xe9, 0x42) |
| 75 | |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 76 | #define FSP_BOOTLOADER_TEMP_MEM_HOB_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 77 | EFI_GUID(0xbbcff46c, 0xc8d3, 0x4113, \ |
| 78 | 0x89, 0x85, 0xb9, 0xd4, 0xf3, 0xb3, 0xf6, 0x4e) |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 79 | |
| 80 | #define FSP_HOB_RESOURCE_OWNER_FSP_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 81 | EFI_GUID(0x69a79759, 0x1373, 0x4367, \ |
| 82 | 0xa6, 0xc4, 0xc7, 0xf5, 0x9e, 0xfd, 0x98, 0x6e) |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 83 | |
| 84 | #define FSP_HOB_RESOURCE_OWNER_TSEG_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 85 | EFI_GUID(0xd038747c, 0xd00c, 0x4980, \ |
| 86 | 0xb3, 0x19, 0x49, 0x01, 0x99, 0xa4, 0x7d, 0x55) |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 87 | |
| 88 | #define FSP_HOB_RESOURCE_OWNER_GRAPHICS_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 89 | EFI_GUID(0x9c7c3aa7, 0x5332, 0x4917, \ |
| 90 | 0x82, 0xb9, 0x56, 0xa5, 0xf3, 0xe6, 0x2a, 0x07) |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 91 | |
Bin Meng | f3c0632 | 2017-08-15 22:41:51 -0700 | [diff] [blame] | 92 | /* The following GUIDs are newly introduced in FSP spec 1.1 */ |
| 93 | |
| 94 | #define FSP_HOB_RESOURCE_OWNER_BOOTLOADER_TOLUM_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 95 | EFI_GUID(0x73ff4f56, 0xaa8e, 0x4451, \ |
| 96 | 0xb3, 0x16, 0x36, 0x35, 0x36, 0x67, 0xad, 0x44) |
Bin Meng | f3c0632 | 2017-08-15 22:41:51 -0700 | [diff] [blame] | 97 | |
Bin Meng | 3c8b48a | 2017-08-15 22:41:52 -0700 | [diff] [blame] | 98 | #define FSP_GRAPHICS_INFO_HOB_GUID \ |
Park, Aiden | 0961cf7 | 2019-08-03 08:30:20 +0000 | [diff] [blame] | 99 | EFI_GUID(0x39f62cce, 0x6825, 0x4669, \ |
| 100 | 0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07) |
Bin Meng | 3c8b48a | 2017-08-15 22:41:52 -0700 | [diff] [blame] | 101 | |
Simon Glass | fe6d294 | 2020-09-22 14:54:49 -0600 | [diff] [blame] | 102 | /* The following GUIDs are observed with FSP 2.1 / Apollo Lake */ |
| 103 | #define FSP_HOB_RESOURCE_OWNER_SMM_PEI_SMRAM_GUID \ |
| 104 | EFI_GUID(0x6dadf1d1, 0xd4cc, 0x4910, \ |
| 105 | 0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d) |
| 106 | |
| 107 | #define FSP_HOB_RESOURCE_OWNER_PCD_DATABASE_GUID1 \ |
| 108 | EFI_GUID(0xea296d92, 0x0b69, 0x423c, \ |
| 109 | 0x8c, 0x28, 0x33, 0xb4, 0xe0, 0xa9, 0x12, 0x68) |
| 110 | |
| 111 | #define FSP_HOB_RESOURCE_OWNER_PCD_DATABASE_GUID2 \ |
| 112 | EFI_GUID(0x9b3ada4f, 0xae56, 0x4c24, \ |
| 113 | 0x8d, 0xea, 0xf0, 0x3b, 0x75, 0x58, 0xae, 0x50) |
| 114 | |
| 115 | #define FSP_HOB_RESOURCE_OWNER_PEIM_DXE_GUID \ |
| 116 | EFI_GUID(0x86d70125, 0xbaa3, 0x4296, \ |
| 117 | 0xa6, 0x2f, 0x60, 0x2b, 0xeb, 0xbb, 0x90, 0x81) |
| 118 | |
| 119 | #define FSP_HOB_RESOURCE_OWNER_ALLOC_STACK_GUID \ |
| 120 | EFI_GUID(0x4ed4bf27, 0x4092, 0x42e9, \ |
| 121 | 0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x00, 0xc9, 0xbd) |
| 122 | |
| 123 | #define FSP_HOB_RESOURCE_OWNER_SMBIOS_MEMORY_GUID \ |
| 124 | EFI_GUID(0x01a1108c, 0x9dee, 0x4984, \ |
| 125 | 0x88, 0xc3, 0xee, 0xe8, 0xc4, 0x9e, 0xfb, 0x89) |
| 126 | |
Bin Meng | 2922b3e | 2014-12-12 21:05:28 +0800 | [diff] [blame] | 127 | #endif |