bootinfo.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  4. */
  5. #ifndef _ASM_BOOTINFO_H
  6. #define _ASM_BOOTINFO_H
  7. #include <linux/types.h>
  8. #include <asm/setup.h>
  9. const char *get_system_type(void);
  10. extern void init_environ(void);
  11. extern void memblock_init(void);
  12. extern void platform_init(void);
  13. extern void plat_swiotlb_setup(void);
  14. extern int __init init_numa_memory(void);
  15. struct loongson_board_info {
  16. int bios_size;
  17. const char *bios_vendor;
  18. const char *bios_version;
  19. const char *bios_release_date;
  20. const char *board_name;
  21. const char *board_vendor;
  22. };
  23. struct loongson_system_configuration {
  24. int nr_cpus;
  25. int nr_nodes;
  26. int boot_cpu_id;
  27. int cores_per_node;
  28. int cores_per_package;
  29. unsigned long cores_io_master;
  30. const char *cpuname;
  31. };
  32. extern u64 efi_system_table;
  33. extern unsigned long fw_arg0, fw_arg1, fw_arg2;
  34. extern struct loongson_board_info b_info;
  35. extern struct loongson_system_configuration loongson_sysconf;
  36. static inline bool io_master(int cpu)
  37. {
  38. return test_bit(cpu, &loongson_sysconf.cores_io_master);
  39. }
  40. #endif /* _ASM_BOOTINFO_H */