# VIA Nano: General Configuration and Information

## Vietor

There have been a few threads so far which mention the Nano, but as it's a bit of an odd duck processor, a dedicated discussion thread might save a lot of headache. As I am going to have to figure this all out anyway, I thought that I might as well share. This should probably be turned into a Wiki page, but until then I will try to update this base post with any information added to the thread.

Why should you care? Because the VB8001 is a fun SFF project board. It's quite small (MiniITX), reasonable fast, low power (EDIT: 26w idle at full clock speed with PicoPSU, not 39w as originally reported), and has some additional fun features like hardware AES encryption. 

I'm starting essentially nothing here, and will be adding information (CFLAGS, Kernel CPU type, etc.) as I can confirm that it works. 

I would like to make this work with a hardened profile (i.e. GCC-3.4.6), but have not yet determined how much compromise that will require.

Note: I am not in any way affiliated with VIA, and I do not have any special insight or interest in the Nano outside of my own person and professional use. 

General Information:

Nano is a 64-bit processor

Definitions for the cpu flags may be found in your kernel sources at: arch/x86/include/asm/cpufeature.h

```

cat /proc/cpuinfo 

processor   : 0

vendor_id   : CentaurHauls

cpu family   : 6

model      : 15

model name   : VIA Nano processor L2200@1600MHz

stepping   : 2

cpu MHz      : 1615.796

cache size   : 1024 KB

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss tm syscall nx fxsr_opt rdtscp lm pni monitor vmx est tm2 ssse3 cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm

bogomips   : 3233.19

clflush size   : 64

```

Note: My initial CHOST and CFLAGS look strange because I am netbooting off of a filesystem copied from an EPIA EN12000. (Why? Because I work with a lot of EN12000 boards and wanted to see if the VB8001 would work as a drop in upgrade. Obviously sub-optimal, but as the VB8001 is both faster and less expensive than the EN12000, it makes sense for my purposes in the short term. )

CHOST

i686-pc-linux-gnu: Super conservative, seems to be functional

x86_64-pc-linux-gnu: Untested

CFLAGS

-march=i686 -m32 -O2 -pipe : Super conservative, seems to be functional, obviously sub-optimal

Known Issues

Padlock: Depends on X86_32 because of inline assembly

Fixed: http://lkml.indiana.edu/hypermail/linux/kernel/0903.1/03148.html

```

  CC      drivers/crypto/padlock-aes.o

{standard input}: Assembler messages:

{standard input}:27: Error: suffix or operands invalid for `pushf'

{standard input}:27: Error: suffix or operands invalid for `popf'

{standard input}:281: Error: suffix or operands invalid for `pushf'

{standard input}:281: Error: suffix or operands invalid for `popf'

{standard input}:350: Error: suffix or operands invalid for `pushf'

{standard input}:350: Error: suffix or operands invalid for `popf'

{standard input}:452: Error: suffix or operands invalid for `pushf'

{standard input}:452: Error: suffix or operands invalid for `popf'

{standard input}:535: Error: suffix or operands invalid for `pushf'

{standard input}:535: Error: suffix or operands invalid for `popf'

{standard input}:634: Error: suffix or operands invalid for `pushf'

{standard input}:634: Error: suffix or operands invalid for `popf'

make[2]: *** [drivers/crypto/padlock-aes.o] Error 1

```

Padlock functions when running a 32-bit system and kernel, but due to confounding factors I have not been able to verify the stability of that configuration. 

Reported Issues

hwmon-vid throws message with VIA nano

cpufreq_ondemand and cpufreq_conservative hang machine

Post questions, technical or not, and I will try to add answers.

----------

## Sadako

I don't have any via nano hardware (yet), but I really want to get my hands on some soon (hell, I've been anticipating it for over a year...), and as no one else has replied I thought I might as well try to get a discussion started.

Things I'd very much like to here about your experiences with;

Frequency scaling, I've read your other post about it and would like to know if you have had any more luck, and just out of interest have you had it working on your other non-nano epia boards?

And in response to your reply to that thread, from what I've seen on most intel or amd cpus frequency scaling does make quite a noticeable difference, but everything I've read wrt to the c7 is frequency scaling doesn't accomplish much as the chip is extremely efficient when idle as-is, so lowering the clock speed won't really make much difference, and from what you described the nano looks to be the same.

Also, any benchmarks you find online wrt to the nano's power usage suggest there is a huge jump when under load, something which the nano "3000" series update due midyear is expected to fix somewhat.

lm_sensors/hwmon, ie can you read the sys temps, fan speeds and the like, and even control fan speeds via pwm?

And what lm_sensors module is required, or basically what hardware monitoring chip does the board use?

Compile times, if you've started to emerge things on the board itself I'd really like to know what the compile times for certain packages are like, such as gcc and glibc, and any other packages with long compile times, something like the output of `emerge -pv gcc glibc && genlop -t gcc glibc`.

Also, what are the system temps like when under such load (presuming they're readable)?

The gpu, "chrome 9" or whatever.

I have no idea whether you're using this as a headless system or not, but if not then what are your experiences with the xorg-drivers?

From what I've heard in the past, via igp's generally leave something to be desired wrt picture quality, but I'm hopeful the chrome 9 is an improvement.

phoronix is a useful site for keeping up to date with what's happening with the via igp drivers for linux/xorg.

x86_64 support, I've yet to read anything about it other than "it's there", so if you do a 64-bit install I'd love to hear how that goes.

Virtualisation, I'm very curious to know how well the intel virtualisation acceleration extension works as well.

Also, the bios, just how configurable/tweakable is it?

Two other things, I've read that performance/throughput of both the rng and aes engine is essentially the same as with the c7, does that appear to be the case?

And what is the cpu utilization like with either of these appear to be used?

I'd be very interested in hearing of your experiences with any of the above, and anything else since you've been playing with the VB8001.

As for CFLAGS, I believe the -m32 should be unneccesary as long as CHOST is i686 or a similar 32-bit specific setting.

Similarly, -march=x86-64 should be safe, as it's considered the "safe" generic 64-bit cpu march setting, and you can use 64-bit -march flags such as -march=athlon64 even for 32-bit binaries/installs.

And to supplement that, you should be able to add "-mmmx -msse -msse2 -msse3 -mssse3", as these all seem to be supported (and is what will be added with a nano-specific -march anyways).

btw, while running 32-bit you may want to add -fomit-frame-pointer.

It'll probably be a while (if ever) before gcc supports a nano-specific -march, but I'd be interested to see what 4.3 uses with -march=native.

As for the optimisiation level, while the nano has a healthy sized cache (both L1 and L2), a number of articles I've read suggest the L2 isn't as "fast" as it could/should be, so I was considering using -Os by default, and compiling other select packages with -O2 via /etc/portage/env/.

If samsung releases their nano-based nc20 "netbook" with both a SSD drive and linux pre-installed, I will be getting one even if I have to rob a bank, although atm both of those conditions are looking rather unlikely...

PS: sorry this post is so damn long, I really need to work on being less "verbose"...

----------

## Vietor

Steve Yegge is verbose, you just couldn't pick which subjects to cover and so included them all  :Wink: 

I've not tried frequency scaling yet, I'll have some numbers for that in the next day or two hopefully. There was actually an error in my original post, I had forgotten to leave the hard drives disconnected, so the original power number was wrong. Actual idle power consumption of the board with one stick of ram is 26W (Using a PicoPSU). So yeah, there isn't a whole lot of room there to save, but then again, if it doesn't hurt, why not?

As for power jump under load, I'm currently seeing a max of 37W while compiling glibc. Not a stable and perfectly loaded test case, but at least a good idea. 

Sensors, still working on that. Initial results were not promising, but were also obtained in a completely insane system configuration.

Compile times. Currently netbooting off a server with a hugely variable load, not in a hurry to get some normal drives on it, but I'll give an outside estimate using the existing configuration once I get it settled down. The very limited results I have, mostly with toy workloads lke a non-accelerated openssl test, put it at about 2.5x the speed of an EN12000.

I have no plans to do any graphical testing. Not a use case I'm interested in, and I don't have the time to do more than a completely half-assed job if I tried.

x86_64: Currently in the process of rebuilding everything under x86_64. It appears to be working so far.  I've got a mostly working 32-bit system image of it, but other than the reason given in my original post, I can't think of why you'd want to do that.

Virtualization: No experience on the Nano yet. I use KVM and Xen fairly extensively though, so even though I've no active plans to use either in conjunction with the Nano, I'll probably give it a whirl.

Padlock: Clock adjusted throughput seems to be slightly lower than the EN12000 I'm comparing against, but that's likely just Ahmdal being difficult again.  VB8001 does AES-256 at ~700MB/Sec for 8k blocks. Haven't tested the RNG.

Can't imagine that the CPU usage would be anything other than 100% when running a speed test. However in real use, I can't think of a scenario that would use that full capacity, so there should be plenty of CPU time left over. That's my experience with EN12000 boards anyhow. 

CFLAGS: Not to be taken seriously yet. I will be trying -march=native with 4.3.2-r2 and seeing what happens. Do you know offhand how to get GCC to output specifically what it's doing with -march=native? I will also be trying to run a plain hardened profile with 3.4.6 and see how that goes.

----------

## nebux

I have bought a Samsung NC20, but I'm currently fighting with it. I can't emerge gcc (neither 4.3.2-r3 nor 4.1.2), it always fails with a "double free or corruption (out)" error.

Have any of you managed to install a 64 bits Gentoo linux with the NC20 ?

----------

## Vietor

There is an open bug regarding GCC compilation on the Nano. It is not strictly a Gentoo problem, but rather appears to be a GCC one. 

https://bugs.gentoo.org/show_bug.cgi?id=265113

The kernel padlock implementation has been fixed though, and a generic x86_64 GCC built on another platform seems to work ok.

----------

## dj_farid

Anything new on this one?

I just got my VB8001 buit. I am about to install x86_64 gentoo on it.

Is it possible to control the fans with lm-sensors?

The CPU fan is loud.

----------

## dj_farid

Virtualisation (KVM) seems to be a problem with this board:

http://marc.info/?l=kvm&m=123861829901077

 *Quote:*   

> Stepping 2 Nano processors do not support VMX. This 
> 
> should have been disabled by the BIOS. Support for VMX was not finished 
> 
> until stepping 3.

 

----------

## kitestramuort

i just got my hands on a Samsung NC20, powered by the via nano u2250 processor and i'm planning to install a x86_64 gentoo on it. 

Which cflags would you use with this strange beast to get a decently optimized system? AFAIK gcc doesn't have specific tuning for the nano (yet).

cpuinfo follows

```
processor   : 0

vendor_id   : CentaurHauls

cpu family   : 6

model      : 15

model name   : VIA Nano processor U2250@1300+MHz

stepping   : 2

cpu MHz      : 900.000

cache size   : 1024 KB

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss tm pbe syscall fxsr_opt rdtscp lm constant_tsc rep_good pni monitor est tm2 ssse3 cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm

bogomips   : 3191.75

clflush size   : 64

cache_alignment   : 128

address sizes   : 36 bits physical, 48 bits virtual

power management:
```

----------

## Mike Hunt

If you have >=gcc-4.2 - a recent stage3 or definitely a funtoo stage3 is good for that - then probably -march=native should be a good one

```
CHOST="i686-pc-linux-gnu"

CFLAGS="-march=native -O2 -pipe"

CXXFLAGS="${CFLAGS}"
```

 :Arrow:  Look here.

----------

## d2_racing

In fact, native is the best choice nowadays.

----------

## Mike Hunt

In fact, you can see which options -march=native uses by running

```
 gcc -### -march=native -E /usr/include/stdlib.h 2>&1 | grep "/usr/libexec/gcc/.*cc1"
```

----------

## nixnut

merged some posts above

----------

## dj_farid

 *Mike Hunt wrote:*   

> In fact, you can see which options -march=native uses by running
> 
> ```
>  gcc -### -march=native -E /usr/include/stdlib.h 2>&1 | grep "/usr/libexec/gcc/.*cc1"
> ```
> ...

 

For anyone interested:

```
# gcc -### -march=native -E /usr/include/stdlib.h 2>&1 | grep "/usr/libexec/gcc/.*cc1"

 "/usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.2/cc1" "-E" "-quiet" "/usr/include/stdlib.h" "-march=core2" "-mcx16" "-msahf" "-mtune=core2"

```

That is from the VB8001.

----------

## sdc45103

On the topic of the VB8001, I have been using one for some time now and have been fighting with video issues.

Has anyone successfully gotten the onboard video ( VIA P4M900 ) working properly? I seem to have video acceleration, but I get wierd display irregularities and crashes.

Details are in this post:  https://forums.gentoo.org/viewtopic-t-796675-highlight-scrambled.html

Not sure what the issue is, but I am new at all of this, so perhaps it is something simple.

If anybody has a working configuration that I could replicate it would be most appreciated.

----------

## dj_farid

What is the "best" cflags to use for this CPU until gcc has real support for it?

This thread might interest some owners of this CPU:

http://gcc.gnu.org/ml/gcc-help/2009-10/msg00358.html

----------

## d2_racing

-march=native is the best way right now to let GCC handle the optimization Cflags.

----------

## dj_farid

 *d2_racing wrote:*   

> -march=native is the best way right now to let GCC handle the optimization Cflags.

 

No it's not, if the CPU is not supported by GCC.

GCC chooses Core2 as "native" since there is no specific support for the VIA Nano. This is far from optimal.

----------

## the_mgt

 *d2_racing wrote:*   

> -march=native is the best way right now to let GCC handle the optimization Cflags.

 

I do not share this oppinion either. On my old MII 6000E board gcc chooses a pentium2 or something and therefor completely ignores 3dnow! on the chip.  Also that would probably lead to desaster, since that cpu is one of those bastards which technically fullfills the i686 specs by the book but omits the CMOV, so compiling with march=i686 leads to illegal instructions. (It's a C3 Samuel)

Currently I am waiting for my Lenovo Ideapad S12 with a Via Nano (Stepping 3!) and a VX800 Chipset (Chrome9 HC3). So I probably will e contributing to this thread, too. Maybe we should put infos into a wiki article.

Some links:

http://bewareofgeek.livejournal.com/2300.html gnu/linux on lenovo s12 via nano

http://bewareofgeek.livejournal.com/2315.html Arch x86_64 linux on Lenovo Ideapad S12 via nano

PS: I saw a post somewhere that there are Samsung NC20's with stepping 3 Nanos avaiable

----------

## the_mgt

So, my Lenovo Ideapad S12 with a VIA Chipset finally arrived and I like it! Performance is better than I suspected, display is glossy but brightness compensates that and battery lives about 5 hours.

Now the technical facts:

```
cat /proc/cpuinfo 

processor   : 0

vendor_id   : CentaurHauls

cpu family   : 6

model      : 15

model name   : VIA Nano processor U2250 (1.6GHz Capable)

stepping   : 3

cpu MHz      : 1600.000

cache size   : 1024 KB

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush acpi mmx fxsr sse sse2 ss tm pbe syscall nx lm constant_tsc rep_good pni monitor vmx est tm2 ssse3 cx16 xtpr rng rng_en ace ace_en ace2 phe phe_en lahf_lm

bogomips   : 3191.83

clflush size   : 64

cache_alignment   : 128

address sizes   : 36 bits physical, 48 bits virtual

power management:

```

Virtualisation/vmx/kvm/Intel-VT

You see stepping 3 there, and you see "vmx", but do not expect it do anything atm. The bios is a joke, you can set the time, change the boot order and set passwords for bios or hd, but there is no option to turn on virtualisation and so it is off! That is a huge show stopper, one of the reasons why I bought this thing was exactly this missing feature. Will contact both Lenovo and Via about that.

64bit

Works perfect, no glitches so far

Padlock/HW Encryption Acceleration

Also working, as it seems, I did not do benchmarks, but even heavy IO on my luks encrypted harddisk runs smooth on the cpu

CFlAGS

-march=x86-64 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf 

(-march=native does not set the l2-cache size on any of my boxes, I wonder why)

If I find any spare time, I'll set up a wiki article and let you know about the rest of the notebook and configuration stuff

----------

## Deusexodus

I'd like to know if you pushed your infos on the wiki, because I don't see it anywhere.

Thank you for the CFLAGS parameters.

----------

## lpt2007

the_mgt your CFLAGS works great on my VIA NANO L1900 cpu. Can you tell me other make.conf settings?

 *the_mgt wrote:*   

> So, my Lenovo Ideapad S12 with a VIA Chipset finally arrived and I like it! Performance is better than I suspected, display is glossy but brightness compensates that and battery lives about 5 hours.
> 
> Now the technical facts:
> 
> ```
> ...

 

----------

