diff options
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/alpha/processor-platform.h | 1 | ||||
| -rw-r--r-- | includes/arm/processor-platform.h | 9 | ||||
| -rw-r--r-- | includes/benchmark.h | 2 | ||||
| -rw-r--r-- | includes/callbacks.h | 1 | ||||
| -rw-r--r-- | includes/computer.h | 38 | ||||
| -rw-r--r-- | includes/cpu_util.h | 49 | ||||
| -rw-r--r-- | includes/devices.h | 9 | ||||
| -rw-r--r-- | includes/dt_util.h | 89 | ||||
| -rw-r--r-- | includes/gettext.h | 47 | ||||
| -rw-r--r-- | includes/hardinfo.h | 21 | ||||
| -rw-r--r-- | includes/ia64/processor-platform.h | 13 | ||||
| -rw-r--r-- | includes/info.h | 73 | ||||
| -rw-r--r-- | includes/loadgraph.h | 49 | ||||
| -rw-r--r-- | includes/m68k/processor-platform.h | 2 | ||||
| -rw-r--r-- | includes/parisc/processor-platform.h | 15 | ||||
| -rw-r--r-- | includes/ppc/processor-platform.h | 13 | ||||
| -rw-r--r-- | includes/riscv/processor-platform.h | 36 | ||||
| -rw-r--r-- | includes/s390/processor-platform.h | 14 | ||||
| -rw-r--r-- | includes/sh/processor-platform.h | 4 | ||||
| -rw-r--r-- | includes/sparc/processor-platform.h | 1 | ||||
| -rw-r--r-- | includes/uidefs.h | 8 | ||||
| -rw-r--r-- | includes/x86/processor-platform.h | 10 | ||||
| l--------- | includes/x86_64 | 1 | 
23 files changed, 399 insertions, 106 deletions
| diff --git a/includes/alpha/processor-platform.h b/includes/alpha/processor-platform.h index 2ff3a728..778a1a88 100644 --- a/includes/alpha/processor-platform.h +++ b/includes/alpha/processor-platform.h @@ -23,6 +23,7 @@ struct _Processor {      gchar *model_name;      gfloat bogomips, cpu_mhz;      gchar *strmodel; +    gchar *cycle_frequency_hz_str;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/arm/processor-platform.h b/includes/arm/processor-platform.h index 290b9a62..0ffdac24 100644 --- a/includes/arm/processor-platform.h +++ b/includes/arm/processor-platform.h @@ -19,15 +19,18 @@  #ifndef __PROCESSOR_PLATFORM_H__  #define __PROCESSOR_PLATFORM_H__ +#include "cpu_util.h" +  struct _Processor {      gchar *model_name; -    gchar *decoded_name; +    gchar *linux_name;      gchar *flags;      gfloat bogomips; -    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ -    gint cpukhz_max, cpukhz_min, cpukhz_cur; /* for arm/processor.c */      gint id; +    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq;      gchar *cpu_implementer;      gchar *cpu_architecture; diff --git a/includes/benchmark.h b/includes/benchmark.h index 8047d5c6..39de042b 100644 --- a/includes/benchmark.h +++ b/includes/benchmark.h @@ -10,6 +10,7 @@ enum {      BENCHMARK_CRYPTOHASH,      BENCHMARK_FIB,      BENCHMARK_NQUEENS, +    BENCHMARK_ZLIB,      BENCHMARK_FFT,      BENCHMARK_RAYTRACE,      BENCHMARK_GUI, @@ -24,6 +25,7 @@ void benchmark_fish(void);  void benchmark_gui(void);  void benchmark_nqueens(void);  void benchmark_raytrace(void); +void benchmark_zlib(void);  gdouble benchmark_parallel_for(guint start, guint end,                                 gpointer callback, gpointer callback_data); diff --git a/includes/callbacks.h b/includes/callbacks.h index d53e1861..392d5767 100644 --- a/includes/callbacks.h +++ b/includes/callbacks.h @@ -24,7 +24,6 @@  void cb_about();  void cb_about_module(GtkAction *action);  void cb_generate_report(); -void cb_save_graphic();  void cb_quit();  void cb_refresh();  void cb_copy_to_clipboard(); diff --git a/includes/computer.h b/includes/computer.h index c23acab6..5a69a171 100644 --- a/includes/computer.h +++ b/includes/computer.h @@ -20,44 +20,6 @@  #include "hardinfo.h" -#define DB_PREFIX "/etc/" - -static struct { -    gchar *file, *codename; -} distro_db[] = { -    { DB_PREFIX "fatdog-version",	"fatdog"  }, -    { DB_PREFIX "debian_version",	"deb"  }, -    { DB_PREFIX "slackware-version",	"slk"  }, -    { DB_PREFIX "mandrake-release",	"mdk"  }, -    { DB_PREFIX "mandriva-release",     "mdv"  }, -    { DB_PREFIX "fedora-release",       "fdra" }, -    { DB_PREFIX "coas",                 "coas" }, -    { DB_PREFIX "environment.corel",    "corel"}, -    { DB_PREFIX "gentoo-release",	"gnt"  }, -    { DB_PREFIX "conectiva-release",	"cnc"  }, -    { DB_PREFIX "versão-conectiva",	"cnc"  }, -    { DB_PREFIX "turbolinux-release",	"tl"   }, -    { DB_PREFIX "yellowdog-release",	"yd"   }, -    { DB_PREFIX "sabayon-release",      "sbn"  }, -    { DB_PREFIX "arch-release",         "arch" }, -    { DB_PREFIX "enlisy-release",       "enlsy"}, -    { DB_PREFIX "SuSE-release",		"suse" }, -    { DB_PREFIX "sun-release",		"sun"  }, -    { DB_PREFIX "zenwalk-version",	"zen"  }, -    { DB_PREFIX "DISTRO_SPECS",		"ppy"  }, -    { DB_PREFIX "puppyversion",		"ppy"  }, -    { DB_PREFIX "distro-release",	"fl"   }, -    { DB_PREFIX "vine-release",         "vine" }, -    { DB_PREFIX "PartedMagic-version",	"pmag" }, -     /* -     * RedHat must be the *last* one to be checked, since -     * some distros (like Mandrake) includes a redhat-relase -     * file too. -     */ -    { DB_PREFIX "redhat-release",	"rh"   }, -    { NULL,				NULL   } -}; -  typedef struct _Computer	Computer;  typedef struct _OperatingSystem	OperatingSystem;  typedef struct _MemoryInfo	MemoryInfo; diff --git a/includes/cpu_util.h b/includes/cpu_util.h new file mode 100644 index 00000000..da581a78 --- /dev/null +++ b/includes/cpu_util.h @@ -0,0 +1,49 @@ +#ifndef __CPU_UTIL_H__ +#define __CPU_UTIL_H__ + +#include "hardinfo.h" + +#ifndef PROC_CPUINFO +#define PROC_CPUINFO "/proc/cpuinfo" +#endif + +#define STRIFNULL(f,cs) if (f == NULL) f = g_strdup(cs); +#define UNKIFNULL(f) STRIFNULL(f, _("(Unknown)") ) +#define EMPIFNULL(f) STRIFNULL(f, "") + +const gchar *byte_order_str(void); + +/* from /sys/devices/system/cpu/cpu%d/%s */ +gchar* get_cpu_str(const gchar* file, gint cpuid); +gint get_cpu_int(const char* item, int cpuid, int null_val); + +/* space delimted list of flags, finds flag */ +int processor_has_flag(gchar * strflags, gchar * strflag); + +typedef struct { +    gint id; +    gint cpukhz_max, cpukhz_min, cpukhz_cur; +    gchar *scaling_driver, *scaling_governor; +    gint transition_latency; +} cpufreq_data; + +typedef struct { +    gint id; /* thread */ +    gint socket_id; +    gint core_id; +    gint book_id; +    gint drawer_id; +} cpu_topology_data; + +cpufreq_data *cpufreq_new(gint id); +void cpufreq_update(cpufreq_data *cpufd, int cur_only); +void cpufreq_free(cpufreq_data *cpufd); + +gchar *cpufreq_section_str(cpufreq_data *cpufd); + +cpu_topology_data *cputopo_new(gint id); +void cputopo_free(cpu_topology_data *cputd); + +gchar *cputopo_section_str(cpu_topology_data *cputd); + +#endif diff --git a/includes/devices.h b/includes/devices.h index 09c1c36f..00787331 100644 --- a/includes/devices.h +++ b/includes/devices.h @@ -38,10 +38,13 @@ typedef struct _Processor Processor;  /* Processor */  GSList *processor_scan(void);  void get_processor_strfamily(Processor * processor); -void cpu_flags_init(void); -gchar *processor_get_capabilities_from_flags(gchar * strflags);  gchar *processor_get_detailed_info(Processor * processor);  gchar *processor_get_info(GSList * processors); +gchar *processor_name(GSList * processors); +gchar *processor_name_default(GSList * processors); +gchar *processor_describe(GSList * processors); +gchar *processor_describe_default(GSList * processors); +gchar *processor_describe_by_counting_names(GSList * processors);  /* Memory */  void init_memory_labels(void); @@ -92,4 +95,6 @@ extern gchar *dmi_info;  extern gchar *spd_info;  #endif +extern gchar *dtree_info; +  #endif /* __DEVICES_H__ */ diff --git a/includes/dt_util.h b/includes/dt_util.h new file mode 100644 index 00000000..7ef6808b --- /dev/null +++ b/includes/dt_util.h @@ -0,0 +1,89 @@ + +#ifndef _DT_UTIL_H_ +#define _DT_UTIL_H_ + +#include <stdint.h> + +/* some not-quite-complete stuff that can be disabled */ +#define DTEX_PHREFS 1 + +#ifndef DTR_ROOT +#define DTR_ROOT dtr_find_device_tree_root() +#endif + +enum { +    DT_TYPE_ERR, + +    DT_NODE, +    DTP_UNK,     /* arbitrary-length byte sequence */ +    DTP_EMPTY,   /* empty property */ +    DTP_STR,     /* null-delimited list of strings */ +    DTP_HEX,     /* list of 32-bit values displayed in hex */ +    DTP_UINT,    /* unsigned int list */ +    DTP_INTRUPT, /* interrupt-specifier list */ +    DTP_INTRUPT_EX, /* extended interrupt-specifier list */ +    DTP_OVR,     /* all in /__overrides__ */ +    DTP_PH,      /* phandle */ +    DTP_PH_REF,  /* reference to phandle */ +    DTP_REG,     /* <#address-cells, #size-cells> */ +    DTP_CLOCKS,  /* <phref, #clock-cells> */ +    DTP_GPIOS,   /* <phref, #gpio-cells> */ +    DTP_DMAS,    /* dma-specifier list */ +}; + +/* simplest, no aliases, doesn't require an existing dt. + * use dtr_get_prop_str() for complete. */ +char* dtr_get_string(const char *p, int decode); + +typedef uint32_t dt_uint; /* big-endian */ + +typedef struct _dtr dtr; +typedef struct _dtr_obj dtr_obj; + +dtr *dtr_new(const char *base_path); /* NULL for DTR_ROOT */ +void dtr_free(dtr *); +int dtr_was_found(dtr *); +const char *dtr_base_path(dtr *); +char *dtr_messages(dtr *); /* returns a message log */ + +dtr_obj *dtr_obj_read(dtr *, const char *dtp); +void dtr_obj_free(dtr_obj *); +int dtr_obj_type(dtr_obj *); +char *dtr_obj_alias(dtr_obj *); +char *dtr_obj_symbol(dtr_obj *); +char *dtr_obj_path(dtr_obj *);        /* device tree path */ +char *dtr_obj_full_path(dtr_obj *);   /* system path */ + +/* find property/node 'name' relative to node + * if node is NULL, then from root */ +dtr_obj *dtr_get_prop_obj(dtr *, dtr_obj *node, const char *name); +char *dtr_get_prop_str(dtr *, dtr_obj *node, const char *name); +uint32_t dtr_get_prop_u32(dtr *, dtr_obj *node, const char *name); + +/* attempts to render the object as a string */ +char* dtr_str(dtr_obj *obj); + +int dtr_guess_type(dtr_obj *obj); +char *dtr_elem_phref(dtr *, dt_uint e, int show_path); +char *dtr_elem_hex(dt_uint e); +char *dtr_elem_byte(uint8_t e); +char *dtr_elem_uint(dt_uint e); +char *dtr_list_byte(uint8_t *bytes, unsigned long count); +char *dtr_list_hex(dt_uint *list, unsigned long count); + +int dtr_cellv_find(dtr_obj *obj, char *qprop, int limit); + +char *dtr_maps_info(dtr *); /* returns hardinfo shell section */ + +const char *dtr_find_device_tree_root(void); + +/* write to the message log */ +void dtr_msg(dtr *s, char *fmt, ...); + +#define sp_sep(STR) (strlen(STR) ? " " : "") +/* appends an element to a string, adding a space if + * the string is not empty. + * ex: ret = appf(ret, "%s=%s\n", name, value); */ +char *appf(char *src, char *fmt, ...); + +#endif diff --git a/includes/gettext.h b/includes/gettext.h new file mode 100644 index 00000000..fcdb2051 --- /dev/null +++ b/includes/gettext.h @@ -0,0 +1,47 @@ + +#ifndef __GETTEXT_H__ +#define __GETTEXT_H__ + +#include <string.h> +#include <libintl.h> +#include <locale.h> + +static const char * +__pgettext_expr (const char *msgctxt, const char *msgid) +{ +  size_t msgctxt_len = strlen (msgctxt) + 1; +  size_t msgid_len = strlen (msgid) + 1; +  const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +  char msg_ctxt_id[msgctxt_len + msgid_len]; +#else +  char buf[1024]; +  char *msg_ctxt_id = +    (msgctxt_len + msgid_len <= sizeof (buf) +     ? buf +     : (char *) malloc (msgctxt_len + msgid_len)); +  if (msg_ctxt_id != NULL) +#endif +    { +      int found_translation; +      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); +      msg_ctxt_id[msgctxt_len - 1] = '\004'; +      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); +      translation = gettext (msg_ctxt_id); +      found_translation = (translation != msg_ctxt_id); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +      if (msg_ctxt_id != buf) +        free (msg_ctxt_id); +#endif +      if (found_translation) +        return translation; +    } +  return msgid; +} + +#define _(STRING) gettext(STRING) +#define N_(STRING) (STRING) +#define C_(CTX, STRING) __pgettext_expr(CTX, STRING) +#define NC_(CTX, STRING) (STRING) + +#endif diff --git a/includes/hardinfo.h b/includes/hardinfo.h index 70329ac7..f42f1e6c 100644 --- a/includes/hardinfo.h +++ b/includes/hardinfo.h @@ -23,10 +23,14 @@  #include "config.h"  #include "shell.h"  #include "vendor.h" -#include <libintl.h> -#include <locale.h> -#define _(STRING)    gettext(STRING) -#define N_(STRING) (STRING) +#include "gettext.h" +#include "info.h" + +#define HARDINFO_COPYRIGHT_LATEST_YEAR 2017 + +#ifndef LOCALEDIR +#define LOCALEDIR "/usr/share/locale" +#endif  typedef enum {    MODULE_FLAG_NONE = 0, @@ -88,7 +92,6 @@ gchar       *strreplace(gchar *string, gchar *replace, gchar *replacement);  /* Widget utility functions */  void widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type);  gint tree_view_get_visible_height(GtkTreeView *tv); -void tree_view_save_image(gchar *filename);  /* File Chooser utility functions */  void      file_chooser_open_expander(GtkWidget *chooser); @@ -167,4 +170,12 @@ gchar *moreinfo_lookup(gchar *key);  gboolean g_strv_contains(const gchar * const * strv, const gchar *str);  #endif +/* Hardinfo labels that have # are truncated and/or hidden. + * Labels can't have $ because that is the delimiter in + * moreinfo. + * replacing = true will free v */ +gchar *hardinfo_clean_label(const gchar *v, int replacing); +/* hardinfo uses the values as {ht,x}ml, apparently */ +gchar *hardinfo_clean_value(const gchar *v, int replacing); +  #endif				/* __HARDINFO_H__ */ diff --git a/includes/ia64/processor-platform.h b/includes/ia64/processor-platform.h index 1e30c5fc..5d525639 100644 --- a/includes/ia64/processor-platform.h +++ b/includes/ia64/processor-platform.h @@ -19,11 +19,22 @@  #ifndef __PROCESSOR_PLATFORM_H__  #define __PROCESSOR_PLATFORM_H__ +#include "cpu_util.h" +  struct _Processor { +    gint id; +    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq; +      gchar *model_name;      gchar *vendor_id; -    gfloat bogomips, cpu_mhz; +    gfloat bogomips;      gchar *strmodel; + +    gchar *family, *arch, *archrev, *features; +    gint model, revision; +    gint cpu_regs;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/info.h b/includes/info.h new file mode 100644 index 00000000..253c06e0 --- /dev/null +++ b/includes/info.h @@ -0,0 +1,73 @@ +/* + *    HardInfo - Displays System Information + *    Copyright (C) 2017 Leandro A. F. Pereira <leandro@hardinfo.org> + * + *    This program is free software; you can redistribute it and/or modify + *    it under the terms of the GNU General Public License as published by + *    the Free Software Foundation, version 2. + * + *    This program is distributed in the hope that it will be useful, + *    but WITHOUT ANY WARRANTY; without even the implied warranty of + *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *    GNU General Public License for more details. + * + *    You should have received a copy of the GNU General Public License + *    along with this program; if not, write to the Free Software + *    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA + */ + +#pragma once + +#include <glib.h> + +struct Info { +    GArray *groups; + +    const gchar *column_titles[5]; + +    ShellViewType view_type; + +    int reload_interval; + +    gboolean column_headers_visible; +    gboolean zebra_visible; +    gboolean normalize_percentage; +}; + +struct InfoGroup { +    const gchar *name; + +    GArray *fields; + +     /* scaffolding fields */ +    const gchar *computed; +}; + +struct InfoField { +    const gchar *name; +    gchar *value; + +    int update_interval; + +    gboolean free_value_on_flatten; +}; + +struct Info *info_new(void); + +void info_add_group(struct Info *info, const gchar *group_name, ...); +void info_add_computed_group(struct Info *info, const gchar *name, const gchar *value); + +struct InfoField info_field(const gchar *name, gchar *value); +struct InfoField info_field_printf(const gchar *name, const gchar *format, ...) +    __attribute__((format(printf, 2, 3))); +struct InfoField info_field_update(const gchar *name, int update_interval); +struct InfoField info_field_last(void); + +void info_set_column_title(struct Info *info, const gchar *column, const gchar *title); +void info_set_column_headers_visible(struct Info *info, gboolean setting); +void info_set_zebra_visible(struct Info *info, gboolean setting); +void info_set_normalize_percentage(struct Info *info, gboolean setting); +void info_set_view_type(struct Info *info, ShellViewType setting); +void info_set_reload_interval(struct Info *info, int setting); + +gchar *info_flatten(struct Info *info); diff --git a/includes/loadgraph.h b/includes/loadgraph.h index 1eae976f..d79ca39b 100644 --- a/includes/loadgraph.h +++ b/includes/loadgraph.h @@ -14,7 +14,7 @@   * You should have received a copy of the GNU Lesser General Public   * License along with the Simple Load Graph; if not, write to the Free   * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - * 02111-1307 USA.  + * 02111-1307 USA.   */ @@ -24,12 +24,6 @@  #include <stdlib.h>  #include <gtk/gtk.h>  #include <math.h> -/*#include <libintl.h> -#include <locale.h> -#define _(STRING)    gettext(STRING) -#define N_(STRING) (STRING)*/ - -  typedef struct _LoadGraph LoadGraph; @@ -39,37 +33,20 @@ typedef enum {      LG_COLOR_RED   = 0xB04F4F  } LoadGraphColor; -struct _LoadGraph { -    GdkPixmap     *buf; -    GtkWidget     *area; - -    GdkGC         *grid; -    GdkGC         *trace; -    GdkGC	  *fill; - -    gint     	  *data; -    gfloat         scale; +LoadGraph   *load_graph_new(gint size); +void         load_graph_destroy(LoadGraph *lg); +void         load_graph_configure_expose(LoadGraph *lg); +GtkWidget   *load_graph_get_framed(LoadGraph *lg); -    gint	   size; -    gint	   width, height; -    LoadGraphColor color;     -     -    gint	   max_value, remax_count; -     -    PangoLayout   *layout; -    gchar	  *suffix; -}; +void         load_graph_update(LoadGraph *lg, gdouble value); +void         load_graph_update_ex(LoadGraph *lg, guint line, gdouble value); -LoadGraph 	*load_graph_new(gint size); -void 		 load_graph_destroy(LoadGraph *lg); -void		 load_graph_configure_expose(LoadGraph *lg); -GtkWidget 	*load_graph_get_framed(LoadGraph *lg); +void         load_graph_set_color(LoadGraph *lg, LoadGraphColor color); +void         load_graph_clear(LoadGraph *lg); -void		 load_graph_update(LoadGraph *lg, gint value); -void		 load_graph_set_color(LoadGraph *lg, LoadGraphColor color); -void		 load_graph_clear(LoadGraph *lg); +void         load_graph_set_data_suffix(LoadGraph *lg, gchar *suffix); +gchar       *load_graph_get_data_suffix(LoadGraph *lg); -void		 load_graph_set_data_suffix(LoadGraph *lg, gchar *suffix); -gchar 		*load_graph_get_data_suffix(LoadGraph *lg); +gint         load_graph_get_height(LoadGraph *lg); -#endif	/* __LOADGRAPH_H__ */ +#endif  /* __LOADGRAPH_H__ */ diff --git a/includes/m68k/processor-platform.h b/includes/m68k/processor-platform.h index 40bd2f96..9aea1dfe 100644 --- a/includes/m68k/processor-platform.h +++ b/includes/m68k/processor-platform.h @@ -23,7 +23,7 @@ struct _Processor {      gchar *model_name;      gfloat bogomips, cpu_mhz; -    gchar *has_fpu; +    gchar *fpu_name, *mmu_name, *calibration;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/parisc/processor-platform.h b/includes/parisc/processor-platform.h index bfe8c45c..c55c69ec 100644 --- a/includes/parisc/processor-platform.h +++ b/includes/parisc/processor-platform.h @@ -19,15 +19,24 @@  #ifndef __PROCESSOR_PLATFORM_H__  #define __PROCESSOR_PLATFORM_H__ +#include "cpu_util.h" +  struct _Processor { +    gint id; +    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq; +      gchar *model_name;      gchar *vendor_id;      gchar *flags; -    gfloat bogomips, cpu_mhz; - +    gfloat bogomips;      gchar *has_fpu; -          gchar *strmodel; + +    gchar *cpu_family; +    gchar *icache_str, *dcache_str; +    gchar *hversion, *sversion;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/ppc/processor-platform.h b/includes/ppc/processor-platform.h index 90095750..d3d1a568 100644 --- a/includes/ppc/processor-platform.h +++ b/includes/ppc/processor-platform.h @@ -19,11 +19,18 @@  #ifndef __PROCESSOR_PLATFORM_H__  #define __PROCESSOR_PLATFORM_H__ +#include "cpu_util.h" +  struct _Processor { +    gint id; +    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq; +      gchar *model_name; -    gchar *vendor_id; -    gint cache_size; -    gfloat bogomips, cpu_mhz; +    gchar *revision; +    /* gint cache_size; */ +    gfloat bogomips;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/riscv/processor-platform.h b/includes/riscv/processor-platform.h new file mode 100644 index 00000000..07cbf86e --- /dev/null +++ b/includes/riscv/processor-platform.h @@ -0,0 +1,36 @@ +/* + *    HardInfo - Displays System Information + *    Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@hardinfo.org> + * + *    This program is free software; you can redistribute it and/or modify + *    it under the terms of the GNU General Public License as published by + *    the Free Software Foundation, version 2. + * + *    This program is distributed in the hope that it will be useful, + *    but WITHOUT ANY WARRANTY; without even the implied warranty of + *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + *    GNU General Public License for more details. + * + *    You should have received a copy of the GNU General Public License + *    along with this program; if not, write to the Free Software + *    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA + */ + +#ifndef __PROCESSOR_PLATFORM_H__ +#define __PROCESSOR_PLATFORM_H__ + +#include "cpu_util.h" + +struct _Processor { +    gint id; /* hart */ +    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq; + +    gchar *model_name; +    gchar *mmu, *isa, *uarch; +    gchar *flags; /* expanded from isa */ +    gfloat bogomips; /* not used */ +}; + +#endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/s390/processor-platform.h b/includes/s390/processor-platform.h index 511fae6b..9164a7f2 100644 --- a/includes/s390/processor-platform.h +++ b/includes/s390/processor-platform.h @@ -19,10 +19,18 @@  #ifndef __PROCESSOR_PLATFORM_H__  #define __PROCESSOR_PLATFORM_H__ +#include "cpu_util.h" +  struct _Processor { -    gchar *vendor_id, *model_name; -    gint cache_size; -    gfloat bogomips, cpu_mhz; +    gint id; +    gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq; + +    gchar *model_name; /* vendor_id */ +    gchar *proc_str; +    gfloat bogomips; +  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/sh/processor-platform.h b/includes/sh/processor-platform.h index 9bdae18b..26b58ec5 100644 --- a/includes/sh/processor-platform.h +++ b/includes/sh/processor-platform.h @@ -23,6 +23,10 @@ struct _Processor {      gchar *model_name;      gchar *vendor_id;      gfloat bogomips, cpu_mhz; + +    gfloat bus_mhz, mod_mhz; + +    gchar *family;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/sparc/processor-platform.h b/includes/sparc/processor-platform.h index bcf4c782..31748a5b 100644 --- a/includes/sparc/processor-platform.h +++ b/includes/sparc/processor-platform.h @@ -23,6 +23,7 @@ struct _Processor {      gchar *model_name;      gchar *has_fpu;      gfloat cpu_mhz; +    gchar *cpucaps;  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/uidefs.h b/includes/uidefs.h index 3bb1c88f..70d2de17 100644 --- a/includes/uidefs.h +++ b/includes/uidefs.h @@ -1,5 +1,5 @@  #ifndef __UIDEFS_H__ -#define __UIDEFS_H__  +#define __UIDEFS_H__  #include "config.h" @@ -12,7 +12,7 @@  #ifdef HAS_LIBSOUP  #define SYNC_MANAGER_ITEMS "		<separator/>" \ -"		<menuitem name=\"SyncManager\" action=\"SyncManagerAction\" />"  +"		<menuitem name=\"SyncManager\" action=\"SyncManagerAction\" />"  #else		/* !HAS_LIBSOUP */  #define SYNC_MANAGER_ITEMS @@ -24,10 +24,6 @@ char *uidefs_str = "<ui>" \  "		<menuitem name=\"Report\" action=\"ReportAction\" />" \  "		<menuitem name=\"Copy\" action=\"CopyAction\" />" \  SYNC_MANAGER_ITEMS -/* - * Save Image is not ready for prime time. Yet. - * "<menuitem name=\"SaveGraph\" action=\"SaveGraphAction\" />" \ - */  "		<separator/>" \  "		<menuitem name=\"Quit\" action=\"QuitAction\" />" \  "	</menu>" \ diff --git a/includes/x86/processor-platform.h b/includes/x86/processor-platform.h index bc27b620..57a9830c 100644 --- a/includes/x86/processor-platform.h +++ b/includes/x86/processor-platform.h @@ -19,6 +19,8 @@  #ifndef __PROCESSOR_PLATFORM_H__  #define __PROCESSOR_PLATFORM_H__ +#include "cpu_util.h" +  typedef struct _ProcessorCache ProcessorCache;  struct _ProcessorCache { @@ -38,9 +40,12 @@ struct _Processor {      gchar *pm;             /* power management features */      gint cache_size;      gfloat bogomips; +    gchar *microcode; +    gint id;      gfloat cpu_mhz; /* for devices.c, identical to cpukhz_max/1000 */ -    gint cpukhz_max, cpukhz_min, cpukhz_cur; /* for arm/processor.c */ +    cpu_topology_data *cputopo; +    cpufreq_data *cpufreq;      gchar *has_fpu;      gchar *bug_fdiv, *bug_hlt, *bug_f00f, *bug_coma; @@ -48,9 +53,8 @@ struct _Processor {      gint model, family, stepping;      gchar *strmodel; -    gint id; -      GSList *cache; +  };  #endif	/* __PROCESSOR_PLATFORM_H__ */ diff --git a/includes/x86_64 b/includes/x86_64 deleted file mode 120000 index de1ff735..00000000 --- a/includes/x86_64 +++ /dev/null @@ -1 +0,0 @@ -./x86
\ No newline at end of file | 
