This commit is contained in:
Dr-Noob
2024-09-17 08:52:01 +01:00
parent ef1bfa5cc9
commit 51dd89b005
4 changed files with 4 additions and 4 deletions

View File

@@ -1056,7 +1056,7 @@ struct system_on_chip* guess_soc_from_devtree(struct system_on_chip* soc) {
// come directly from the device tree, meaning that it will likely be less precise.
struct system_on_chip* guess_raw_soc_from_devtree(struct system_on_chip* soc) {
int num_vendors;
struct devtree** dt_vendors = get_devtree_compatible_vendors(&num_vendors);
struct devtree** dt_vendors = get_devtree_compatible_struct(&num_vendors);
if (dt_vendors == NULL) {
return soc;
}

View File

@@ -82,7 +82,7 @@ void fill_soc(struct system_on_chip* soc, char* soc_name, SOC soc_model, int32_t
void fill_soc_raw(struct system_on_chip* soc, char* soc_name, VENDOR vendor) {
soc->model = SOC_MODEL_UNKNOWN;
soc->vendor = vendor;
soc->process = UNK;
soc->process = UNKNOWN;
int len = strlen(soc_name) + strlen(soc_trademark_string[soc->vendor]) + 1;
soc->name = emalloc(sizeof(char) * len);

View File

@@ -394,7 +394,7 @@ struct devtree** get_devtree_compatible_struct(int *num_vendors_ptr) {
int vendor_str_len = (comma_ptr-ptr)+1;
int model_str_len = (end_ptr-comma_ptr)+1;
vendors[i] = emalloc(struct devtree);
vendors[i] = emalloc(sizeof(struct devtree));
vendors[i]->vendor = ecalloc(vendor_str_len, sizeof(char));
vendors[i]->model = ecalloc(model_str_len, sizeof(char));

View File

@@ -34,7 +34,7 @@
struct devtree {
char* vendor;
char* model;
}
};
char* read_file(char* path, int* len);
long get_max_freq_from_file(uint32_t core);