/r/arm

Photograph via snooOG

Please make sure you read our RULES before posting.

Check out some of our friends:

/r/arm

9,271 Subscribers

2

Arm branch prediction hardware is FUBAR

Hi,

I've got software that can easily set the condition code 14 cycles before each and every conditional branch instruction. There doesn't seem to be any mechanism in the branch prediction hardware that attempts to verify that the condition code that is set at the time the branch instruction is fetched and the time the branch is decoded is, in fact, a 100% predictor of which way the branch will go. This is extremely frustrating, because I have essentially random data, so the branch predictor is mispredicting around 50% of the time, when it has the necessary condition code information in advance to properly predict branches 100% of the time, which would avoid any branch misprediction penalty, whatsoever. I am taking a huge performance hit for this FUBAR behavior in the "branch prediction" hardware.

7 Comments
2025/02/03
14:03 UTC

5

How to extract vmlinux or vmlinuz from an arm7l embedded install?

Greetings.

I am trying to analyze a crash dump core file from an embedded device. I have System . map for the kernel but no vmlinux or vmlinuz file.

/boot is empty. I tried dd'ing mmcblkboot0 and mmcblkboot1 to files but I can't seem to find anything to unpack. The kernel is a 6.5.11 commit and the device boots from a local block device.

Linux localhost 6.5.11-8ae3366-dirty #1 SMP Fri Nov 10 03:01:40 UTC 2023 armv7l GNU/Linux

Cat of /proc/partitions shows:

major minor #blocks name
31 0 65536 mtdblock0
31 1 896 mtdblock1
31 2 128 mtdblock2
31 3 9216 mtdblock3
31 4 45056 mtdblock4
31 5 10240 mtdblock5
31 6 65536 mtdblock6
31 7 896 mtdblock7
31 8 128 mtdblock8
31 9 9216 mtdblock9
31 10 45056 mtdblock10
31 11 10240 mtdblock11
31 12 32768 mtdblock12
179 0 31080448 mmcblk0
179 8 32256 mmcblk0boot0
179 16 32256 mmcblk0boot1

Here is an output from mount.

dev on /dev type devtmpfs (rw,relatime,size=438236k,nr_inodes=109559,mode=755)
sys on /sys type sysfs (rw,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
/dev/mtdblock4 on /run/initramfs/ro type squashfs (ro,relatime,errors=continue)
/dev/mtdblock5 on /run/initramfs/rw type jffs2 (rw,relatime)
cow on / type overlay
(rw,relatime,lowerdir=run/initramfs/ro,upperdir=run/initramfs/rw/cow,workdir=run/initramfs/rw/work)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
cgroup2 on /sys/fs/cgroup type cgroup2
(rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=496604k,nr_inodes=1048576)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)

Given the above, if anyone can tell me how or where I could find or extract a vmlinuz (compressed) or vmlinux file so I can run crash and see why I'm getting core dumps I'd appreciate it. I try running crash with just the core file and System . map file and it doesn't like it, wants vmlinux.

0 Comments
2025/01/31
02:03 UTC

4

Lowest common denominator ARM hardware for a product to support

We're getting requests to support both Windows and Linux "on ARM" (yes, that's a bit vague). Our product is an SDK, and we don't want to just depend on emulation. The following likely contains some dumb/illogical questions; I'm experienced in various hardware, but have never gone near the ARM world. Until now.

So we need to buy some ARM boxes to do the development (which really should just comprise getting it to compile, since we do no I/O of our own). I'm trying to decide what the minimum is, not to be cheap but so we don't fail to support something that's valid but minimal.

From my research, I'm concluding that for WoW, ARMv8 is the minimum (and really Windows 11; in theory 10 can work, but is basically impossible to get). SystemReady seems to be a reasonable requirement, too, though I doubt our product will care much.

For Linux, ARM has been supported for many years, but since we're really only going to add new platform support for 64-bit, I think ARMv8 is the minimum again. Suggested best OS versions welcome; we run at a level where "Linux is Linux" applies--we've never had any issues with a specific distro, beyond the 32-/64-bit distinction.

Do those sound like correct conclusions? Thanks for any insights.

6 Comments
2025/01/21
20:48 UTC

3

Does _start code run on every core of an ARM processor?

I'm trying to decode some assembly that's part of a bare-metal OS tutorial. If I've read it correctly, it checks to see if it's running on core 0 and branches to a parking-loop if not. That implies that the code runs on all cores at startup. Is this correct? If so, does this happen (almost) simultaneously?

1 Comment
2025/01/21
16:57 UTC

0

Wtf ?

2 Comments
2025/01/17
15:02 UTC

4

Your input requested on monetizing a large group of worked AARCH64 student projects

I am the author of this popular free book on AARCH64 assembly language programming. With almost 2700 stars, 130 forks and about 3 dozen watchers, it seems to have been well received and I thank all who have contributed comments, bug reports and questions.

I have now retired so additions to the book might increase with more time available or might not - who knows?

I would like to earn some income from all the work I have invested in this effort but the book is free...

I have about a dozen well conceived student projects with comprehensive specifications as well as solutions. Plus, I can certainly write more.

Can I have your advice on monetizing these?

I know the amount of money won't be huge but every little bit helps an old boomer / gray beard.

Maybe make a udemy series? Your thoughts and ideas are welcomed.

Also, if there's a project suitable for an undergraduate class you'd like to see done, I would welcome that as well.

Thank you

1 Comment
2025/01/15
03:19 UTC

0

Any interesting ML projects on ARM or RPI?

Hi! I am just throwing a random question for future projects. Does anyone know interesting projects leveraging arm64 or RPI? I would appreciate it if you leave any (especially ML). The best one I found is Llamafile

1 Comment
2025/01/15
02:42 UTC

16

"fastest Arm desktop computer in the world" Jeff Geerling re System76 Thelio Astra

"This is the fastest Arm desktop computer in the world. It's the Arm workstation Microsoft wishes they had." ... "Long story short, it gaps every other Arm PC by a huge margin." ... "Maxon must have fixed whatever Cinebench bug was holding this back, because it got a casual 5003. And yes, that's almost three times faster than Apple's fastest Mac Pro, which is the same price as my maxed out Astra. In fact, this is the first time, at least according to HWBot, that any 128-core machine officially benched over 5000." says Jeff Geerling after using System76 Thelio Astra 128 core Ampere Altra Max arm PC with NVIDIA GPU for a couple months.
https://youtu.be/AshDjtlV6go
https://www.jeffgeerling.com/blog/2025/system76-built-fastest-windows-arm-pc

11 Comments
2025/01/04
03:27 UTC

0

Android on laptop: is anyone aware of examples of Android running on an ARM-based laptop (even experiment of PoC status)? (so not ChromeOS, Android).

Android on laptop: is anyone aware of examples of Android running on an ARM-based laptop (even experiment or PoC status)? (so not ChromeOS, Android).

12 Comments
2024/12/31
14:22 UTC

8

ASUS Vivobook S ARM lineup vs M2 Macbooks: what's the catch, or is it just "Apple tax"?

Hello, r/arm!

Both me and my wife have been looking into buying us new laptops and are leaning towards ARM devices because of their superior battery life. This is probably the first time in my life I've even considered buying an Apple product, but I've heard they are really great ARM devices so this is a possibility I was relatively open to up until... well, today.

While looking for models that are for sale where we live we have found that the cheapest option that satisfies our criteria (at least M2 & more than 8 Gb RAM) is and M2 Macbook Air with 16/256 Gb RAM/Storage. It is costly, noticeably more than we were considering originally, but something we could afford if it was really the best option. But having looked out of sheer curiosity on other options being sold, we've become skeptical of that.

For pretty much the same price it is possible to buy an ASUS Vivobook S with 32/1000 Gb RAM/SSD or a lower end model with 16/512 Gb RAM/SSD for only 2/3 of the Macbook price. Both of those come with OLED screens (unlike the Mac), run Windows (which may mean better compatibility, righ?), seem to pack a higher capacity battery and aren't even a lot heavier (1.4 kg vs 1.2 kg). ASUS laptops appear to be _miles_ better than similarly priced Apple products on almost every criteria.

What is the catch here? Is there something ASUS does wrong that warrants their ARM laptops to be so much cheaper? Or is there no catch and an additional 50+% to the price tag is just "Apple tax"?

edit: just in case, I want to note that the target use for my wife is web browsing, movies, lightweight games, coding and maybe Photoshop (OS not important). I only consider devices with mainline Linux kernel support for myself, that's an issue of my own, but any feedback from owners, especially from those who have tried multiple devices, is welcome of course. Both of us are looking at a device to use on trips (we do relatively long visits to relatives a few times/year where we work remotely), but not as full daily drives, since at home we have PCs

28 Comments
2024/12/28
20:28 UTC

0

Does Roblox Studio work on arm?

Very specific question but I'm very interested

2 Comments
2024/12/26
10:19 UTC

0

Struggling to find a simple ARM Cortex A development kit

Hi, I'm trying to start to develop on Cortex-A series with linux, u-boot or more embedded systems, but most of the nerds trying to force me to use my Raspberry Pi 5. I have it but it gave up and does not work, and now he's on a life support. Please help me resurrect my Pi 5 or, just tell me a good board for Cortex-A development. I swear if anyone says again "Raspberry pi 5".

6 Comments
2024/12/25
18:24 UTC

1

ARMv9 Unhandled 64-bit el1h sync exception for HVC instruction

I noticed this bug while trying to bring up the Jailhouse hypervisor on an ARMv9 chipset. HVC instruction was not handled properly and the kernel reports error message as follows:

root@demo:~# insmod lkm_example.ko  
[  327.255634] Unhandled 64-bit el1h sync exception on CPU14, ESR 0x000000005a000000 -- HVC (AArch64)
[  327.256000] CPU: 14 PID: 460 Comm: insmod Tainted: G           O       6.1.90 #4
[  327.256279] Hardware name: linux,dummy-virt (DT)
[  327.256534] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  327.256690] pc : lkm_example_init+0x1c/0x1000 [lkm_example]
[  327.257597] lr : lkm_example_init+0x18/0x1000 [lkm_example]
[  327.257721] sp : ffff8000089d3b20
[  327.257775] x29: ffff8000089d3b20 x28: 0000000000000000 x27: ffff8000089d3ce0
[  327.258831] x26: ffff8000089d3c90 x25: ffff8000089d3ce0 x24: ffffcaae92306e58
[  327.259153] x23: ffffcaae4e356058 x22: 0000000000000000 x21: ffff5f40048d0ec0
[  327.259442] x20: ffffcaae4e359000 x19: ffffcaae9261b000 x18: 0000000000000020
[  327.259784] x17: 0000000000000000 x16: ffffcaae9119792c x15: fffffffffffe6550
[  327.260083] x14: 0000000000000002 x13: ffffcaae92293398 x12: 00000000000004a7
[  327.260287] x11: 000000000000018d x10: ffffcaae922eb398 x9 : ffffcaae92293398
[  327.260522] x8 : 00000000ffffefff x7 : ffffcaae922eb398 x6 : 0000000000000000
[  327.260743] x5 : ffff5f402d1d8a18 x4 : ffff5f402d1d8a18 x3 : 0000000000000000
[  327.260958] x2 : 0000000000000000 x1 : ffff5f40048d0ec0 x0 : 000000000000000e
[  327.261406] Kernel panic - not syncing: Unhandled exception
[  327.261554] CPU: 14 PID: 460 Comm: insmod Tainted: G           O       6.1.90 #4
[  327.261684] Hardware name: linux,dummy-virt (DT)
[  327.261809] Call trace:
[  327.261999]  dump_backtrace.part.0+0xdc/0xf0
[  327.262743]  show_stack+0x18/0x30
[  327.262855]  dump_stack_lvl+0x68/0x84
[  327.262951]  dump_stack+0x18/0x34
[  327.263041]  panic+0x184/0x34c
[  327.263134]  arm64_exit_nmi.isra.0+0x0/0x80
[  327.263228]  el1h_64_sync_handler+0x6c/0xe4
[  327.263341]  el1h_64_sync+0x64/0x68
[  327.263480]  lkm_example_init+0x1c/0x1000 [lkm_example]
[  327.263667]  do_one_initcall+0x50/0x1d0
[  327.263758]  do_init_module+0x48/0x1d0
[  327.263850]  load_module+0x18e8/0x1c70
[  327.263939]  __do_sys_finit_module+0xa8/0x100
[  327.264032]  __arm64_sys_finit_module+0x20/0x30
[  327.264131]  invoke_syscall+0x48/0x120
[  327.264226]  el0_svc_common.constprop.0+0x44/0xf4
[  327.264318]  do_el0_svc+0x30/0xd0
[  327.264408]  el0_svc+0x2c/0x84
[  327.264498]  el0t_64_sync_handler+0xbc/0x140
[  327.264589]  el0t_64_sync+0x18c/0x190
[  327.265192] SMP: stopping secondary CPUs
[  327.265959] Kernel Offset: 0x4aae88200000 from 0xffff800008000000
[  327.266031] PHYS_OFFSET: 0xffffa0c040000000
[  327.266093] CPU features: 0x00040,000f00b7,665276af
[  327.266242] Memory Limit: 768 MB
[  327.298676] ---[ end Kernel panic - not syncing: Unhandled exception ]---

But If I simulate the chipset as ARMv8 then everything went well, that is to say

qemu-system-aarch64 ... -cpu cortex-a53 ... [All good]
qemu-system-aarch64 ... -cpu cortex-a710 ...[HVC instruction not handled]

So I suspect this is an ARM issue? What do you think I should do or check to fix this issue? Here is the code I tested with(lkm_example.ko)

static int __init lkm_example_init(void) {
    printk(KERN_INFO "Hello, World!!\n");

#if 1
    __asm__ __volatile__ (
        "hvc #0"  // hvc instruction
        :
        :
        :
    );
#endif
    return 0;
}

static void __exit lkm_example_exit(void) {
    printk(KERN_INFO "Goodbye, World!\n");
}

module_init(lkm_example_init);
module_exit(lkm_example_exit);

PS. I'm using kernel 6.1.90, QEMU 9.2.0

7 Comments
2024/12/24
08:02 UTC

0

Radxa’s latest Armv9 SBC

Does that support Arm CCA, given that they have A720 cores on the board?

0 Comments
2024/12/22
10:28 UTC

0

Realistically, how hard is it to code an arm based os

I know it is a monumentally large task for one person to accomplish but realistically, how long would it take and how hard is it to make an operating system that runs on ARM and is actually useable to some extent, likely coded in Assembly and C using Vulkan for a graphics api.

15 Comments
2024/12/22
08:51 UTC

0

Are there any consumer grade ARM cpus that are not SoC?

Pretty much that. I was looking to see if there are any. Found a thread from this subreddit but it didn't quite answer my question

20 Comments
2024/12/18
14:03 UTC

0

ARM Instructions Freelance Opportunity

Hi, I have a website and looking for freelance/intern who can work on hourly basis for the website to develop the content related and explaining every instruction in Arm Architecture. They have to explain the instruction clearly and define with a short programming example of how it works in the assembly and cpu level in the blog.

DM me if interested.

8 Comments
2024/12/16
07:07 UTC

0

Help Asus snapdragon x elite vivobook s 15 copolot + pc

A month ago , i bought Asus snapdragon x elite vivobook s 15 copolot + pc .. I was curious of everything and doing a lot of things , i was also able to install ubuntu for Asus snapdragon x elite , few days ago i was playing with asus cloud recovery and i started cloud recovery because of slower internet connection it failed and i reboot now it doesnot boot . i am currently using ubuntu os but a lot of things doesnot work . how do i recover it .. microsoft released iso for win11 arm on https://www.microsoft.com/en-us/software-download/windows11arm64 so downloaded it and put in ventoy try to install it doesnot work ...also i made bootable usb by creating boot and install partition mannually doesnot work ///... please help me also cloud recovery doesnot work

0 Comments
2024/12/16
00:15 UTC

0

I need the lightest weight windows 10 iso for arm

Its to install on a phone-

8 Comments
2024/12/05
16:35 UTC

3

ARM + Linux

Do you know any laptop with an ARM core compatible with Ubuntu or any Linux distribution. Lastly I saw an Samsung galaxy book with an snapdragon x elite processor, and I wonder if it is posible to use it with Linux. I like the concept of having an very energy efficient laptop running for hours without charging it. I'm searching for an 14".

Do you know if this duo (linux + arm) is compatible for an laptop?

10 Comments
2024/12/03
19:44 UTC

2

Programming Cortex R5 tutorial

Does anybody know of a good tutorial or example project on how to program a Cortex R5 and interface with an application running on Cortex A53 running Linux? So which compilers to use, startup code, IPC etc. does one use remoteproc and rpmsg? Cheers

0 Comments
2024/12/03
18:45 UTC

2

Need help deciding a job switch

3 Comments
2024/12/02
11:46 UTC

32

TIL of the Coolest Core Arm Ever Designed

I speak of the ARM996HS, an ARM9E-compatible core with no clock. Coordination of pipeline stages is done via a four-phase handshake between successive stages. This allows the core to speed up or slow down with temperature or voltage changes rather than compromise reliability, and enables zero-power WFI, as the core is literally not running. Benchmarks (in the paper) show near-identical performance and area to the most similar clocked core, in a third of the power.

For some inscrutable reason, this was the only clockless core ever developed by Arm, barring some prior academic ventures. Sadly, this seems to be for a legal rather than technical reason: it was a collaboration with another company, and is not mentioned on Arm's developer site. Ultimately, we may never know why we don't have fully passive M0+'s today.

7 Comments
2024/11/30
08:10 UTC

1

New to this

Quick heads up, I don’t know much about ARM.

With that said, I just discovered what ARM is even though it has been out for decades now and I’m intrigued.

I’m currently looking at the top ARM processors and I wanted opinions on a few things: What is the future of ARM chips, what companies are the best at manufacturing them and in what use do you think higher performance ARM chips will be the most revolutionnary?

8 Comments
2024/11/28
21:44 UTC

Back To Top