fcpu_info.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright : (C) 2022 Phytium Information Technology, Inc.
  3. * All Rights Reserved.
  4. *
  5. * This program is OPEN SOURCE software: you can redistribute it and/or modify it
  6. * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
  7. * either version 1.0 of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
  10. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See the Phytium Public License for more details.
  12. *
  13. *
  14. * FilePath: fcpu_info.h
  15. * Date: 2022-03-08 19:37:19
  16. * LastEditTime: 2022-03-15 11:18:07
  17. * Description:  This file is for
  18. *
  19. * Modify History:
  20. * Ver   Who        Date         Changes
  21. * ----- ------     --------    --------------------------------------
  22. */
  23. #ifndef BOARD_COMMON_CPU_INFO_H
  24. #define BOARD_COMMON_CPU_INFO_H
  25. #ifdef __cplusplus
  26. extern "C"
  27. {
  28. #endif
  29. #include "ftypes.h"
  30. #include "ferror_code.h"
  31. u32 GetAffinity(void);
  32. FError GetCpuId(u32 *cpu_id_p);
  33. FError GetCpuAffinity(u32 cpu_id, u64 *cluster_value_p);
  34. FError GetCpuAffinityByMask(u32 cpu_id, u64 *affinity_level_p);
  35. FError UseAffinityGetCpuId(u64 affinity_level, u32 *cpu_id_p);
  36. u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif // !