Category Archives: ARM

Ubuntu 18.04 ARM64 DPDK in VM (QEMU)

DPDK is a very popular infrastructure in high speed packet process domain, some applications will used the same architecture to process packet, like EPC.

For Ubuntu 18.04, it used dpdk 17.11, it not good for some other application like dpdk pktgen, but enough for testpmd and l3fwd test. here is some personal note for setup whole environment.

DPDK in QEMU archeticture
Read more »

Gentoo ARM64 Docker Image

There is a long time no article about gentoo on my blog.

Today, I have a whim to do a gentoo ARM64 docker image, so, we have this article.

Please understand that ARM64 Gentoo is experimental, and might be different after a while.

Read more »

QEMU Run x86_64 on ARM64 Server command

This is a work note for run x86_64 on ARM64 server .
Because they are different archeticture, so, run x86_64 on ARM server would be very slow.

and some functions might be different when run on different platform

Read more »

Kdump in ubuntu 18.04 ARM64


kdump is very good tool to debug complex system like cloud data center, it can easy to save kernel status when crash.
Running kdump in ARM64 just like running in x86, but I met a strange problem on ARM64 platform.

The kernel version is HWE kernel, current version is 4.18.0-25, mihbt be encounter those problems

Read more »

ARM64 Kdump cannot allocate crashkernel

In ARM64 server and installed memory around 128G, ubuntu default /etc/default/grub.d/kdump-tools.cfg default configuration might cause kdump allocate memory failed. error message as below

[ 0.000000] cannot allocate crashkernel (size:0x80000000)
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-25-generic root=UUID=ee8be10d-d649-425d-a807-640751836186 ro console=tty0 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M

Read more »

ARM64 Ububtu GRUB Install

碰到一台 ARM64 機器沒有裝 GRUB . ARM64 是跑 UEFI

首先先安裝 grub

$ sudo apt install grub-efi-arm64 grub-efi-arm64-bin grub2-common

檢查 uefi partition 有沒有 mount 在 /boot/efi 下, 如果沒有可以 mount 上去, ex:

$ sudo mount /dev/sda1 /boot/efi

執行 grub-install 後就可以了

$ sudo grub-install /dev/sda

ref.
GRUB on ARM
GRUB (正體中文)

aarch64/ARM64 virt-install 啟動方法

雖然 ubuntu 有好用的 uvttool-libvirt 可以管理 cloud image , 但是似乎在 aarch64/ARM64 的平台上會有問題,
參數傳進去的時候似乎都會叫起來 VGA (cirrus), 但是 QEMU aarch64 上不支援 VGA (至少我用的不支援)
替代方案就是用 Virt Manager
Read more »

Cavium ThunderX Install Ubuntu CD

choice 3 shell

GPIO(0)-NODE(0): Vector:100 address :801000000050 irq:33
GPIO(0)-NODE(0): Vector:101 address :801000000058 irq:33
Using TWSI func = 0x48
UEFI Interactive Shell v2.1
choice 3 shell

ThunderX Cavium UEFI install ubuntu CD

enter shell mode and put usb cd-rom .

GPIO(0)-NODE(0): Vector:100 address :801000000050 irq:33
GPIO(0)-NODE(0): Vector:101 address :801000000058 irq:33
Using TWSI func = 0x48
UEFI Interactive Shell v2.1
EDK II
UEFI v2.40 (Cavium Thunder cn88xx EFI ThunderX-Firmware-Release-1.22.11-0-g06c3f37 Sep)
Mapping table
FS0: Alias(s):CD36a0b0a:;BLK1:
PciRoot(0x0)/Pci(0x11,0x0)/USB(0x0,0x0)/USB(0x1,0x0)/CDROM(0x0)
BLK2: Alias(s):      
VenHw(25E45362-4074-46DC-88A0-79D6A23F3C9D)
BLK0: Alias(s):                     
PciRoot(0x0)/Pci(0x11,0x0)/USB(0x0,0x0)/USB(0x1,0x0)
 
Press ESC in 3 seconds to skip startup.nsh or any other key to continue.
Shell> fs0:                                   
FS0:\> ls

run
/boot/grub/arm64-efi

[跟風] 程式設計師, 你調試過最難的 BUG

看到一篇文章
簡體中文翻譯: 程序员,你调试过的最难的 Bug 是?
原文: What’s the hardest bug you’ve debugged?

看原文比翻譯好一點, 從原文大概只可能猜出, 改過 timer 之後, 可能影響到 interrupt 的速度.
但是從最後的描述猜也可能是動到 clock tree 去影響 timer 進而影響到其他的行為.
有碰到這種 BUG 的第一個一定先猜 timing , 純軟體的反而不會這樣想, 所以他覺得最難的 BUG
我們看起來就還好.

這個描述讓我也想寫一下, 我碰過最難的 BUG.
Read more »

ARM NEON memcpy

FourDollar 在 Plurk 上提到的, NEON 是 SIMD 的指令, 可以同時做矩陣運算, 拿來做一些記憶體搬移和運算都會比較快.
VFP 是 SIMD 的指令, 不過背後是循序運算, 還是比 CPU 快, 但是相對上不會比較快.

Added NEON optimized memcpy + armv6 unaligned memory access.
imx-libc-neon / memcpy-neon.S
改善 Android 中 memcpy 效能
ARM: NEON optimized implementation of memcpy.
http://sourceware.org/ml/libc-ports/2009-07/msg00000.html

之前有碰過 DMA 搬 Data 和 CPU 搬速度差不多的狀況.
看起來拿閒置的 NEON 來用也是不錯的.
但是 NEON dimension 太大, 如果不是有關影像處理, 只拿來做 data copy 就有點浪費了.

Update:
NEON 是要配合 prefetch 才會快, 如果沒有 prefetch 是差不多的, 和我之前的認知類似.