Sign up here and you can log into the forum!

kexec hacking

Have a question about devices internals, memory layout, reverse engineering, etc---This is the place for anything so technical that it would cause a n00b's head to 'splode

kexec hacking   

Postby b-rad.cc » Wed Jun 29, 2011 7:12 pm

Just thought I'd throw out this little bit I've been slaving away at for the last few days. Can't get it to fully boot, always ending at the same error...but its close. I might have to further customize the shutdown/reset process and create a small initrd loader.

Code: Select all
# uname -r
2.6.22.19-19-4
#
#
# . /conf/kexec
Starting sys_kexec_load
kexec_load(84000000) = 0
Trying to do kexec!
Shutting down...
Starting new kernel
Will call new kernel at 84000000
Bye ...
...
Linux version 2.6.22.19-19-4--b-rad-especiale (root@deadzone) (gcc version 4.3.2 (Sourcery G++ Lite 4.3-51) ) #35 PREEMPT Wed Jun 29 20:05:22 PDT 2011
<4>Physical map 0xc0000000 to 0x04000000, max remap/kernel size: 0x10000000/0x18000000.
<4>Configured for SMP865x, detected SMP8654 (revision unknown).
<4>Detected CPU/System/DSP Frequencies: 499.50/333.00/333.00MHz
Physical map 0xc0000000 to 0x04000000, max remap/kernel size: 0x10000000/0x18000000.
<4>Configured for SMP865x, detected SMP8654 (revision unknown).
<4>Detected CPU/System/DSP Frequencies: 499.50/333.00/333.00MHz
Configured for SMP865x, detected SMP8654 (revision unknown).
<4>Detected CPU/System/DSP Frequencies: 499.50/333.00/333.00MHz
Detected CPU/System/DSP Frequencies: 499.50/333.00/333.00MHz
prom console registered
SMP86xx Enabled Devices under Linux/XENV 0xcfd0bcbc = 0x001b3efc
PCIHost Ethernet Ethernet1 IR FIP I2CM I2CS USB PCIDev1 PCIDev2 PCIDev3 PCIDev4 SATA SCARD SCARD1
CPU revision is: 0001937c
FPU revision is: 01739300
Determined physical RAM map:
memory: 05000000 @ 04000000 (usable)
User-defined physical RAM map:
memory: 0c800000 @ 04000000 (usable)
Wasting 131072 bytes for tracking 4096 unused pages
Initrd not found or empty - disabling initrd
On node 0 totalpages: 16896
  DMA zone: 33 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 16863 pages, LIFO batch:3
  Normal zone: 0 pages used for memmap
Built 1 zonelists.  Total pages: 16863
Kernel command line: console=ttyS0,115200n8 ip=dhcp mem=200M root=/dev/sigmblockh init=/init panic=10
Primary instruction cache 32kB, 4-way, physically tagged, linesize 32 bytes.
Primary data cache 32kB, 4-way, physically tagged, no aliases, linesize 32 bytes
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Cache parity protection disabled
PID hash table entries: 2048 (order: 11, 8192 bytes)
Using 249.750 MHz high precision timer.
Console: colour dummy device 80x25
console handover: boot [prom0] -> real [ttyS0]
Dentry cache hash table entries: 65536 (order: 4, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 3, 131072 bytes)
Bad page state in process 'swapper'
page:8453dd00 flags:0x00000000 mapping:656b2077 mapcount:170798593 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[<8400fd60>] dump_stack+0x8/0x34
[<840635d8>] bad_page+0x70/0xa8
[<84063740>] __free_pages_ok+0x130/0x5ac
[<8445c174>] free_all_bootmem_core+0x130/0x260
[<84453700>] mem_init+0x40/0x19c
[<84448bf4>] start_kernel+0x23c/0x374

Bad page state in process 'swapper'
page:8453e100 flags:0x00000000 mapping:000029d0 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[<8400fd60>] dump_stack+0x8/0x34
[<840635d8>] bad_page+0x70/0xa8
[<84063740>] __free_pages_ok+0x130/0x5ac
[<8445c174>] free_all_bootmem_core+0x130/0x260
[<84453700>] mem_init+0x40/0x19c
[<84448bf4>] start_kernel+0x23c/0x374

Bad page state in process 'swapper'
page:8453e180 flags:0x00000000 mapping:00000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[<8400fd60>] dump_stack+0x8/0x34
[<840635d8>] bad_page+0x70/0xa8
[<84063740>] __free_pages_ok+0x130/0x5ac
[<8445c174>] free_all_bootmem_core+0x130/0x260
[<84453700>] mem_init+0x40/0x19c
[<84448bf4>] start_kernel+0x23c/0x374

Bad page state in process 'swapper'
page:84540b80 flags:0x72656b20 mapping:0a303030 mapcount:941651042 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[<8400fd60>] dump_stack+0x8/0x34
[<840635d8>] bad_page+0x70/0xa8
[<84063740>] __free_pages_ok+0x130/0x5ac
[<8445c174>] free_all_bootmem_core+0x130/0x260
[<84453700>] mem_init+0x40/0x19c
[<84448bf4>] start_kernel+0x23c/0x374

Bad page state in process 'swapper'
page:84540ba0 flags:0x2e2e3a34 mapping:00000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[<8400fd60>] dump_stack+0x8/0x34
[<840635d8>] bad_page+0x70/0xa8
[<84063740>] __free_pages_ok+0x130/0x5ac
[<8445c174>] free_all_bootmem_core+0x130/0x260
[<84453700>] mem_init+0x40/0x19c
[<84448bf4>] start_kernel+0x23c/0x374

Bad page state in process 'swapper'
page:8455e1a0 flags:0x00002a06 mapping:00000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[<8400fd60>] dump_stack+0x8/0x34
[<840635d8>] bad_page+0x70/0xa8
[<84063740>] __free_pages_ok+0x130/0x5ac
[<8445c174>] free_all_bootmem_core+0x130/0x260
[<84453700>] mem_init+0x40/0x19c
[<84448bf4>] start_kernel+0x23c/0x374

Memory: 198656k/204800k available (3592k kernel code, 6048k reserved, 776k data, 192k init, 0k highmem)
Calibrating delay loop... 332.59 BogoMIPS (lpj=1662976)
Mount-cache hash table entries: 2048
NET: Registered protocol family 16
PCI: Initializing SMP86xx PCI host controller
PCI: Remapped PCI I/O space 0x58000000 to 0xc0000000, size 64 kB
PCI: Remapped PCI config space 0x50000000 to 0xc0018000, size 10 kB
PCI: Configured SMP86xx as PCI slave with 1024MB PCI memory
PCI: Region size is 131072KB
PCI: Map DMA memory 0x04000000-0x10800000 for PCI at 0x48000000
SCSI subsystem initialized
libata version 2.21 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: TANGOX clocksource has been installed.
IP route cache hash table entries: 4096 (order: 0, 16384 bytes)
TCP established hash table entries: 16384 (order: 3, 131072 bytes)
TCP bind hash table entries: 16384 (order: 2, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NTFS driver 2.1.28 [Flags: R/O].
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
tango3dog: Hardware Watchdog Timer for SMP864x/SMP865x 0.1 (def. timeout: 30 sec)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 9) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 10) is a 16550A
loop: module loaded
tangox_enet0: detected phy  at address 0x01
tangox_enet0: Ethernet driver for SMP864x/SMP865x internal MAC core 0: 100Mbps Base at 0x26000
tangox_enet0: mac address 00:90:a9:91:13:22
tangox_enet1: unable to autodetect phy
usbcore: registered new interface driver catc
drivers/net/usb/catc.c: v2.8 CATC EL1210A NetMate USB Ethernet driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
tangox_bmide: bmide support is disabled
k_name=Tangox SATA 0 driver=Tangox SATA 0
SATA version 0x3139302a ID 0x0 is detected
scsi0 : Tangox SATA 0
ata1: SATA max UDMA/133 cmd 0xa0023000 ctl 0xa0023020 bmdma 0xcdcdcdcd irq 49
ata1: SATA link down (SStatus 0 SControl 300)
k_name=Tangox SATA 1 driver=Tangox SATA 1
SATA version 0x3139302a ID 0x0 is detected
scsi1 : Tangox SATA 0
ata2: SATA max UDMA/133 cmd 0xa0023800 ctl 0xa0023820 bmdma 0xcdcdcdcd irq 62
ata2: SATA link down (SStatus 0 SControl 300)
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
USB Universal Host Controller Interface driver v3.0
driver tangox-ehci-hcd, 10 Dec 2004
TangoX USB was initialized.
tangox-ehci-hcd tangox-ehci-hcd: TangoX USB 2.0
tangox-ehci-hcd tangox-ehci-hcd: new USB bus registered, assigned bus number 1
tangox-ehci-hcd tangox-ehci-hcd: irq 48, io mem 0xa0021400
tangox-ehci-hcd tangox-ehci-hcd: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
tangox-ohci-hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
TangoX USB was initialized.
Initializing TangoX USB OHCI Controller Membase=0xa0021500, irq=47
tangox-ohci-hcd tangox-ohci-hcd: USB Host Controller
tangox-ohci-hcd tangox-ohci-hcd: new USB bus registered, assigned bus number 2
tangox-ohci-hcd tangox-ohci-hcd: irq 47, io mem 0xa0021500
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usb 1-1: new high speed USB device using tangox-ehci-hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
ieee80211_crypt: registered algorithm 'NULL'
VFS: Cannot open root device "sigmblockh" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Rebooting in 10 seconds..
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: kexec hacking   

Postby b-rad.cc » Thu Jun 30, 2011 11:56 am

i'm further :mrgreen:

Code: Select all
ieee80211_crypt: registered algorithm 'NULL'
Freeing unused kernel memory: 768k freed
Warning: unable to open an initial console.
sigmablock: no version for "struct_module" found: kernel tainted.
sigmablock: module license 'Proprietary' taints kernel.
sigmablock: No versions for exported symbols. Tainting kernel.

CS 0 vendor id 0x2c.......
CS 0 device id 0xda.......
................................................................................................................................................................................................................................................................

********************** Parition configureations for CS 0 *******************
**** parition 1  offset [0x00000000] + size [0x00080000] = [0x00080000] ****
**** parition 2  offset [0x00080000] + size [0x00040000] = [0x000c0000] ****
**** parition 3  offset [0x000c0000] + size [0x00300000] = [0x003c0000] ****
**** parition 4  offset [0x003c0000] + size [0x00300000] = [0x006c0000] ****
**** parition 5  offset [0x006c0000] + size [0x01000000] = [0x016c0000] ****
**** parition 6  offset [0x016c0000] + size [0x00800000] = [0x01ec0000] ****
**** parition 7  offset [0x01ec0000] + size [0x05a00000] = [0x078c0000] ****
**** parition 8  offset [0x078c0000] + size [0x05a00000] = [0x0d2c0000] ****
**** parition 9  offset [0x0d2c0000] + size [0x00020000] = [0x0d2e0000] ****
**** parition 10  offset [0x0d2e0000] + size [0x00020000] = [0x0d300000] ****
**** parition 11  offset [0x0d300000] + size [0x00020000] = [0x0d320000] ****
chip_index 0 pos 0

CS 1 vendor id 0x00.......
CS 1 device id 0x00.......
nand_probe Error on chip 1 ret code -13
scsi 2:0:0:0: Direct-Access     Kingston DT 101 II        PMAP PQ: 0 ANSI: 0 CCS
sd 2:0:0:0: [sda] 7831552 512-byte hardware sectors (4010 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 03 41 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
sd 2:0:0:0: [sda] 7831552 512-byte hardware sectors (4010 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 03 41 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 2:0:0:0: [sda] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete


all i should have to do now is fix that pesky console :ugeek:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York


Return to WDTV Live

Who is online

Users browsing this forum: No registered users and 3 guests