1 /** @file 2 3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 4 5 6 This program and the accompanying materials are licensed and made available under 7 8 the terms and conditions of the BSD License that accompanies this distribution. 9 10 The full text of the license may be found at 11 12 http://opensource.org/licenses/bsd-license.php. 13 14 15 16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 17 18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 19 20 21 22 23 Module Name: 24 25 26 BoardIdDecode.c 27 28 Abstract: 29 30 --*/ 31 32 #include "PchRegs.h" 33 #include "PlatformDxe.h" 34 #include "Platform.h" 35 36 37 // 38 // Define macros to build data structure signatures from characters. 39 // 40 #define EFI_SIGNATURE_16(A, B) ((A) | (B << 8)) 41 #define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16)) 42 #define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \ 43 (EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32)) 44 45 BOARD_ID_DECODE mBoardIdDecodeTable[] = { 46 // 47 // Board ID, Board Features bitmap, Subsystem Device ID 48 // This is a dummy entry that has to exist. Do not delete, just make a generic entry that fit for product. 49 // 50 { 51 MW_ITX_MPCIE_LVDS_LOEM_AA, 52 MW_ITX_MPCIE_LVDS_LOEM_ID, 53 B_BOARD_FEATURES_FORM_FACTOR_ATX | 54 B_BOARD_FEATURES_SIO_COM2 | 55 B_BOARD_FEATURES_2_C0_MEMORY_SLOT | 56 V_BOARD_FEATURES_SLEEP_S3 | 57 B_BOARD_FEATURES_PS2WAKEFROMS5 | 58 B_BOARD_FEATURES_LVDS | 59 B_BOARD_FEATURES_VERB_TABLE1, 60 V_DEFAULT_SUBSYSTEM_DEVICE_ID, 61 0xD625, 62 EFI_SIGNATURE_64('M','W','P','N','T','1','0','N') 63 }, 64 65 { 66 MW_ITX_MPCIE_LVDS_CHANNEL_AA, 67 MW_ITX_MPCIE_LVDS_CHANNEL_ID, 68 B_BOARD_FEATURES_FORM_FACTOR_ATX | 69 B_BOARD_FEATURES_SIO_COM2 | 70 B_BOARD_FEATURES_2_C0_MEMORY_SLOT | 71 V_BOARD_FEATURES_SLEEP_S3 | 72 B_BOARD_FEATURES_PS2WAKEFROMS5 | 73 B_BOARD_FEATURES_LVDS | 74 B_BOARD_FEATURES_VERB_TABLE1, 75 V_DEFAULT_SUBSYSTEM_DEVICE_ID, 76 0xD625, 77 EFI_SIGNATURE_64('M','W','P','N','T','1','0','N') 78 }, 79 80 { 81 MW_ITX_MPCIE_CHANNEL_AA, 82 MW_ITX_MPCIE_CHANNEL_ID, 83 B_BOARD_FEATURES_FORM_FACTOR_ATX | 84 B_BOARD_FEATURES_SIO_COM2 | 85 B_BOARD_FEATURES_2_C0_MEMORY_SLOT | 86 V_BOARD_FEATURES_SLEEP_S3 | 87 B_BOARD_FEATURES_PS2WAKEFROMS5 | 88 B_BOARD_FEATURES_VERB_TABLE1, 89 V_DEFAULT_SUBSYSTEM_DEVICE_ID, 90 0xD625, 91 EFI_SIGNATURE_64('M','W','P','N','T','1','0','N') 92 }, 93 94 { 95 KT_ITX_MPCIE_LVDS_LOEM_AA, 96 KT_ITX_MPCIE_LVDS_LOEM_ID, 97 B_BOARD_FEATURES_FORM_FACTOR_ATX | 98 B_BOARD_FEATURES_SIO_COM2 | 99 B_BOARD_FEATURES_2_C0_MEMORY_SLOT | 100 V_BOARD_FEATURES_SLEEP_S3 | 101 B_BOARD_FEATURES_PS2WAKEFROMS5 | 102 B_BOARD_FEATURES_LVDS | 103 B_BOARD_FEATURES_VERB_TABLE2, 104 V_DEFAULT_SUBSYSTEM_DEVICE_ID_KT, 105 0xD626, 106 EFI_SIGNATURE_64('K','T','P','N','T','1','0','N') 107 }, 108 109 { 110 KT_ITX_CHANNEL_AA, 111 KT_ITX_CHANNEL_ID, 112 B_BOARD_FEATURES_FORM_FACTOR_ATX | 113 B_BOARD_FEATURES_SIO_COM2 | 114 B_BOARD_FEATURES_2_C0_MEMORY_SLOT | 115 V_BOARD_FEATURES_SLEEP_S3 | 116 B_BOARD_FEATURES_PS2WAKEFROMS5 | 117 B_BOARD_FEATURES_NO_MINIPCIE | 118 B_BOARD_FEATURES_VERB_TABLE2, 119 V_DEFAULT_SUBSYSTEM_DEVICE_ID_KT, 120 0xD626, 121 EFI_SIGNATURE_64('K','T','P','N','T','1','0','N') 122 }, 123 124 { 125 KT_ITX_LOEM_AA, 126 KT_ITX_LOEM_ID, 127 B_BOARD_FEATURES_FORM_FACTOR_ATX | 128 B_BOARD_FEATURES_SIO_COM2 | 129 B_BOARD_FEATURES_2_C0_MEMORY_SLOT | 130 V_BOARD_FEATURES_SLEEP_S3 | 131 B_BOARD_FEATURES_PS2WAKEFROMS5 | 132 B_BOARD_FEATURES_NO_MINIPCIE | 133 B_BOARD_FEATURES_VERB_TABLE2, 134 V_DEFAULT_SUBSYSTEM_DEVICE_ID_KT, 135 0xD626, 136 EFI_SIGNATURE_64('K','T','P','N','T','1','0','N') 137 } 138 }; 139 140 UINTN mBoardIdDecodeTableSize = sizeof (mBoardIdDecodeTable) / 141 sizeof (mBoardIdDecodeTable[0]); 142 143 144