Dear linuxbios.
Hello.
I've worked for development of Embedded linux project in my corp.
Following is decription of my projcet.
CPU : VIA C3 800Mhz (EBGA)
Reference Board : VT6015
Northbridge : VT8606 (include S3 twister video core)
Southbridge : VT8231 (include VIA rhine II LAN core)
Bootbios : Linuxbios
OS : linux 2.4.19 ( ramdisk include glibc 2.3.1, busybox 0.60.5 and tinylogin 1.2 )
Now, It works well except hard disk.
I try to boot the kernel in two way.
First, it loads compressed kernel and ramdisk image via network using tftp protocol.
Second, it loads elfImage, generated by 'mkelfImage' via network.
All of them work great. (It means that I can see the prompt '\ '.)
But, when I try to make a file system the harddisk, 'segmentation fault' occurs.
mke2fs and mkreiserfs have same problem.
For find out the cause, I try to make a file system in various method.
1. Buildin Bios + Redhat 8.0 installed harddisk + test harddisk
2. Linuxbios + Redhat 8.0 installed harddisk + test harddisk
3. Linuxbios + Kernel(newly compiled), own ramdisk + test harddisk
After boot, I try to make a file system on test harddisk.
In case 1, It works well. Of course, it must be.
In case 2 and 3, I meet the segmentation fault.
So, I think that this problem caused in Linuxbios.
Maybe, this problem caused by harddisk initialization in linuxbios.
But, there are no harddisk initialization code in linuxbios.
Cound you help me?
Thanks for reading.
Regards,
malas
PS. In addition, memtest86 v3.0 works well without error.
Follwing is ksymoops result & boot messages
--------------------------------------------------------------------------
c02a1af5
*pde = 00015063
Oops: 0002
CPU: 0
EIP: 0010:[<c02a1af5>] Not tainted
EFLAGS: 00010246
eax: 00000000 ebx: c5238000 ecx: 00001000 edx: 00000000
esi: 0806bcd8 edi: c5238000 ebp: c11dc868 esp: c128ff34
ds: 0018 es: 0018 ss: 0018
Process mkreiserfs (pid: 129, stackpage=c128f000)
Stack: 00000000 00001000 00001000 c142f1c4 00000000 00001000 00000000 00000000
019b6000 00000000 c11dc7c0 00000000 00000003 0806bcd8 c11dc82c c11dc7c0
c15b2ba0 c01290df c15b2ba0 0806bcd8 00001000 c15b2bc0 0806bcd8 c15b2ba0
Call Trace: [<c01290df>] [<c0133c65>] [<c0108d43>]
Code: f3 aa 58 59 e9 8f 72 e8 ff b8 f2 ff ff ff 30 d2 e9 a7 a7 e8
>>EIP; c02a1af5 <rwsem_down_failed_common+1175/3050> <=====
Trace; c01290df <generic_file_write+6f/b0>
Trace; c0133c65 <sys_write+85/100>
Trace; c0108d43 <system_call+33/40>
Code; c02a1af5 <rwsem_down_failed_common+1175/3050>
00000000 <_EIP>:
Code; c02a1af5 <rwsem_down_failed_common+1175/3050> <=====
0: f3 aa repz stos %al,%es:(%edi) <=====
Code; c02a1af7 <rwsem_down_failed_common+1177/3050>
2: 58 pop %eax
Code; c02a1af8 <rwsem_down_failed_common+1178/3050>
3: 59 pop %ecx
Code; c02a1af9 <rwsem_down_failed_common+1179/3050>
4: e9 8f 72 e8 ff jmp ffe87298 <_EIP+0xffe87298> c0128d8d <do_generic_file_write+3fd/6e0>
Code; c02a1afe <rwsem_down_failed_common+117e/3050>
9: b8 f2 ff ff ff mov $0xfffffff2,%eax
Code; c02a1b03 <rwsem_down_failed_common+1183/3050>
e: 30 d2 xor %dl,%dl
Code; c02a1b05 <rwsem_down_failed_common+1185/3050>
10: e9 a7 a7 e8 00 jmp e8a7bc <_EIP+0xe8a7bc> c112c2b1 <END_OF_CODE+dc732d/????>
1 warning issued. Results may not be reliable.
--------------------------------------------------------------------------
PDVR_Hx> tftp 01000000 linux.img ==> my own boot bios prompt like PPCboot
PCI: Enabling bus mastering for device 00:90
rhine.c v1.0.0 2000-01-07
IO address 1400 Ethernet Address: 00:02:f1:80:21:00
Analyzing Media type,this will take several seconds........OK
MII Addr. : 0x01
PHYID1 : 0x0101, PHYID2 : 0x8f25
Control : 0x3100, Status : 0x786d
Auto-Nego. Adv. : 0x05e1, Link Partner Adv. : 0x41e1
Linespeed : 100Mbs, Full-duplex
# ServerIP = 192.168.0.41
# ServerMAC = 00:50:fc:3a:46:cd
# TFTP Ready : blocksize/dot = 1432 bytes
# Loading ................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
.....
# TFTP Complete : 0x0010e0b0 bytes at address 0x01000000.
PDVR_Hx> tftp 02000000 ramdisk.img
# ServerIP = 192.168.0.41
# ServerMAC = 00:50:fc:3a:46:cd
# TFTP Ready : blocksize/dot = 1432 bytes
# Loading ................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
........
# TFTP Complete : 0x0010f196 bytes at address 0x02000000.
PDVR_Hx> boot 01000000 02000000
# Checking Image at 0x01000000.
# Image Name: PDVR-H8 Kernel Image
Image Type: Intel x86 Linux Kernel Image (gzip compressed)
Data Size: 1106032 Bytes = 1080 kB = 1 MB
Load Address: 00100000
Entry Point: 00100000
# Verifying Checksum ... OK
# Uncompressing kernel image...
# Checking Image at 0x02000000.
# Image Name: PDVR Ramdisk Image
Image Type: Intel x86 Linux RAMDisk Image (gzip compressed)
Data Size: 1110358 Bytes = 1084 kB = 1 MB
Load Address: 01000000
Entry Point: 01000000
# Verifying Checksum ... OK
# command line - [root=/dev/ram console=ttyS0,115200n8 reboot=b]
# boot kernel
rhine disable ==> turn off the network device to do not receive packet during boot kernel
Linux version 2.4.19-linuxbios_4 (malas@******) (gcc version 3.2) #62 Fri Nov 22 11:34:28 KST 2002
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
BIOS-e820: 00000000000a0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 0000000007800000 (usable)
BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
120MB LOWMEM available.
On node 0 totalpages: 30720
zone(0): 4096 pages.
zone(1): 26624 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram console=ttyS0,115200n8 reboot=b
Initializing CPU#0
Detected 800.047 MHz processor.
Calibrating delay loop... 1595.80 BogoMIPS
Memory: 117456k/122880k available (1244k kernel code, 5040k reserved, 839k data, 224k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
kdb version 2.3 by Scott Lurndal, Keith Owens. Copyright SGI, All Rights Reserved
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 64K (32 bytes/line)
CPU: Centaur VIA Ezra stepping 08
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch(a)atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router VIA [1106/8231] at 00:11.0
PCI: Found IRQ 6 for device 00:12.0
PCI: Found IRQ 7 for device 01:00.0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
Real Time Clock Driver v1.10e
Non-volatile memory driver v1.1
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 89
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8231 (rev 10) IDE UDMA100 controller on pci00:11.1
ide0: BM-DMA at 0x1820-0x1827, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x1828-0x182f, BIOS settings: hdc:pio, hdd:pio
hda: ST380020A, ATA DISK drive
hdb: IBM-DTLA-305040, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=155061/16/63, UDMA(100)
hdb: 80418240 sectors (41174 MB) w/380KiB Cache, CHS=79780/16/63, UDMA(100)
Partition check:
hda: hda1
hdb: hdb1
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
VIA Rhine Farmily Fast Ethernet Adapter Driver Ver. 4.11
Copyright (c) 2002 VIA Technologies, Inc.
PCI: Found IRQ 6 for device 00:12.0
eth0: VIA VT6102 Rhine II Fast Ethernet Adapter
eth0: MAC=00:02:F1:80:21:00 IO=0x1400 Mem=0xc8000000 IRQ=6
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1084k freed
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 224k freed
init started: BusyBox v0.60.5 (2002.11.14-08:59+0000) multi-call binary
------------------------------------------------------------------------
Mounting local file systems: ok
Starting system log daemon: ok
setup network
setting loop back interface
setting network interface
eth0: Link autonegation speed 100M bps full duplex
pdvr_802100 login: root
BusyBox v0.60.5 (2002.11.21-06:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
Welcome to **********
/ # sfdisk -l
Disk /dev/hda: 155061 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 0+ 155060 155061- 78150743+ 83 Linux
/dev/hda2 0 - 0 0 0 Empty
/dev/hda3 0 - 0 0 0 Empty
/dev/hda4 0 - 0 0 0 Empty
Disk /dev/hdb: 79780 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hdb1 0+ 79779 79780- 40209119+ 83 Linux
/dev/hdb2 0 - 0 0 0 Empty
/dev/hdb3 0 - 0 0 0 Empty
/dev/hdb4 0 - 0 0 0 Empty
/ #
/ # mkreiserfs /dev/hdb1
<-------------mkreiserfs, 2002------------->
reiserfsprogs 3.6.4
mkreiserfs: Guessing about desired format..
mkreiserfs: Kernel 2.4.19-linuxbios_4 is running.
Format 3.6 with standard journal
Count of blocks on the device: 10052279
Number of blocks consumed by mkreiserfs formatting process: 8518
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: b6da3cd8-4519-46dc-a339-054a10774b88
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON '/dev/hdb1'!
Continue (y/n):y
Initializing journal - 0%....20%....40%....Unable to handle kernel paging request at virtual address c58bc000
printing eip:
c02a1af5
*pde = 00015063
*pte = 00409700
Oops: 0002
CPU: 0
EIP: 0010:[<c02a1af5>] Not tainted
EFLAGS: 00010246
eax: 00000000 ebx: c5238000 ecx: 00001000 edx: 00000000
esi: 0806bcd8 edi: c5238000 ebp: c11dc868 esp: c128ff34
ds: 0018 es: 0018 ss: 0018
Process mkreiserfs (pid: 129, stackpage=c128f000)
Stack: 00000000 00001000 00001000 c142f1c4 00000000 00001000 00000000 00000000
019b6000 00000000 c11dc7c0 00000000 00000003 0806bcd8 c11dc82c c11dc7c0
c15b2ba0 c01290df c15b2ba0 0806bcd8 00001000 c15b2bc0 0806bcd8 c15b2ba0
Call Trace: [<c01290df>] [<c0133c65>] [<c0108d43>]
Code: f3 aa 58 59 e9 8f 72 e8 ff b8 f2 ff ff ff 30 d2 e9 a7 a7 e8
Segmentation fault
/ #