I am trying to load in memory some test program (smth like hello world) that will be running on AP.
For this did next:
1. turn off SMP in linux kernel
2. wrote code in userspace that map address from low memory (0x8000) and trying to load there test program ( currently just one arbitrary byte, for this i am using next: https://github.com/izard/RTBench/tree/m ... tal/phymem ).
When I wrote something to 0x8000, I am getting corruption:
Code: Select all
29879.549297] mac_hid i2c_piix4 vboxguest parport_pc ppdev lp parport autofs4 hid_generic usbhid hid psmouse ahci libahci fjes video e1000 pata_acpi [last unloaded: resmem]
[29879.549347] CPU: 0 PID: 16682 Comm: kworker/0:1 Tainted: G OE 4.4.0-72-generic #93-Ubuntu
[29879.549351] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[29879.549360] Workqueue: events check_corruption
[29879.549366] 0000000000000286 00000000fc8f8723 ffff880008027d20 ffffffff813f82b3
[29879.549374] ffff880008027d68 ffffffff81caffd0 ffff880008027d58 ffffffff81081302
[29879.549381] 0000000000000000 ffff880000010000 ffffffff821031f0 0000000000000001
[29879.549389] Call Trace:
[29879.549400] [<ffffffff813f82b3>] dump_stack+0x63/0x90
[29879.549409] [<ffffffff81081302>] warn_slowpath_common+0x82/0xc0
[29879.549415] [<ffffffff8108139c>] warn_slowpath_fmt+0x5c/0x80
[29879.549423] [<ffffffff8106541f>] check_for_bios_corruption.part.1+0xaf/0x100
[29879.549430] [<ffffffff81065488>] check_corruption+0x18/0x50
[29879.549438] [<ffffffff8109a555>] process_one_work+0x165/0x480
[29879.549445] [<ffffffff8109a8bb>] worker_thread+0x4b/0x4c0
[29879.549451] [<ffffffff8109a870>] ? process_one_work+0x480/0x480
[29879.549457] [<ffffffff8109a870>] ? process_one_work+0x480/0x480
[29879.549463] [<ffffffff810a0be8>] kthread+0xd8/0xf0
[29879.549469] [<ffffffff810a0b10>] ? kthread_create_on_node+0x1e0/0x1e0
[29879.549479] [<ffffffff8183ca0f>] ret_from_fork+0x3f/0x70
[29879.549484] [<ffffffff810a0b10>] ? kthread_create_on_node+0x1e0/0x1e0
[29879.549489] ---[ end trace fa273c1ab0b0e6b7 ]---
[85440.016782] Corrupted low memory at ffff880000008000 (8000 phys) = 00000001
Code: Select all
test@test-VirtualBox:~/Projects/RTBench/tools/src/baremetal/phymem$ sudo ./phymem.x -p 0x8000 -l 0x1
Physical address : 0x8000
length : 0x1
adjust span size to 4K
Memory locations :
8000: 0000000000
Unmap memory..
test@test-VirtualBox:~/Projects/RTBench/tools/src/baremetal/phymem$ sudo ./phymem.x -p 0x8000 -l 0x1 -w -d 0x1
Physical address : 0x8000
length : 0x1
Memory Write operation
Data : 0x1
adjust span size to 4K
Writing 0x1 to location 0x8000
Unmap memory..
test@test-VirtualBox:~/Projects/RTBench/tools/src/baremetal/phymem$
test@test-VirtualBox:~/Projects/RTBench/tools/src/baremetal/phymem$
test@test-VirtualBox:~/Projects/RTBench/tools/src/baremetal/phymem$ sudo ./phymem.x -p 0x8000 -l 0x1
Physical address : 0x8000
length : 0x1
adjust span size to 4K
Memory locations :
8000: 0x00000001
Unmap memory..
test@test-VirtualBox:~/Projects/RTBench/tools/src/baremetal/phymem$ sudo ./phymem.x -p 0x8000 -l 0x1
Physical address : 0x8000
length : 0x1
adjust span size to 4K
Memory locations :
8000: 0000000000
Unmap memory..
And another one problem.
When I am trying to set memmap=0x80M$0x18000000 in Linux kernel command line than kernel does not load. Anyone get same problem?
With best,
coldfire