Home | History | Annotate | Download | only in include
      1 /*
      2  * Copyright (C) 2018 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef UFDT_TEST_OVERLAY_H
     18 #define UFDT_TEST_OVERLAY_H
     19 
     20 extern "C" {
     21 #include <libfdt.h>
     22 }
     23 
     24 /*
     25  * Verifies that the FDT described by 'main_fdt_header' has been correctly
     26  * overlaid by the overlays contained in 'overlay_array'
     27  *
     28  * @param main_fdt_header Buffer describing the final FDT.
     29  * @param main_fdt_size Size of main_fdt_header.
     30  * @param overlay_array Array of buffers containg overlay FDTs.
     31  * @param overlay_count Number of overlays.
     32  *
     33  * @return Will return 0 if the verification is successful.
     34  */
     35 int ufdt_verify_dtbo(struct fdt_header *main_fdt_header, size_t main_fdt_size,
     36                      void **overlay_array, size_t overlay_count);
     37 #endif /* UFDT_TEST_OVERLAY_H */
     38