Skip to content

Commit f4be45d

Browse files
authored
UTILS/ARCH : Add FUJITSU-MONAKA CPU (#1257)
## What Adding support for FUJITSU-MONAKA CPU and FUJITSU-A64FX CPU. Reference - FUJITSU-MONAKA specification (Ver. 1.0; Dec 26, 2024) - [.pdf](https://github.com/fujitsu/FUJITSU-MONAKA/blob/main/doc/FUJITSU-MONAKA_specification_v1.0.pdf) - 2 . Indetification registers description - 2.1. Main ID Register EL1 (MIDR\_EL1) | Name | Value | Description | | :--- | ---: | :--- | | Implementor | 0x46 | Fujitsu Limited | | Primary part number | 0x003 | FUJITSU-MONAKA processor | - A64FX Identification Method (Ver. 1.1; Jan 20, 2023) - [.pdf](https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_identification_method_v1.1_EN.pdf) - 2 . Identification Method - 2.1. Identifying by viewing /proc/cpuinfo | Name | Value | Description | | :--- | ---: | :--- | | Implementor | 0x46 | Fujitsu Limited | | Primary part number | 0x001 | FUJITSU A64FX processor | --------- Co-authored-by: Kento Hasegawa <hasegawa.kento@fujitsu.com>
1 parent ec0bc8a commit f4be45d

2 files changed

Lines changed: 30 additions & 13 deletions

File tree

src/utils/arch/aarch64/cpu.h

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/**
2-
* Copyright (c) 2001-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3-
* Copyright (C) ARM Ltd. 2016-2020. ALL RIGHTS RESERVED.
4-
* Copyright (C) Stony Brook University. 2016-2020. ALL RIGHTS RESERVED.
5-
*
6-
* See file LICENSE for terms.
7-
*/
2+
* Copyright (c) 2001-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* Copyright (C) ARM Ltd. 2016-2020. ALL RIGHTS RESERVED.
4+
* Copyright (C) Stony Brook University. 2016-2020. ALL RIGHTS RESERVED.
5+
* Copyright (C) 2026, Fujitsu Limited. ALL RIGHTS RESERVED.
6+
*
7+
* See file LICENSE for terms.
8+
*/
89

910
#ifndef UCC_AARCH64_CPU_H_
1011
#define UCC_AARCH64_CPU_H_
@@ -73,6 +74,15 @@ static inline ucc_cpu_model_t ucc_arch_get_cpu_model()
7374
return UCC_CPU_MODEL_NVIDIA_GRACE;
7475
}
7576

77+
if (ucc_arch_get_cpu_vendor() == UCC_CPU_VENDOR_FUJITSU_ARM) {
78+
if (cpuid.part == 0x001) {
79+
return UCC_CPU_MODEL_FUJITSU_A64FX;
80+
}
81+
if (cpuid.part == 0x003) {
82+
return UCC_CPU_MODEL_FUJITSU_MONAKA;
83+
}
84+
}
85+
7686
return UCC_CPU_MODEL_ARM_AARCH64;
7787
}
7888

src/utils/arch/cpu.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/**
2-
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2024. ALL RIGHTS RESERVED.
3-
* Copyright (C) ARM Ltd. 2016. ALL RIGHTS RESERVED.
4-
* Copyright (C) Shanghai Zhaoxin Semiconductor Co., Ltd. 2020. ALL RIGHTS RESERVED.
5-
* Copyright (C) Rivos Inc. 2023
6-
*
7-
* See file LICENSE for terms.
8-
*/
2+
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2024. ALL RIGHTS RESERVED.
3+
* Copyright (C) ARM Ltd. 2016. ALL RIGHTS RESERVED.
4+
* Copyright (C) Shanghai Zhaoxin Semiconductor Co., Ltd. 2020. ALL RIGHTS RESERVED.
5+
* Copyright (C) Rivos Inc. 2023
6+
* Copyright (C) 2026, Fujitsu Limited. ALL RIGHTS RESERVED.
7+
*
8+
* See file LICENSE for terms.
9+
*/
910

1011
#ifndef UCC_ARCH_CPU_H
1112
#define UCC_ARCH_CPU_H
@@ -36,6 +37,8 @@ typedef enum ucc_cpu_model {
3637
UCC_CPU_MODEL_ZHAOXIN_WUDAOKOU,
3738
UCC_CPU_MODEL_ZHAOXIN_LUJIAZUI,
3839
UCC_CPU_MODEL_NVIDIA_GRACE,
40+
UCC_CPU_MODEL_FUJITSU_A64FX,
41+
UCC_CPU_MODEL_FUJITSU_MONAKA,
3942
UCC_CPU_MODEL_LAST
4043
} ucc_cpu_model_t;
4144

@@ -108,6 +111,10 @@ static inline ucc_cpu_model_t ucc_get_model_from_str(const char *m_name)
108111
return UCC_CPU_MODEL_ZHAOXIN_LUJIAZUI;
109112
if (strcasecmp(m_name, "grace") == 0)
110113
return UCC_CPU_MODEL_NVIDIA_GRACE;
114+
if (strcasecmp(m_name, "a64fx") == 0)
115+
return UCC_CPU_MODEL_FUJITSU_A64FX;
116+
if (strcasecmp(m_name, "monaka") == 0)
117+
return UCC_CPU_MODEL_FUJITSU_MONAKA;
111118
return UCC_CPU_MODEL_UNKNOWN;
112119
}
113120

0 commit comments

Comments
 (0)