aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-26 21:43:54 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-11-26 21:43:54 +0100
commit87d1a2597ceedd03a7d4005db1bf82b72b423a18 (patch)
treee53bf20d06016b37fde0067526ed7abd95b848e8 /include
parenteec442be4d2dd0a1630a820ee43220e635450aa7 (diff)
downloadfbos-87d1a2597ceedd03a7d4005db1bf82b72b423a18.tar.gz
fbos-87d1a2597ceedd03a7d4005db1bf82b72b423a18.zip
Show the detected machine model
Originally I was planning to detect the machine model just in case we needed to do workaround for special cases. But since apparently even VisionFive2 brings its own CPU frequency base on DT, this is not even needed. Hence, fetching the model is now a cool message being shown on boot. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/fbos/dt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fbos/dt.h b/include/fbos/dt.h
index bbeb7cd..49ac27a 100644
--- a/include/fbos/dt.h
+++ b/include/fbos/dt.h
@@ -6,8 +6,14 @@
// Default value for the 'dt_info.cpu_freq' property if none could be retrieved.
#define DEFAULT_CPU_FREQ 10000000
+// Maximum length for the string representing the model.
+#define DT_MODEL_MAX 64
+
// Holds all the information that we gather from the initial DeviceTree blob.
struct dt_info {
+ // Model of the system that this kernel is running on.
+ char model[DT_MODEL_MAX];
+
// Ticks per second. If `get_dt_info` fails at setting this value, then
// `DEFAULT_CPU_FREQ` is used.
uint64_t cpu_freq;