ufdt_overlay_internal.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef UFDT_OVERLAY_INTERNAL_H
  17. #define UFDT_OVERLAY_INTERNAL_H
  18. #include <ufdt_types.h>
  19. void *ufdt_get_fixup_location(struct ufdt *tree, const char *fixup);
  20. int ufdt_do_one_fixup(struct ufdt *tree, const char *fixups, int fixups_len,
  21. int phandle);
  22. int ufdt_overlay_do_fixups(struct ufdt *main_tree, struct ufdt *overlay_tree);
  23. enum overlay_result {
  24. OVERLAY_RESULT_OK,
  25. OVERLAY_RESULT_MISSING_TARGET,
  26. OVERLAY_RESULT_MISSING_OVERLAY,
  27. OVERLAY_RESULT_TARGET_PATH_INVALID,
  28. OVERLAY_RESULT_TARGET_INVALID,
  29. OVERLAY_RESULT_MERGE_FAIL,
  30. OVERLAY_RESULT_VERIFY_FAIL,
  31. };
  32. enum overlay_result ufdt_overlay_get_target(struct ufdt *tree,
  33. struct ufdt_node *frag_node,
  34. struct ufdt_node **target_node);
  35. void ufdt_try_increase_phandle(struct ufdt *tree, uint32_t offset);
  36. uint32_t ufdt_get_max_phandle(struct ufdt *tree);
  37. struct ufdt_static_phandle_table build_phandle_table(struct ufdt *tree);
  38. int ufdt_overlay_do_local_fixups(struct ufdt *tree, uint32_t phandle_offset);
  39. #endif /* UFDT_OVERLAY_INTERNAL_H */