Re: Atom D-2700 support

2012-03-18 Thread Jonathan Gray
As pointed out several times, it does _not_ do anything besides
supress the printf.

On Mon, Mar 19, 2012 at 12:13:51AM +0200, Ville Valkonen wrote:
> (Sorry if this is a duplicate but I couldn't the previous try from Gmane)
> 
> Hello,
> 
> I had a discussion with Joerg Zinke whether this patch have been
> applied into the upstream. I sent it to @tech (see details below) some
> time ago but did not receive any feedback. As suggested by Joerg, I
> also sent reminder to @jsg (no reply yet).
> 
> So, if some kernel developer could review and commit this, I and Joerg
> would be very happy at least :)
> 
> Best wishes,
> Ville
> 
> 
> On 11 March 2012 18:30, Ville Valkonen  wrote:
> > Hello Joerg,
> >
> > I haven't received any feedback from the patch yet. Apparently the
> > timing was a bit bad since the repository was about to become locked
> > at that time.
> >
> > Here's the previous discussion regarding the topic (@misc):
> > http://marc.info/?l=openbsd-misc&m=132886488701795&w=2
> >
> > After compile and testing it few days I also sent it to I to @tech:
> > http://marc.info/?l=openbsd-tech&m=132886685402343&w=2
> >
> > In summary: here's my second take for the patch and if it's not enough
> > well tested just let me know what else needs to be done.
> >
> > Kind regards,
> > Ville Valkonen
> >
> > On 11 March 2012 13:57, Joerg Zinke  wrote:
> >> Hi,
> >>
> >> did you got any feedback on this diff?
> >>
> >> This looks good to me and seems to be required for the Soekris 6501 as 
> >> well.
> >> But since this Kernel region is not my department I'm afraid to OK it.
> >>
> >> Maybe you want to resubmit it, or remind jsg@ to commit it?
> >>
> >> Thanks,
> >> Regards,
> >> Joerg
> >>
> >> On Fri, Feb 10, 2012 at 11:38:56AM +0200, Ville Valkonen wrote:
> >>> Hello,
> >>>
> >>> This patch adds support for the Intel Atom D-2700 processor. The patch
> >>> is originally from Jonathan Gray (jsg[ at ]jsg.id.au), tested by me.
> >>>
> >>> Patch:
> >>> Index: sys/arch/i386/i386/machdep.c
> >>> ===
> >>> RCS file: /cvs/src/sys/arch/i386/i386/machdep.c,v
> >>> retrieving revision 1.506
> >>> diff -u -p -r1.506 machdep.c
> >>> --- sys/arch/i386/i386/machdep.c2 Nov 2011 23:53:44 -   
> >>> 1.506
> >>> +++ sys/arch/i386/i386/machdep.c4 Feb 2012 13:37:48 -
> >>> @@ -2075,6 +2075,8 @@ p3_get_bus_clock(struct cpu_info *ci)
> >>>}
> >>>break;
> >>>case 0x1c: /* Atom */
> >>> +   case 0x26: /* Atom Z6xx */
> >>> +   case 0x36: /* Atom [DN]2xxx */
> >>>msr = rdmsr(MSR_FSB_FREQ);
> >>>bus = (msr >> 0) & 0x7;
> >>>switch (bus) {
> >>> @@ -2131,6 +2133,7 @@ p3_get_bus_clock(struct cpu_info *ci)
> >>>break;
> >>>case 0x2a: /* Core i5/i7 2nd Generation */
> >>>case 0x2d: /* Xeon E5 */
> >>> +   case 0x2f: /* Xeon E7 */
> >>>/* BUS100 */
> >>>break;
> >>>case 0x1d: /* Xeon MP 7400 */
> >>> Index: sys/arch/amd64/amd64/est.c
> >>> ===
> >>> RCS file: /cvs/src/sys/arch/amd64/amd64/est.c,v
> >>> retrieving revision 1.25
> >>> diff -u -p -r1.25 est.c
> >>> --- sys/arch/amd64/amd64/est.c  19 Apr 2011 22:14:54 -  1.25
> >>> +++ sys/arch/amd64/amd64/est.c  4 Feb 2012 13:37:48 -
> >>> @@ -198,6 +198,8 @@ p3_get_bus_clock(struct cpu_info *ci)
> >>>}
> >>>break;
> >>>case 0x1c: /* Atom */
> >>> +   case 0x26: /* Atom Z6xx */
> >>> +   case 0x36: /* Atom [DN]2xxx */
> >>>msr = rdmsr(MSR_FSB_FREQ);
> >>>bus = (msr >> 0) & 0x7;
> >>>switch (bus) {
> >>> @@ -228,6 +230,7 @@ p3_get_bus_clock(struct cpu_info *ci)
> >>>break;
> >>>case 0x2a: /* Core i5/i7 2nd Generation */
> >>>case 0x2d: /* Xeon E5 */
> >>> +   case 0x2f: /* Xeon E7 */
> >>>/* BUS100 */
> >>>break;
> >>>case 0x1d: /* Xeon MP 7400 */
> >>>
> >>>
> >>> ##
> >>> ## Dmesg after patching
> >>> ##
> >>> OpenBSD 5.1 (severi) #0: Fri Feb 10 01:53:24 EET 2012
> >>> weezel@severi.local:/usr/src/sys/arch/i386/compile/severi
> >>> cpu0: Intel(R) Atom(TM) CPU D2700 @ 2.13GHz ("GenuineIntel"
> >>> 686-class) 2.13 GHz
> >>> cpu0: 
> >>> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,SSE3,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF
> >>> real mem  = 2134732800 (2035MB)
> >>> avail mem = 2089684992 (1992MB)
> >>> User Kernel Config
> >>> UKC> disable acpiec
> >>> 475 acpiec* disabled
> >>> UKC> quit
> >>> Continuing...
> >>> mainbus0 at root
> >>> bios0 at mainbus0: AT/286+ BIOS, date 10/20/10, SMBIOS rev. 2.7 @
> >>> 0xe9670 (51 entries)
> >>> bios0: vendor American Megatre

Atom D-2700 support

2012-03-18 Thread Ville Valkonen
(Sorry if this is a duplicate but I couldn't the previous try from Gmane)

Hello,

I had a discussion with Joerg Zinke whether this patch have been
applied into the upstream. I sent it to @tech (see details below) some
time ago but did not receive any feedback. As suggested by Joerg, I
also sent reminder to @jsg (no reply yet).

So, if some kernel developer could review and commit this, I and Joerg
would be very happy at least :)

Best wishes,
Ville


On 11 March 2012 18:30, Ville Valkonen  wrote:
> Hello Joerg,
>
> I haven't received any feedback from the patch yet. Apparently the
> timing was a bit bad since the repository was about to become locked
> at that time.
>
> Here's the previous discussion regarding the topic (@misc):
> http://marc.info/?l=openbsd-misc&m=132886488701795&w=2
>
> After compile and testing it few days I also sent it to I to @tech:
> http://marc.info/?l=openbsd-tech&m=132886685402343&w=2
>
> In summary: here's my second take for the patch and if it's not enough
> well tested just let me know what else needs to be done.
>
> Kind regards,
> Ville Valkonen
>
> On 11 March 2012 13:57, Joerg Zinke  wrote:
>> Hi,
>>
>> did you got any feedback on this diff?
>>
>> This looks good to me and seems to be required for the Soekris 6501 as well.
>> But since this Kernel region is not my department I'm afraid to OK it.
>>
>> Maybe you want to resubmit it, or remind jsg@ to commit it?
>>
>> Thanks,
>> Regards,
>> Joerg
>>
>> On Fri, Feb 10, 2012 at 11:38:56AM +0200, Ville Valkonen wrote:
>>> Hello,
>>>
>>> This patch adds support for the Intel Atom D-2700 processor. The patch
>>> is originally from Jonathan Gray (jsg[ at ]jsg.id.au), tested by me.
>>>
>>> Patch:
>>> Index: sys/arch/i386/i386/machdep.c
>>> ===
>>> RCS file: /cvs/src/sys/arch/i386/i386/machdep.c,v
>>> retrieving revision 1.506
>>> diff -u -p -r1.506 machdep.c
>>> --- sys/arch/i386/i386/machdep.c2 Nov 2011 23:53:44 -   
>>> 1.506
>>> +++ sys/arch/i386/i386/machdep.c4 Feb 2012 13:37:48 -
>>> @@ -2075,6 +2075,8 @@ p3_get_bus_clock(struct cpu_info *ci)
>>>}
>>>break;
>>>case 0x1c: /* Atom */
>>> +   case 0x26: /* Atom Z6xx */
>>> +   case 0x36: /* Atom [DN]2xxx */
>>>msr = rdmsr(MSR_FSB_FREQ);
>>>bus = (msr >> 0) & 0x7;
>>>switch (bus) {
>>> @@ -2131,6 +2133,7 @@ p3_get_bus_clock(struct cpu_info *ci)
>>>break;
>>>case 0x2a: /* Core i5/i7 2nd Generation */
>>>case 0x2d: /* Xeon E5 */
>>> +   case 0x2f: /* Xeon E7 */
>>>/* BUS100 */
>>>break;
>>>case 0x1d: /* Xeon MP 7400 */
>>> Index: sys/arch/amd64/amd64/est.c
>>> ===
>>> RCS file: /cvs/src/sys/arch/amd64/amd64/est.c,v
>>> retrieving revision 1.25
>>> diff -u -p -r1.25 est.c
>>> --- sys/arch/amd64/amd64/est.c  19 Apr 2011 22:14:54 -  1.25
>>> +++ sys/arch/amd64/amd64/est.c  4 Feb 2012 13:37:48 -
>>> @@ -198,6 +198,8 @@ p3_get_bus_clock(struct cpu_info *ci)
>>>}
>>>break;
>>>case 0x1c: /* Atom */
>>> +   case 0x26: /* Atom Z6xx */
>>> +   case 0x36: /* Atom [DN]2xxx */
>>>msr = rdmsr(MSR_FSB_FREQ);
>>>bus = (msr >> 0) & 0x7;
>>>switch (bus) {
>>> @@ -228,6 +230,7 @@ p3_get_bus_clock(struct cpu_info *ci)
>>>break;
>>>case 0x2a: /* Core i5/i7 2nd Generation */
>>>case 0x2d: /* Xeon E5 */
>>> +   case 0x2f: /* Xeon E7 */
>>>/* BUS100 */
>>>break;
>>>case 0x1d: /* Xeon MP 7400 */
>>>
>>>
>>> ##
>>> ## Dmesg after patching
>>> ##
>>> OpenBSD 5.1 (severi) #0: Fri Feb 10 01:53:24 EET 2012
>>> weezel@severi.local:/usr/src/sys/arch/i386/compile/severi
>>> cpu0: Intel(R) Atom(TM) CPU D2700 @ 2.13GHz ("GenuineIntel"
>>> 686-class) 2.13 GHz
>>> cpu0: 
>>> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,SSE3,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF
>>> real mem  = 2134732800 (2035MB)
>>> avail mem = 2089684992 (1992MB)
>>> User Kernel Config
>>> UKC> disable acpiec
>>> 475 acpiec* disabled
>>> UKC> quit
>>> Continuing...
>>> mainbus0 at root
>>> bios0 at mainbus0: AT/286+ BIOS, date 10/20/10, SMBIOS rev. 2.7 @
>>> 0xe9670 (51 entries)
>>> bios0: vendor American Megatrends Inc. version "4.6.4" date 12/01/2011
>>> acpi0 at bios0: rev 2
>>> acpi0: sleep states S0 S1 S4 S5
>>> acpi0: tables DSDT FACP APIC MCFG HPET SSDT
>>> acpi0: wakeup devices P0P8(S4) PS2K(S1) PS2M(S1) USB0(S4) USB1(S4)
>>> USB2(S4) USB3(S4) USB7(S4) PXSX(S4) RP01(S4) PXSX(S4) RP03(S4)
>>> PXSX(S4) RP04(S4) PXSX(S4) RP02(S4) PWRB(S1)
>>> acpitimer0 at acpi0: 3579545 Hz, 24 bits
>>>