{"id":22704189,"url":"https://github.com/gsuberland/web-cpuid","last_synced_at":"2025-04-07T19:16:58.788Z","repository":{"id":144165648,"uuid":"427788812","full_name":"gsuberland/web-cpuid","owner":"gsuberland","description":"Lightweight web-based CPUID decoder and visualiser.","archived":false,"fork":false,"pushed_at":"2025-03-17T07:50:22.000Z","size":333,"stargazers_count":89,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T17:17:45.432Z","etag":null,"topics":["amd","cpuid","cpuidex","decoder","intel","visualiser","visualizer","x86","x86-64"],"latest_commit_sha":null,"homepage":"https://cpuid.apps.poly.nomial.co.uk/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsuberland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-13T22:47:20.000Z","updated_at":"2025-03-17T07:50:25.000Z","dependencies_parsed_at":"2024-12-10T08:14:20.521Z","dependency_job_id":"a56c66d3-61e2-4cd2-a902-f832bbf8ad9b","html_url":"https://github.com/gsuberland/web-cpuid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsuberland%2Fweb-cpuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsuberland%2Fweb-cpuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsuberland%2Fweb-cpuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsuberland%2Fweb-cpuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsuberland","download_url":"https://codeload.github.com/gsuberland/web-cpuid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713258,"owners_count":20983683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amd","cpuid","cpuidex","decoder","intel","visualiser","visualizer","x86","x86-64"],"created_at":"2024-12-10T08:14:18.168Z","updated_at":"2025-04-07T19:16:58.757Z","avatar_url":"https://github.com/gsuberland.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# web-cpuid\n\n![ ](https://img.shields.io/github/license/gsuberland/web-cpuid) ![ ](https://img.shields.io/github/last-commit/gsuberland/web-cpuid)\n\nweb-cpuid is a lightweight web based decoder and visualiser for CPUID information.\n\n![screenshot](screenshot.gif)\n\nyou can find a hosted version of it [here](https://cpuid.apps.poly.nomial.co.uk/).\n\n## notice\n\nthis project has not been updated in a while as I haven't had time.\n\nwhile Intel support is mostly complete up to features from 2021, the AMD support is very limited.\n\n## features\n\ncurrent features include:\n\n- shows both raw and decoded values for fields\n- optionally shows the bit range of each field inline\n- optionally shows the value of each register inline\n- fields glow when the mouse hovers over them\n- alt-text for each cpuid leaf number shows a conversion to decimal\n- deuteranopia mode for improved visibility with red-green colourblindness\n- load cpuid files from [cpuid explorer](http://www.flounder.com/cpuid_explorer1.htm)\n\n## usage\n\neither use the [hosted version](https://cpuid.apps.poly.nomial.co.uk/) or open `src/cpuid.html` in a browser locally.\n\n### data format\n\ncpuid values are loaded into the textarea at the top, in one of two formats.\n\n#### standard format\n\nthe standard format is the following, with all values given as hexadecimal:\n\n```\n[leaf].[subleaf] [eax] [ebx] [ecx] [edx]\n```\n\nfor example:\n\n```\n00000000.00    00000016  756e6547  6c65746e  49656e69\n00000001.00    00050655  3a400800  fefaf387  bfebfbff\n00000002.00    76036301  00f0b5ff  00000000  00c30000\n00000003.00    00000000  00000000  01234567  abcdef00\n00000004.00    7c004121  01c0003f  0000003f  00000000\n```\n\nany number of spaces can be present between fields.\n\n#### linux cpuid raw format\n\nalternatively, the raw output format from the linux [cpuid](https://linux.die.net/man/1/cpuid) tool can be used. the recommended invocation is `cpuid -ir1`.\n\n```\nleaf subleaf: eax=[eax] ebx=[ebx] ecx=[ecx] edx=[edx]\n```\n\nfor example:\n\n```\n   0x00000000 0x00: eax=0x00000015 ebx=0x756e6547 ecx=0x6c65746e edx=0x49656e69\n   0x00000001 0x00: eax=0x00050655 ebx=0x15400800 ecx=0xfeda3203 edx=0x1f8bfbff\n   0x00000002 0x00: eax=0x76036301 ebx=0x00f0b5ff ecx=0x00000000 edx=0x00c30000\n   0x00000003 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000\n```\n\n### getting cpuid values\n\non linux the easiest way is to run `cpuid -ir1` using the [cpuid](https://linux.die.net/man/1/cpuid) package.\n\nWindows users can use the included `cpuid_dump.linq` [linqpad](https://www.linqpad.net/) script to dump these values in the right format. paste them into the text box and press the load button. you can also click the \"import cpuid\" button to import a cpuid dump file from [cpuid explorer](http://www.flounder.com/cpuid_explorer1.htm). this is currently the only supported automatic importer.\n\n### controls\n\nthe on-page controls are as follows:\n\n- bits - toggles showing the bit ranges for each field\n- regvals - toggles showing the value of each register in its heading\n- deuteranopia - toggles an accessible colour scheme for red-green colour-blind people\n\n## build\n\n**building is not required for general use.** the files in `src/` are suitable for immediate use as long as you're not hosting them on a server that needs subresource integrity (SRI) - just open `src/cpuid.html` in a browser and you're good to go.\n\nthe `build.py` script generates SHA256 SRI tags for the referenced scripts and styles and outputs everything into a `build` subdirectory. it also adds a crossorigin tag to the font preload. look for attributes beginning with `data-build-` in `cpuid.html` for places where this build script acts.\n\n## status\n\nweb-cpuid is in active development and is not yet complete. currently only Intel leaves are supported, but the framework is in place to be able to support AMD, VIA, etc.\n\ncurrent task list:\n\n- [x] decode all intel cpuid fields in the basic 0x00000000 to 0x0fffffff range\n- [x] decode all intel cpuid fields in the extended 0x80000000 to 0x8fffffff range\n- [x] review [cpuid](https://linux.die.net/man/1/cpuid) tool source for any undocumented intel cpuid fields\n- [x] add support for auto-detection of vendor\n- [ ] decode all AMD cpuid fields in the basic 0x00000000 to 0x0fffffff range\n- [ ] decode all AMD cpuid fields in the extended 0x80000000 to 0x8fffffff range\n- [ ] update all Intel fields for 2025\n- [x] add sub-leaf support\n- [ ] add support for contextually decoding hypervisor leaves in the 0x40000000 to 0x4fffffff range\n\n## development\n\nthe application is split into the following files:\n\n- `cpuid.html` - the html page that everything is loaded into\n- `cpuid.css` - the style for the page\n- `cpuid.js` - the core javascript that renders the diagrams\n- `cpuid_interact.js` - user interaction code, also loads values and builds headings\n- `cpuid_intel.js` - CPUID leaf definitions for Intel processors\n- `fontfix.js` - a helper script that resizes the font to account for variances in monospace font sizes\n- `cpuid_startup.js` - initial boostrap code that runs when the page is loaded\n\n### architecture\n\neach diagram is rendered by a `CpuidDiagram` object. it maintains a 2D array of cells, like a text-based image. each cell is tagged with a style and a reference to the field that owns it. the cells are defined using `CpuidDiagramCell` objects. the cells are then converted to span elements when rendering them out.\n\nfields are defined by `CpuidField` objects. a field has a name, a bits field (either a single integer, or an array where element 0 is the high bit and element 1 is the low bit), a resolver, and various options. a resolver is a function that turns raw values into decoded values. resolvers for standard types like bool, increment, ascii, etc. are available as static methods of the `CpuidBaseResolvers` class. custom resolvers are implemented in a resolver class for the CPU vendor, e.g. `CpuidResolversIntel` for Intel. if the resolver for a field is null, only the raw value is shown.\n\nfield options include `reserved`, which marks the field as reserved, and `printRawHex`, which causes the field's raw value to be written in hex. reserved fields consisting of more than one bit always have their values shown in hex, so `printRawHex` is not needed for those.\n\nthe fields for each register are defined inside a vendor-specific class, deriving from `CpuidFieldsBase`. the Intel fields are defined in `CpuidFieldsIntel`. each register definition contains an array of `CpuidField` objects. each register must have a complete set of fields encompassing all bits from 31 to 0, and they must be in descending bit order. fields must not overlap. the class has a function `getLeaf` which returns the definition for a leaf.\n\nby convention, register field arrays are defined as a private class property named `cpuid_[leaf]_[reg]_fields` or `cpuid_[leaf]_[subleaf]_[reg]_fields` where the `leaf` and `subleaf` values are hexadecimal numbers, and `reg` is the register name (e.g. eax). each is preceded by a comment in the standard naming form `cpuid.leaf.subleaf.reg`. the register definitions are then grouped together inside a larger structure that provides description text for each leaf. registers or leaves that are reserved are marked with a comment rather than being completely omitted, to distinguish between purposeful exclusion and accidental oversight.\n\n### inline events\n\nthis project has a policy of disallowing inline javascript within the html, so that it can comply with a content security policy that forbids inline scripts. as such, one cannot simply make a button with an inline event handler like `\u003cbutton onclick=\"foo()\"\u003e`. instead, these event handlers are assigned in `cpuid_startup.js`.\n\n## code of conduct\n\nplease note that this project is released with a contributor code of conduct. by participating in this project, you agree to abide by its terms. the code of conduct can be found [here](CODE_OF_CONDUCT.md).\n\n## license\n\nweb-cpuid is released under [MIT license](LICENSE).\n\nthe font used on the hosted version is [GT America Mono](https://www.grillitype.com/typeface/gt-america), a commercial font. I paid for a license to use it on my website. the font is not included in this repository as I do not have the rights to distribute it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsuberland%2Fweb-cpuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsuberland%2Fweb-cpuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsuberland%2Fweb-cpuid/lists"}