* Re: hardware random number generator?
2004-03-23 2:00 hardware random number generator? Jeff Garzik
@ 2004-03-23 3:04 ` Matthew Wilcox
2004-03-24 7:23 ` Mallick, Asit K
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Matthew Wilcox @ 2004-03-23 3:04 UTC (permalink / raw)
To: linux-ia64
On Mon, Mar 22, 2004 at 09:00:14PM -0500, Jeff Garzik wrote:
> Matthew Wilcox wrote:
> >config HW_RANDOM
> > tristate "Intel/AMD/VIA HW Random Number Generator support"
> > depends on (X86 || IA64) && PCI
> > ---help---
> > This driver provides kernel-side support for the Random Number
> > Generator hardware found on Intel i8xx-based motherboards,
> > AMD 76x-based motherboards, and Via Nehemiah CPUs.
> >
> >Why IA64 too? This file contains the code:
>
> No idea. <guessing> There are some Intel ICH-based motherboards w/
> IA64 chips on them, maybe? I certainly don't recall adding that IA64
> marker... :)
Heh. ICH is x86-only, as far as I know. Intel did the 460GX chipset
for Merced and now have the E8870 chipset for McKinley/Madison. Anyone
familiar with the Intel chipsets want to comment about the presence or
absence of a RNG?
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
^ permalink raw reply [flat|nested] 8+ messages in thread* RE: hardware random number generator?
2004-03-23 2:00 hardware random number generator? Jeff Garzik
2004-03-23 3:04 ` Matthew Wilcox
@ 2004-03-24 7:23 ` Mallick, Asit K
2004-03-25 0:11 ` Bjorn Helgaas
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Mallick, Asit K @ 2004-03-24 7:23 UTC (permalink / raw)
To: linux-ia64
E8870 based McKinley/Madison platforms does have ICH4. It is used to
provide USB, IDE, On board LAN, LPC, SMBus, etc. funtionality. However,
the RNG does not work on current E8870 based platforms. Future platforms
may enable RNG.
Thanks,
Asit
>-----Original Message-----
>From: linux-ia64-owner@vger.kernel.org
>[mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Matthew Wilcox
>Sent: Monday, March 22, 2004 7:05 PM
>To: Jeff Garzik
>Cc: Matthew Wilcox; linux-ia64@vger.kernel.org
>Subject: Re: hardware random number generator?
>
>On Mon, Mar 22, 2004 at 09:00:14PM -0500, Jeff Garzik wrote:
>> Matthew Wilcox wrote:
>> >config HW_RANDOM
>> > tristate "Intel/AMD/VIA HW Random Number Generator support"
>> > depends on (X86 || IA64) && PCI
>> > ---help---
>> > This driver provides kernel-side support for the
>Random Number
>> > Generator hardware found on Intel i8xx-based motherboards,
>> > AMD 76x-based motherboards, and Via Nehemiah CPUs.
>> >
>> >Why IA64 too? This file contains the code:
>>
>> No idea. <guessing> There are some Intel ICH-based motherboards w/
>> IA64 chips on them, maybe? I certainly don't recall adding
>that IA64
>> marker... :)
>
>Heh. ICH is x86-only, as far as I know. Intel did the 460GX chipset
>for Merced and now have the E8870 chipset for McKinley/Madison. Anyone
>familiar with the Intel chipsets want to comment about the presence or
>absence of a RNG?
>
>--
>"Next the statesmen will invent cheap lies, putting the blame upon
>the nation that is attacked, and every man will be glad of those
>conscience-soothing falsities, and will diligently study them,
>and refuse
>to examine any refutations of them; and thus he will by and by
>convince
>himself that the war is just, and will thank God for the better sleep
>he enjoys after this process of grotesque self-deception." --
>Mark Twain
>-
>To unsubscribe from this list: send the line "unsubscribe
>linux-ia64" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: hardware random number generator?
2004-03-23 2:00 hardware random number generator? Jeff Garzik
2004-03-23 3:04 ` Matthew Wilcox
2004-03-24 7:23 ` Mallick, Asit K
@ 2004-03-25 0:11 ` Bjorn Helgaas
2004-04-06 21:27 ` Bjorn Helgaas
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2004-03-25 0:11 UTC (permalink / raw)
To: linux-ia64
On Wednesday 24 March 2004 12:23 am, Mallick, Asit K wrote:
> E8870 based McKinley/Madison platforms does have ICH4. It is used to
> provide USB, IDE, On board LAN, LPC, SMBus, etc. funtionality. However,
> the RNG does not work on current E8870 based platforms. Future platforms
> may enable RNG.
The following patch allows hw_random.c to build on ia64. (The problem
was just that the VIA stuff has i386 assembly in it. The current code
only probes for VIA on i386 anyway, so this patch just adds more ifdefs
so the VIA code is only built for i386.)
This boots fine on my Tiger, but reading it seems to give all ones,
which I suppose is what you mean about it being broken.
I don't know whether we should
1) apply this patch, and ignore the fact that you don't
get random data on current E8870-based platforms,
2) put in some kind of check for known-buggy hardware (I don't
know how to do that, of course), or
3) change Kconfig so we don't offer it for ia64 (though
we will presumably want to do so for future ia64 platforms).
I guess I vote for (1) at the moment, and if you think we should
be smart about identifying the broken versions of E8870, maybe
you can supply a patch, Asit.
=== drivers/char/hw_random.c 1.13 vs edited ==--- 1.13/drivers/char/hw_random.c Fri Jan 30 21:25:15 2004
+++ edited/drivers/char/hw_random.c Wed Mar 24 16:16:21 2004
@@ -92,10 +92,12 @@
static unsigned int amd_data_present (void);
static u32 amd_data_read (void);
+#ifdef __i386__
static int __init via_init(struct pci_dev *dev);
static void via_cleanup(void);
static unsigned int via_data_present (void);
static u32 via_data_read (void);
+#endif
struct rng_operations {
int (*init) (struct pci_dev *dev);
@@ -137,8 +139,10 @@
/* rng_hw_amd */
{ amd_init, amd_cleanup, amd_data_present, amd_data_read, 4 },
+#ifdef __i386__
/* rng_hw_via */
{ via_init, via_cleanup, via_data_present, via_data_read, 1 },
+#endif
};
/*
@@ -341,6 +345,7 @@
/* FIXME: twiddle pmio, also? */
}
+#ifdef __i386__
/***********************************************************************
*
* VIA RNG operations
@@ -456,6 +461,7 @@
{
/* do nothing */
}
+#endif
/***********************************************************************
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: hardware random number generator?
2004-03-23 2:00 hardware random number generator? Jeff Garzik
` (2 preceding siblings ...)
2004-03-25 0:11 ` Bjorn Helgaas
@ 2004-04-06 21:27 ` Bjorn Helgaas
2004-04-06 22:52 ` Randy.Dunlap
2004-04-19 16:55 ` Jeff Garzik
5 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2004-04-06 21:27 UTC (permalink / raw)
To: linux-ia64
Jeff, can you apply this patch to hw_random.c? Thanks.
The following patch allows hw_random.c to build on ia64. (The problem
was just that the VIA stuff has i386 assembly in it. The current code
only probes for VIA on i386 anyway, so this patch just adds more ifdefs
so the VIA code is only built for i386.)
=== drivers/char/hw_random.c 1.13 vs edited ==--- 1.13/drivers/char/hw_random.c Fri Jan 30 21:25:15 2004
+++ edited/drivers/char/hw_random.c Wed Mar 24 16:16:21 2004
@@ -92,10 +92,12 @@
static unsigned int amd_data_present (void);
static u32 amd_data_read (void);
+#ifdef __i386__
static int __init via_init(struct pci_dev *dev);
static void via_cleanup(void);
static unsigned int via_data_present (void);
static u32 via_data_read (void);
+#endif
struct rng_operations {
int (*init) (struct pci_dev *dev);
@@ -137,8 +139,10 @@
/* rng_hw_amd */
{ amd_init, amd_cleanup, amd_data_present, amd_data_read, 4 },
+#ifdef __i386__
/* rng_hw_via */
{ via_init, via_cleanup, via_data_present, via_data_read, 1 },
+#endif
};
/*
@@ -341,6 +345,7 @@
/* FIXME: twiddle pmio, also? */
}
+#ifdef __i386__
/***********************************************************************
*
* VIA RNG operations
@@ -456,6 +461,7 @@
{
/* do nothing */
}
+#endif
/***********************************************************************
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: hardware random number generator?
2004-03-23 2:00 hardware random number generator? Jeff Garzik
` (3 preceding siblings ...)
2004-04-06 21:27 ` Bjorn Helgaas
@ 2004-04-06 22:52 ` Randy.Dunlap
2004-04-19 16:55 ` Jeff Garzik
5 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-04-06 22:52 UTC (permalink / raw)
To: linux-ia64
On Tue, 23 Mar 2004 23:23:29 -0800 Mallick, Asit K wrote:
| E8870 based McKinley/Madison platforms does have ICH4. It is used to
| provide USB, IDE, On board LAN, LPC, SMBus, etc. funtionality. However,
| the RNG does not work on current E8870 based platforms. Future platforms
| may enable RNG.
Does this agree with or allow for this end-of-support announcement?
http://www.intel.com/design/security/rng/rng.htm
| Thanks,
| Asit
|
| >-----Original Message-----
| >From: linux-ia64-owner@vger.kernel.org
| >[mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Matthew Wilcox
| >Sent: Monday, March 22, 2004 7:05 PM
| >To: Jeff Garzik
| >Cc: Matthew Wilcox; linux-ia64@vger.kernel.org
| >Subject: Re: hardware random number generator?
| >
| >On Mon, Mar 22, 2004 at 09:00:14PM -0500, Jeff Garzik wrote:
| >> Matthew Wilcox wrote:
| >> >config HW_RANDOM
| >> > tristate "Intel/AMD/VIA HW Random Number Generator support"
| >> > depends on (X86 || IA64) && PCI
| >> > ---help---
| >> > This driver provides kernel-side support for the
| >Random Number
| >> > Generator hardware found on Intel i8xx-based motherboards,
| >> > AMD 76x-based motherboards, and Via Nehemiah CPUs.
| >> >
| >> >Why IA64 too? This file contains the code:
| >>
| >> No idea. <guessing> There are some Intel ICH-based motherboards w/
| >> IA64 chips on them, maybe? I certainly don't recall adding
| >that IA64
| >> marker... :)
| >
| >Heh. ICH is x86-only, as far as I know. Intel did the 460GX chipset
| >for Merced and now have the E8870 chipset for McKinley/Madison. Anyone
| >familiar with the Intel chipsets want to comment about the presence or
| >absence of a RNG?
| >
| >--
--
~Randy
"We have met the enemy and he is us." -- Pogo (by Walt Kelly)
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: hardware random number generator?
2004-03-23 2:00 hardware random number generator? Jeff Garzik
` (4 preceding siblings ...)
2004-04-06 22:52 ` Randy.Dunlap
@ 2004-04-19 16:55 ` Jeff Garzik
5 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2004-04-19 16:55 UTC (permalink / raw)
To: linux-ia64
Bjorn Helgaas wrote:
> Jeff, can you apply this patch to hw_random.c? Thanks.
>
> The following patch allows hw_random.c to build on ia64. (The problem
> was just that the VIA stuff has i386 assembly in it. The current code
> only probes for VIA on i386 anyway, so this patch just adds more ifdefs
> so the VIA code is only built for i386.)
applied to 2.6
^ permalink raw reply [flat|nested] 8+ messages in thread