x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Linux on the Jornada 720 - Status

1 2 3 4
ArchiMark Page Icon Posted 2021-10-07 1:50 PM
#
Avatar image of ArchiMark
Subscribers
H/PC Elite

Posts:
698
Location:
Silicon Valley
Status:
Hi,

Sorry for my ignorance, but what is BX ?

Thanks,

Mark
 Top of the page
stingraze Page Icon Posted 2021-10-07 2:19 PM
#
Avatar image of stingraze
Writing Team
H/PC Vanguard

Posts:
2,825
Location:
Japan
Status:
Seems like it has something to do with Thumb code.
I have no idea what it is really, but:

This thread came up after searching.
https://groups.google.com/g/linux.debian.ports.arm/c/lbvmPvA6_2k/m/1...

After skimming, it seems it is a BX instruction emulation for ARMv4 / other ARM.
I'm sure somebody else than me knows much better.

More technical stuff:
https://stackoverflow.com/questions/27084857/what-does-bx-lr-do-in-a...


Edited by stingraze 2021-10-07 2:23 PM
 Top of the page
ntware Page Icon Posted 2021-10-07 7:48 PM
#
Avatar image of ntware
Subscribers
H/PC Elite

Posts:
608
Location:
Florida, US
Status:
BX (and variants) is a type of branch instruction that was added to the ARM hardware ion ARMv4T and ARMv5. Since our beloved Jornada runs on an ARMv4 CPU (StrongARM v1110) this instruction is not present in hardware. Therefore the two options you have are either: 1. emulate the BX instruction on the Linux kernel using other instructions in place that will have the same behavior, or 2. patch BX instruction replacing it with equivalent instructions (that's what I believe Stefan is doing).
 Top of the page
ArchiMark Page Icon Posted 2021-10-07 11:01 PM
#
Avatar image of ArchiMark
Subscribers
H/PC Elite

Posts:
698
Location:
Silicon Valley
Status:
Thanks for the info....

So, is there a benefit in device performance with BX or ?
 Top of the page
ntware Page Icon Posted 2021-10-08 1:21 AM
#
Avatar image of ntware
Subscribers
H/PC Elite

Posts:
608
Location:
Florida, US
Status:
There is benefit for the CPUs that implement it in hardware. In our case, it is actually worse to run software that implement these instructions because our CPU does not have those instructions, so they need to be emulated (which requires a kernel trap - very time consuming) or patched. For our jornadas it would be best if software were compiled without BX instructions, but I don’t think anyone in here wants to recompile the entire Debian/Devuan package base, right?
 Top of the page
ArchiMark Page Icon Posted 2021-10-08 3:13 AM
#
Avatar image of ArchiMark
Subscribers
H/PC Elite

Posts:
698
Location:
Silicon Valley
Status:
Thanks, ntware, for the detailed explanation.

So, I assume the benefit for CPU's is that they perform faster/better?


And yes, I don't want to recompile the entire Debian/Devuan package.....
 Top of the page
_dev-null Page Icon Posted 2021-10-08 11:04 AM
#
Avatar image of _dev-null
Subscribers
Factorite (Elite)

Posts:
175
Location:
Austria
Status:
Hello! Thanks for the explanations.

As mentioned in my first Linux post: The problem is that ARMv4 CPUs like the SA-1110 have no BX instruction, which are only available on newer ARMv4t CPUs. So you can not run any newer userland like Debian armel. So we have to emulate/patch this instruction to be able to run Debian/Devuan. This is ugly - but as ntware wrote, no one would be happy recompiling the whole world for our ARMv4 CPU

The old Kernel always emulated the BX instruction. With the newer Kernel you are able to switch between emulating or patching it.

Regards
Stefan
 Top of the page
ArchiMark Page Icon Posted 2021-10-08 4:05 PM
#
Avatar image of ArchiMark
Subscribers
H/PC Elite

Posts:
698
Location:
Silicon Valley
Status:
Thanks, Stefan.....

Always learn a lot from you, ntware, stingraze, etc....

Keep up the great work!

Best,

Mark
 Top of the page
hpc:factor« View previous thread · H/PC Linux / Unix · View next thread »
1 2 3 4
Jump to forum:
Seconds to generate: 0.125 - Cached queries : 45 - Executed queries : 28
Server Time now is: Tuesday, 26 October 2021 - 18:11