Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-13 Thread Sergey Bugaev
On Sun, Jan 12, 2025 at 10:48 PM Samuel Thibault wrote: > Does the posted patch look fine to you? It does, so: Acked-by: Sergey Bugaev I'll test it some time later when I get around to doing more aarch64-gnu hacking :| Sergey

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-12 Thread Samuel Thibault
Sergey Bugaev, le jeu. 09 janv. 2025 18:36:57 +0300, a ecrit: > On Thu, Jan 9, 2025 at 6:18 PM Jessica Clarke wrote: > > On 9 Jan 2025, at 15:12, Diego Nieto Cid wrote: > > > Looking at the types.h header, I see there are HWCAP2_* definitions for > > > bits above 32. Since hwcaps_t is an uint32_t

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-09 Thread Sergey Bugaev
On Thu, Jan 9, 2025 at 6:18 PM Jessica Clarke wrote: > On 9 Jan 2025, at 15:12, Diego Nieto Cid wrote: > > Looking at the types.h header, I see there are HWCAP2_* definitions for > > bits above 32. Since hwcaps_t is an uint32_t and the defs file claims to > > return two values (I assume the first

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-09 Thread Jessica Clarke
On 9 Jan 2025, at 15:12, Diego Nieto Cid wrote: > > Hi, > > On Thu, Jan 09, 2025 at 11:51:27AM +0300, Sergey Bugaev wrote: >> >> "Implementer", "architecture", "variant", "part", "revision" come from >> midr/revidr [0], and "features" are hwcap names. These are privileged >> registers that only

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-09 Thread Diego Nieto Cid
Hi, On Thu, Jan 09, 2025 at 11:51:27AM +0300, Sergey Bugaev wrote: > > "Implementer", "architecture", "variant", "part", "revision" come from > midr/revidr [0], and "features" are hwcap names. These are privileged > registers that only EL1 can read, but on AArch64 gnumach, their values > are obta

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-09 Thread Sergey Bugaev
Hi, On Thu, Jan 9, 2025 at 1:42 AM Luca wrote: > >> maybe this can be already made arch-specific. > >> > > > > Hmm, maybe. As is it only makes sense for x86 based architectures. > > There was some work from Sergey towards porting to aarch64, I guess > currently the hurd should compile there, and

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-08 Thread Luca
Il 08/01/25 22:58, Diego Nieto Cid ha scritto: On Wed, Jan 08, 2025 at 10:25:41AM +0100, Luca wrote: Il 08/01/25 02:30, dnie...@gmail.com ha scritto: + +static char * features_edx[] = + { +"fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", +NULL, "sep", "mtrr", "pge"

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-08 Thread Diego Nieto Cid
Hi, On Wed, Jan 08, 2025 at 10:25:41AM +0100, Luca wrote: > > Il 08/01/25 02:30, dnie...@gmail.com ha scritto: > > From: Diego Nieto Cid > > > > Beside that, I probably need to cache the CPUID provided information > > as I don't think it would change over time. > > I think the information coul

Re: [RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-08 Thread Luca
Hi, Il 08/01/25 02:30, dnie...@gmail.com ha scritto: From: Diego Nieto Cid Hello, This is a patch to introduce the cpuinfo file to the hierarchy exposed by procfs. I used as guidance the Wikipedia article on the CPUID instruction and the GNU/Linux output to sort each line in the output. The

[RFC PATCH hurd] Add partial /proc/cpuinfo implementation

2025-01-07 Thread dnietoc
From: Diego Nieto Cid Hello, This is a patch to introduce the cpuinfo file to the hierarchy exposed by procfs. I used as guidance the Wikipedia article on the CPUID instruction and the GNU/Linux output to sort each line in the output. There remains a lot of fields that I haven't covered yet an