* Linux IA32 microcode driver
@ 2001-12-22 12:58 Chris Rankin
2001-12-22 18:53 ` Ben Clifford
2001-12-23 9:34 ` Tigran Aivazian
0 siblings, 2 replies; 4+ messages in thread
From: Chris Rankin @ 2001-12-22 12:58 UTC (permalink / raw)
To: tigran; +Cc: linux-kernel
Hi,
Am I missing something rather obvious, or is the /dev/cpu/microcode
device being mis-created under devfs with Linux 2.4.x? I have enclosed
a patch to ensure that the character device really *is* a character
device.
Cheers,
Chris
--- linux-2.4.17/arch/i386/kernel/microcode.c.orig Sat Dec 22 12:37:07 2001
+++ linux-2.4.17/arch/i386/kernel/microcode.c Sat Dec 22 12:43:10 2001
@@ -125,7 +125,7 @@
MICROCODE_MINOR);
devfs_handle = devfs_register(NULL, "cpu/microcode",
- DEVFS_FL_DEFAULT, 0, 0, S_IFREG | S_IRUSR | S_IWUSR,
+ DEVFS_FL_DEFAULT, 0, 0, S_IFCHR | S_IRUSR | S_IWUSR,
µcode_fops, NULL);
if (devfs_handle == NULL && error) {
printk(KERN_ERR "microcode: failed to devfs_register()\n");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux IA32 microcode driver
2001-12-22 12:58 Linux IA32 microcode driver Chris Rankin
@ 2001-12-22 18:53 ` Ben Clifford
2001-12-23 1:38 ` Chris Rankin
2001-12-23 9:34 ` Tigran Aivazian
1 sibling, 1 reply; 4+ messages in thread
From: Ben Clifford @ 2001-12-22 18:53 UTC (permalink / raw)
To: Chris Rankin; +Cc: tigran, linux-kernel
On Sat, 22 Dec 2001, Chris Rankin wrote:
> Am I missing something rather obvious, or is the /dev/cpu/microcode
> device being mis-created under devfs with Linux 2.4.x? I have enclosed
> a patch to ensure that the character device really *is* a character
> device.
On my system, running 2.4.16, I get no devfs entry for that or msr at all.
I just get the mtrr entry.
This is with microcode and msr loaded as modules.
--
Ben Clifford benc@hawaga.org.uk
http://www.hawaga.org.uk/ben/ GPG: 30F06950
webcam: http://barbarella.hawaga.org.uk/~benc/webcam/live.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux IA32 microcode driver
2001-12-22 18:53 ` Ben Clifford
@ 2001-12-23 1:38 ` Chris Rankin
0 siblings, 0 replies; 4+ messages in thread
From: Chris Rankin @ 2001-12-23 1:38 UTC (permalink / raw)
To: Ben Clifford; +Cc: tigran, linux-kernel
The msr driver doesn't support devfs at all, and nor
does cpuid come to that. However, microcode creates a
miscellaneous character device, number (10,184), in
the /dev/misc directory. This is why the regular
/dev/cpu/microcode file is so mysterious...
Chris
--- Ben Clifford <benc@hawaga.org.uk> wrote:
> On Sat, 22 Dec 2001, Chris Rankin wrote:
>
> > Am I missing something rather obvious, or is the
> /dev/cpu/microcode
> > device being mis-created under devfs with Linux
> 2.4.x? I have enclosed
> > a patch to ensure that the character device really
> *is* a character
> > device.
>
> On my system, running 2.4.16, I get no devfs entry
> for that or msr at all.
> I just get the mtrr entry.
>
> This is with microcode and msr loaded as modules.
>
> --
> Ben Clifford benc@hawaga.org.uk
> http://www.hawaga.org.uk/ben/ GPG: 30F06950
> webcam:
>
http://barbarella.hawaga.org.uk/~benc/webcam/live.html
>
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux IA32 microcode driver
2001-12-22 12:58 Linux IA32 microcode driver Chris Rankin
2001-12-22 18:53 ` Ben Clifford
@ 2001-12-23 9:34 ` Tigran Aivazian
1 sibling, 0 replies; 4+ messages in thread
From: Tigran Aivazian @ 2001-12-23 9:34 UTC (permalink / raw)
To: Chris Rankin; +Cc: linux-kernel, Simon Trimmer
Hi Chris,
Yes, you are missing something, but it is not obvious. It is described in
my article in LJ of last February.
Basically, the design of microcode driver takes advantage of devfs when it
is available but works fine without it when it is not available. This is
so that we can store an extra bit of information in a field not present in
device nodes but present in regular files. What is this field? File size.
So, your patch is not to be applied. Instead, if you want to, fix the
microcode_ctl startup script to not check if /dev/cpu/microcode is a
character device node. It's a bug. Simon, I thought you fixed it, no?
Regards,
Tigran
On Sat, 22 Dec 2001, Chris Rankin wrote:
> Hi,
>
> Am I missing something rather obvious, or is the /dev/cpu/microcode
> device being mis-created under devfs with Linux 2.4.x? I have enclosed
> a patch to ensure that the character device really *is* a character
> device.
>
> Cheers,
> Chris
>
> --- linux-2.4.17/arch/i386/kernel/microcode.c.orig Sat Dec 22 12:37:07 2001
> +++ linux-2.4.17/arch/i386/kernel/microcode.c Sat Dec 22 12:43:10 2001
> @@ -125,7 +125,7 @@
> MICROCODE_MINOR);
>
> devfs_handle = devfs_register(NULL, "cpu/microcode",
> - DEVFS_FL_DEFAULT, 0, 0, S_IFREG | S_IRUSR | S_IWUSR,
> + DEVFS_FL_DEFAULT, 0, 0, S_IFCHR | S_IRUSR | S_IWUSR,
> µcode_fops, NULL);
> if (devfs_handle == NULL && error) {
> printk(KERN_ERR "microcode: failed to devfs_register()\n");
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-12-23 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-22 12:58 Linux IA32 microcode driver Chris Rankin
2001-12-22 18:53 ` Ben Clifford
2001-12-23 1:38 ` Chris Rankin
2001-12-23 9:34 ` Tigran Aivazian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®