View previous topic :: View next topic |
Author |
Message |
BlackLodge Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 16 May 2004 Posts: 149 Location: TLS
|
Posted: Thu Apr 15, 2021 10:29 pm Post subject: [SOLVED] Stable gentoo kernel in Vortex86DX |
|
|
This is a continuation for this thread.
Vortex86DX is a 486 clone running at MHz. It should run any binary compiled for intel x86, however it does have "some" issues.
I managed to compile a 32 bits gentoo system that boots and runs stable enough to ssh the machine. However, under heavy IO load with the ethernet, or the hard drive, the kernel crash is almost guaranteed. Some examples:
SCP a file:
Code: |
[ 143.638318] invalid opcode: 0000 [#1]
[ 143.640432] CPU: 0 PID: 2361 Comm: sshd Not tainted 5.4.97-gentoo #7
[ 143.640432] EIP: tcp_rcv_established+0x66a/0x670
[ 143.640432] Code: 98 00 00 00 39 c2 0f 89 e4 fd ff ff e9 bb fd ff ff 31 d2 8a 55 f3 89 f0 e8 83 b9 f8 ff e9 48 ff ff ff c1 e0 06 e9 8f fe ff ff <0f> 0b 8d 74 26 00 55 89 e5 53 89 c3 e8 f5 10 00 00 8b 83 e0 02 00
[ 143.640432] EAX: 000005b4 EBX: d91d0680 ECX: 00000014 EDX: 00000014
[ 143.640432] ESI: d9aecc00 EDI: dabb2472 EBP: d9189d28 ESP: d9189d0c
[ 143.640432] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 EFLAGS: 00200292
[ 143.640432] CR0: 80050033 CR2: 0080c000 CR3: 191ea000 CR4: 00000000
[ 143.640432] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 143.640432] DR6: ffffffff DR7: 00000400
[ 143.640432] Call Trace:
[ 143.640432] tcp_v4_do_rcv+0xda/0x120
[ 143.640432] __release_sock+0x81/0xc0
[ 143.640432] release_sock+0x1f/0x70
[ 143.640432] tcp_recvmsg+0x32a/0xde0
[ 143.640432] ? current_time+0x40/0x80
[ 143.640432] inet_recvmsg+0x3e/0xa0
[ 143.640432] ? inet_recvmsg+0x3e/0xa0
[ 143.640432] ? inet_accept+0xd0/0xd0
[ 143.640432] sock_recvmsg+0x49/0x70
[ 143.640432] sock_read_iter+0x7b/0xa0
[ 143.640432] __vfs_read+0x11f/0x1e0
[ 143.640432] vfs_read+0x88/0x120
[ 143.640432] ksys_read+0x59/0xc0
[ 143.640432] sys_read+0x11/0x20
[ 143.640432] do_int80_syscall_32+0x50/0x120
[ 143.640432] entry_INT80_32+0xee/0xee
[ 143.640432] EIP: 0xb7b58d0e
[ 143.640432] Code: ec 10 e8 41 f1 04 00 81 c6 15 c3 0c 00 65 a1 0c 00 00 00 85 c0 75 25 b8 03 00 00 00 8b 5c 24 20 8b 4c 24 24 8b 54 24 28 cd 80 <3d> 00 f0 ff ff 77 4b 83 c4 10 5b 5e 5f c3 8d 74 26 00 e8 9b a1 f9
[ 143.640432] EAX: ffffffda EBX: 00000004 ECX: bf99758c EDX: 00004000
[ 143.640432] ESI: b7c25000 EDI: 013efcf0 EBP: bf99758c ESP: bf997550
[ 143.640432] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00200256
[ 143.640432] Modules linked in:
[ 143.644042] ---[ end trace 0485e970580a8614 ]---
[ 143.644744] EIP: tcp_rcv_established+0x66a/0x670
[ 143.649443] Code: 98 00 00 00 39 c2 0f 89 e4 fd ff ff e9 bb fd ff ff 31 d2 8a 55 f3 89 f0 e8 83 b9 f8 ff e9 48 ff ff ff c1 e0 06 e9 8f fe ff ff <0f> 0b 8d 74 26 00 55 89 e5 53 89 c3 e8 f5 10 00 00 8b 83 e0 02 00
[ 143.656260] EAX: 000005b4 EBX: d91d0680 ECX: 00000014 EDX: 00000014
[ 143.658582] ESI: d9aecc00 EDI: dabb2472 EBP: d9189d28 ESP: d9189d0c
[ 143.660918] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 EFLAGS: 00200292
[ 143.667768] CR0: 80050033 CR2: 0080c000 CR3: 191ea000 CR4: 00000000
[ 143.670090] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 143.676457] DR6: ffffffff DR7: 00000400
[ 170.986522] ------------[ cut here ]-----------
|
emerge --sync:
Code: |
[ 2183.045313] BUG: Bad page state in process cc1 pfn:ffd60455
[ 2183.047497] page:da7e1ab2 refcount:0 mapcount:55935 mapping:00000000 index:0x0
[ 2183.047497] flags: 0x0()
[ 2183.047497] raw: 00000000 00000100 00000122 00000000 00000000 1be2da7e 0000da7e 00000000
[ 2183.047497] page dumped because: nonzero mapcount
[ 2183.047497] Modules linked in:
[ 2183.047497] CPU: 0 PID: 2889 Comm: cc1 Tainted: G D 5.4.97-gentoo #7
[ 2183.047497] Call Trace:
[ 2183.047497] dump_stack+0x16/0x18
[ 2183.047497] bad_page.cold+0x75/0xaa
[ 2183.047497] free_pages_check_bad+0x2d/0x60
[ 2183.047497] free_pcppages_bulk+0x117/0x470
[ 2183.047497] free_unref_page_commit.isra.0+0x7a/0x80
[ 2183.047497] free_unref_page+0x32/0x40
[ 2183.047497] ? filemap_page_mkwrite+0xa0/0xa0
[ 2183.047497] __put_page+0x42/0x50
[ 2183.047497] filemap_map_pages+0x1d7/0x2e0
[ 2183.047497] ? filemap_page_mkwrite+0xa0/0xa0
[ 2183.047497] handle_mm_fault+0x6c3/0x870
[ 2183.047497] __do_page_fault+0x15b/0x410
[ 2183.047497] ? vmalloc_sync_unmappings+0x10/0x10
[ 2183.047497] do_page_fault+0x23/0xe0
[ 2183.047497] ? vmalloc_sync_unmappings+0x10/0x10
[ 2183.047497] common_exception_read_cr2+0x117/0x11c
[ 2183.047497] EIP: 0x8ed2c3b
[ 2183.047497] Code: 01 c3 66 90 66 90 66 90 66 90 66 90 66 90 90 56 ba 1e 00 00 00 53 31 c9 53 8b 74 24 10 eb 15 29 c8 d1 e8 01 c8 89 c3 c1 e3 04 <39> b3 60 ee 4a 09 72 1d 89 c2 89 d0 39 ca 75 e5 c1 e0 04 39 b0 60
[ 2183.047497] EAX: 0000000f EBX: 000000f0 ECX: 00000000 EDX: 0000001e
[ 2183.047497] ESI: 0000000d EDI: bff05484 EBP: bff054b8 ESP: bff05350
[ 2183.047497] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000206
[ 2183.047497] ? vmalloc_sync_unmappings+0x10/0x10
[ 2183.050496] BUG: unable to handle page fault for address: ffff1be0
[ 2183.054421] #PF: supervisor read access in kernel mode
[ 2183.054421] #PF: error_code(0x0000) - not-present page
[ 2183.054421] *pde = 15ce8067 *pte = 00000000
[ 2183.054421] Oops: 0000 [#2]
[ 2183.054421] CPU: 0 PID: 2889 Comm: cc1 Tainted: G B D 5.4.97-gentoo #7
[ 2183.054421] EIP: xas_load+0x2a/0x50
[ 2183.054421] Code: 55 89 e5 56 53 89 c3 e8 44 ff ff ff 8d 74 26 00 89 c2 83 e2 03 83 fa 02 74 06 5b 5e 5d c3 66 90 3d 00 10 00 00 76 f3 8d 70 fe <8a> 48 fe 38 4b 08 77 e8 8b 53 04 d3 ea 83 e2 3f 8d 44 96 14 8b 00
[ 2183.054421] EAX: ffff1be2 EBX: db9d7e44 ECX: 0000000c EDX: 00000002
[ 2183.054421] ESI: ffff1be0 EDI: dbc00658 EBP: db9d7e3c ESP: db9d7e34
[ 2183.054421] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 EFLAGS: 00000286
[ 2183.054421] CR0: 80050033 CR2: ffff1be0 CR3: 1b8fc000 CR4: 00000000
[ 2183.054421] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 2183.054421] DR6: ffffffff DR7: 00000400
[ 2183.054421] Call Trace:
[ 2183.054421] find_get_entry+0x3e/0x100
[ 2183.054421] pagecache_get_page+0x1a/0x2d0
[ 2183.054421] ? __switch_to_asm+0x27/0x50
[ 2183.054421] filemap_fault+0x6b/0x7d0
[ 2183.054421] ? preempt_schedule_common+0x14/0x20
[ 2183.054421] ? _cond_resched+0x18/0x20
[ 2183.054421] ext4_filemap_fault+0x20/0x30
[ 2183.054421] __do_fault+0x26/0xa0
[ 2183.054421] ? filemap_page_mkwrite+0xa0/0xa0
[ 2183.054421] handle_mm_fault+0x501/0x870
[ 2183.054421] __do_page_fault+0x15b/0x410
[ 2183.054421] ? vmalloc_sync_unmappings+0x10/0x10
[ 2183.054421] do_page_fault+0x23/0xe0
[ 2183.054421] ? vmalloc_sync_unmappings+0x10/0x10
[ 2183.054421] common_exception_read_cr2+0x117/0x11c
[ 2183.054421] EIP: 0x8ed2c3b
[ 2183.054421] Code: 01 c3 66 90 66 90 66 90 66 90 66 90 66 90 90 56 ba 1e 00 00 00 53 31 c9 53 8b 74 24 10 eb 15 29 c8 d1 e8 01 c8 89 c3 c1 e3 04 <39> b3 60 ee 4a 09 72 1d 89 c2 89 d0 39 ca 75 e5 c1 e0 04 39 b0 60
[ 2183.054421] EAX: 0000000f EBX: 000000f0 ECX: 00000000 EDX: 0000001e
[ 2183.054421] ESI: 0000000d EDI: bff05484 EBP: bff054b8 ESP: bff05350
[ 2183.054421] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000206
[ 2183.054421] ? vmalloc_sync_unmappings+0x10/0x10
[ 2183.054421] Modules linked in:
[ 2183.054421] CR2: 00000000ffff1be0
[ 2183.054421] ---[ end trace c16e1a30ced6487f ]---
[ 2183.054421] EIP: vsnprintf+0x383/0x510
[ 2183.054421] Code: ff ff ff e9 d7 fc ff ff 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 90 8b 00 88 03 e9 24 fd ff ff 8d b4 26 00 00 00 00 8b 7d e4 <c6> 47 ff 00 8d 65 f4 5b 5e 5f 5d c3 90 8b 7d 08 31 c0 8a 07 31 d2
[ 2183.054421] EAX: 00000002 EBX: deff0002 ECX: d59d4b77 EDX: 7fffffff
[ 2183.054421] ESI: d59d4b77 EDI: 5efeffff EBP: d9a9fe10 ESP: d9a9fdec
[ 2183.054421] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 EFLAGS: 00000203
[ 2183.054421] CR0: 80050033 CR2: ffff1be0 CR3: 1b8fc000 CR4: 00000000
[ 2183.054421] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 2183.054421] DR6: ffffffff DR7: 00000400
|
And so on.
Some pastebins for information:
Vortex86DX dmesg
kernel config
Any help on stabilizing this board appreciated.
Maybe some kernel debugging / drivers fixing could be involved, so a help with configuring kernel trace appreciated too. I know, RTFM. Will do. ![Smile :)](images/smiles/icon_smile.gif) _________________ Installing gentoo in a Vortex86DX
Kernel: https://forums.gentoo.org/viewtopic-t-1133787.html
CFLAGS, CHOST: https://forums.gentoo.org/viewtopic-t-1130400.html
Last edited by BlackLodge on Mon Apr 19, 2021 8:29 pm; edited 2 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eccerr0r Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 01 Jul 2004 Posts: 9891 Location: almost Mile High in the USA
|
Posted: Thu Apr 15, 2021 11:04 pm Post subject: |
|
|
Looks like you didn't post the dmesg and posted .config twice?
Anyway how did you build your kernel?
It looks like DM&P have their own distribution and I'm not sure if they got their changes incorporated into mainline, or did they?
You getting an invalid opcode indicates that your build toolchain or hardcoded assembly got incorporated into the kernel and the processor is barfing on it... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BlackLodge Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 16 May 2004 Posts: 149 Location: TLS
|
Posted: Fri Apr 16, 2021 10:22 am Post subject: |
|
|
Quote: | Anyway how did you build your kernel? |
I downloaded and installed an i486 stage3 to a Virtualbox VM, then rsynced the result to the Vortex disk. DM&P claims this is a 486 clon, so it should work, no?
Maybe that 's what rufnut was talking here? I read it, find the information useful but didn't find a patch to improve my "installation process".
Corrected the paste bins, here you have .config & dmesg.
Thanks! _________________ Installing gentoo in a Vortex86DX
Kernel: https://forums.gentoo.org/viewtopic-t-1133787.html
CFLAGS, CHOST: https://forums.gentoo.org/viewtopic-t-1130400.html |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eccerr0r Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 01 Jul 2004 Posts: 9891 Location: almost Mile High in the USA
|
Posted: Fri Apr 16, 2021 3:29 pm Post subject: |
|
|
"should" and "does" are two different things...
Seems to be some flakiness in the CPU possibly or handles things like DMA improperly, don't know if there are options to underclock the cpu or not, it may change the behavior. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BlackLodge Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 16 May 2004 Posts: 149 Location: TLS
|
Posted: Mon Apr 19, 2021 8:13 pm Post subject: |
|
|
Quote: | don't know if there are options to underclock the cpu or not, it may change the behavior. |
Well... that worked. I checked in the BIOS and there was a parameter "CPU Speed Setting By", changed it from "Divide By 1" to "Divide By 2", and haven't had a single crash since. I don't understand why, but yup.
I am going to double check the rest of the BIOS, just in case.
Thanks! _________________ Installing gentoo in a Vortex86DX
Kernel: https://forums.gentoo.org/viewtopic-t-1133787.html
CFLAGS, CHOST: https://forums.gentoo.org/viewtopic-t-1130400.html |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Mon Apr 19, 2021 8:30 pm Post subject: |
|
|
BlackLodge,
That runs the CPU more slowly. That gives everything longer to settle before it changes again.
may tell you the CPU design speed. It might only tell the actual CPU speed now.
The only sure way to tell the CPU design speed is from the part number on the top of the CPU.
That's non trivial to look at.
The BIOS will be made to accmodate a range of CPUs, so has settings no you can tell it which CPU is fitted. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BlackLodge Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 16 May 2004 Posts: 149 Location: TLS
|
Posted: Mon Apr 19, 2021 8:53 pm Post subject: |
|
|
Yes you are right, currently:
Code: |
BTPlug ~ $ cat /proc/cpuinfo
processor : 0
vendor_id : Vortex86 SoC
cpu family : 5
model : 2
model name : 05/02
stepping : 2
cpu MHz : 466.646
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu tsc cx8 cpuid
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 933.29
clflush size : 32
cache_alignment : 32
address sizes : 32 bits physical, 32 bits virtual
power management:
|
The "original" speed announced in the BIOS is 933 MHz. I am going to check what is the maximum design speed for this CPU, maybe that value was forced by the board provider.
I am going to ask DM&P for more technical information about the Vortex86DX. I've read somewhere that the speed of the CPU can be controlled with software, hence I am asking myself if governors can help with this issue. Also, the board is SPI and I2C capable (or so it's claimed on their website), but I couldn't find anywhere how to use it. And I would like to add a beautiful LCD to display some info.
Pretty happy anyway. A new mini-server joins my LAN. Lemme check those samba 4 AD tutorials... ![Very Happy :D](images/smiles/icon_biggrin.gif) _________________ Installing gentoo in a Vortex86DX
Kernel: https://forums.gentoo.org/viewtopic-t-1133787.html
CFLAGS, CHOST: https://forums.gentoo.org/viewtopic-t-1130400.html |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Mon Apr 19, 2021 9:48 pm Post subject: |
|
|
This link says
Quote: | Vortex86DX
600 MHz to 1 GHz (2.02 W @ 800 MHz [5]), 16 KB Data + 16 KB Instruction L1 cache, FPU, 512 KB L2 cache, 16-staged pipeline. Can address up to 1 GiB DDR2 RAM[6][7] The PDX-600 is a version of the Vortex86DX that only differs in the number of RS-232 ports (3 instead of 5) and has no I²C and servo controllers, thus targeting more the embedded than the industrial market. Netbooks similar to the Belco 450R use this chip.[8] |
I take that wee snipped to mean that parts were graded for different speeds of operation, or that they could operate at any clock speed in that range.
Startpage.com finds a data sheet from 2008 too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BlackLodge Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 16 May 2004 Posts: 149 Location: TLS
|
Posted: Wed Apr 21, 2021 7:50 am Post subject: |
|
|
Thanks Neddy.
I think I found something interesting too, take a look to the "Programming reference" from their website here.
The CPU speed can be controlled by writing / reading to some register of the Northbridge. I think this is what the BIOS does with the "Divide by X".
I will try this as soon as I have some time. Also, I am thinking about the possibility of writing a little kernel module for using this as a way to dinamically change CPU speed with gobernors, as already said. I find the gap between 933 MHz and 466 MHz too big, I wonder if it is possible to operate in 933 until some condition, then downclock the CPU to prevent crashes. Will see.
D*wn this thing is such a toy. ![Very Happy :D](images/smiles/icon_biggrin.gif) _________________ Installing gentoo in a Vortex86DX
Kernel: https://forums.gentoo.org/viewtopic-t-1133787.html
CFLAGS, CHOST: https://forums.gentoo.org/viewtopic-t-1130400.html |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54834 Location: 56N 3W
|
Posted: Wed Apr 21, 2021 12:48 pm Post subject: |
|
|
BlackLodge,
The hardware data sheet says that the clock speed is set by using some of the MA (memory address) pins.
Clearly that can't be done after reset, as they will be used for addressing memory. :)
Externally to the CPU the clock will be generated by a PLL and that can be set under CPU control ... maybe.
There are 16 different settings for the CPU clock in the datasheet, so I'm surprised that the BIOS only gives a choice of too fast and too slow :)
Computers have always been fun to play with. I started in 1963 :) _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BlackLodge Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Funny_Figure/gruft.gif)
Joined: 16 May 2004 Posts: 149 Location: TLS
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|