// SPDX-License-Identifier: GPL-2.0-or-later /* ----------------------------------------------------------------------- * * * Copyright 2000-2008 H. Peter Anvin - All Rights Reserved *
* ----------------------------------------------------------------------- */
/* * x86 CPUID access device * * This device is accessed by lseek() to the appropriate CPUID level * and then read in chunks of 16 bytes. A larger size means multiple * reads of consecutive levels. * * The lower 32 bits of the file position is used as the incoming %eax, * and the upper 32 bits of the file position as the incoming %ecx, * the latter intended for "counting" eax levels like eax=4. * * This driver uses /dev/cpu/%d/cpuid where %d is the minor number, and on * an SMP box will direct the access to CPU %d.
*/
if (__register_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid", &cpuid_fops)) {
printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n",
CPUID_MAJOR); return -EBUSY;
}
err = class_register(&cpuid_class); if (err) goto out_chrdev;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.