tables.c 533 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/tables.h>
  8. u8 table_compute_checksum(void *v, int len)
  9. {
  10. u8 *bytes = v;
  11. u8 checksum = 0;
  12. int i;
  13. for (i = 0; i < len; i++)
  14. checksum -= bytes[i];
  15. return checksum;
  16. }
  17. void write_tables(void)
  18. {
  19. u32 __maybe_unused rom_table_end = ROM_TABLE_ADDR;
  20. #ifdef CONFIG_GENERATE_PIRQ_TABLE
  21. rom_table_end = write_pirq_routing_table(rom_table_end);
  22. rom_table_end = ALIGN(rom_table_end, 1024);
  23. #endif
  24. }