1 /* Copyright 2013-2014 IBM Corp. 2 * 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 * implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef __VPD_H 18 #define __VPD_H 19 20 struct machine_info { 21 const char *mtm; 22 const char *name; 23 }; 24 25 const struct machine_info *machine_info_lookup(const char *mtm); 26 27 const void *vpd_find_keyword(const void *rec, size_t rec_sz, 28 const char *kw, uint8_t *kw_size); 29 30 const void *vpd_find_record(const void *vpd, size_t vpd_size, 31 const char *record, size_t *sz); 32 33 const void *vpd_find(const void *vpd, size_t vpd_size, 34 const char *record, const char *keyword, 35 uint8_t *sz); 36 37 bool vpd_valid(const void *vvpd, size_t vpd_size); 38 39 /* Add model property to dt_root */ 40 void add_dtb_model(void); 41 42 void vpd_iohub_load(struct dt_node *hub_node); 43 void vpd_preload(struct dt_node *hub_node); 44 45 #define VPD_LOAD_LXRN_VINI 0xff 46 47 48 #endif /* __VPD_H */ 49