From: Shakthi K. <gen...@ya...> - 2005-09-15 08:05:28
|
Greetings! I need some help on booting manrix on Intel x86 P4 system. 1. I downloaded manrix from: http://manrix.sf.net/code/ManRiX.tar.gz 2. Extracted it and did make inside mickernel, servers (busmngr, console, fs-io, miscio), soft (libc, cmd, logd, ...) (The mount somehow failed as I didn't do it as root, and I didn't want to use setup.sh either). Using gcc-3.2.3. 3. I created a /boot/manrix directory and copied conmngr, fsiomngr, init, kern, ls and msiciomngr to it. 4. Updated my /boot/grub/menu.lst as follows: title Red Hat Enterprise Linux WS (2.4.21-4.EL) root (hd0,1) kernel /boot/vmlinuz-2.4.21-4.EL ro root=LABEL=/ initrd /boot/initrd-2.4.21-4.EL.img title ManRiX OS root (hd0,1) kernel /boot/manrix/kern module /boot/manrix/conmngr module /boot/manrix/fsiomngr 2 module /boot/manrix/init module /boot/manrix/misciomngr module /boot/manrix/ls 5. When I choose manrix on boot on grub, I get this output and it stops there: Booting 'ManRiX OS' root (hd0,1) Filesystem type is ext2fs, partition type 0x83 kernel /boot/manrix/kern [Multiboot-elf, <0x100000:0xad1c:0x0>, <0x10b000:0x2aa4:0x1a20>, shtab:0x1101e0, entry=0x100000] module /boot/manrix/conmngr [Multiboot module @ 0x114000, 0xc4b5 bytes] ManRix Microkernel Loaded as '/boot/manrix/kern'. Total Memory: 516032k@0x121000, 0x1081f bytes] get_page (); get_page used before memory initialization [Multiboot module @ 0x132000, 0xb017 bytes] module /boot/manrix/misciomngr [Multiboot module @ 0x13e000, 0xc1f7 bytes] module /boot/manrix/ls [Multiboot module @ 0x14b000, 0x9ccc bytes] What is the output that I should get? Do I need to get a console? Can anyone tell me as to what I am doing wrong and how I can get manrix booted? Thanks, SK -- Shakthi Kannan, MS Software Engineer, Specsoft (Hexaware Technologies) [E]: gen...@ya... [M]: (91) 98407-87007 [W]: http://www.shakthimaan.com [L]: Chennai, India __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |
From: Manish R. <reg...@gm...> - 2005-09-15 18:02:28
|
On 9/15/05, Shakthi Kannan <gen...@ya...> wrote:=20 >=20 > Greetings! >=20 > I need some help on booting manrix on Intel x86 P4 > system. >=20 > 1. I downloaded manrix from: >=20 > http://manrix.sf.net/code/ManRiX.tar.gz >=20 > 2. Extracted it and did make inside mickernel, servers > (busmngr, console, fs-io, miscio), soft (libc, cmd, > logd, ...) (The mount somehow failed as I didn't do it > as root, and I didn't want to use setup.sh either). > Using gcc-3.2.3. >=20 > 3. I created a /boot/manrix directory and copied > conmngr, fsiomngr, init, kern, ls and msiciomngr to > it. >=20 > 4. Updated my /boot/grub/menu.lst as follows: >=20 > title Red Hat Enterprise Linux WS (2.4.21-4.EL) > root (hd0,1) > kernel /boot/vmlinuz-2.4.21-4.EL ro root=3DLABEL=3D/ > initrd /boot/initrd-2.4.21-4.EL.img >=20 > title ManRiX OS > root (hd0,1) > kernel /boot/manrix/kern > module /boot/manrix/conmngr > module /boot/manrix/fsiomngr 2 > module /boot/manrix/init > module /boot/manrix/misciomngr > module /boot/manrix/ls Everything is ok upto here. Except that you need not load 'ls'. init=20 executes sh (a very simple shell) and from there you can execute through=20 command prompt. As the matter of fact, the project is still in the primitive stage and=20 contails zillions of bugs. :)=20 5. When I choose manrix on boot on grub, I get this > output and it stops there: >=20 > Booting 'ManRiX OS' > root (hd0,1) > Filesystem type is ext2fs, partition type 0x83 > kernel /boot/manrix/kern > [Multiboot-elf, <0x100000:0xad1c:0x0>, > <0x10b000:0x2aa4:0x1a20>, shtab:0x1101e0, > entry=3D0x100000] > module /boot/manrix/conmngr > [Multiboot module @ 0x114000, 0xc4b5 bytes] > ManRix Microkernel Loaded as '/boot/manrix/kern'. > Total Memory: 516032k@0x121000, 0x1081f bytes] > get_page (); get_page used before memory > initialization > [Multiboot module @ 0x132000, 0xb017 bytes] > module /boot/manrix/misciomngr > [Multiboot module @ 0x13e000, 0xc1f7 bytes] > module /boot/manrix/ls > [Multiboot module @ 0x14b000, 0x9ccc bytes] >> get_page (); get_page used before memory initialization It seems there is some bug in vm/vmpage.c I did not expected it to call get_page before that function (may be through= =20 page fault). Looks like a bug. How much memory do you have? It seems you have >256 ... 512 perhaps. The page table entry is created for= =20 Only first 4MB. You system required more than that for page_page.=20 What is the output that I should get? Do I need to get > a console? >=20 > Can anyone tell me as to what I am doing wrong and how > I can get manrix booted? It seems the problem is with the code itself. give me time to have a=20 closer look....... try on 128MB if possible. regards Manish Regmi |
From: Shakthi K. <gen...@ya...> - 2005-09-15 18:48:58
|
Hi Manish, Thanks for your reply. --- Manish Regmi <reg...@gm...> wrote: > How much memory do you have? > It seems you have >256 ... 512 perhaps. Yes, 512 MB. > try on 128MB if possible. Thanks, SK -- Shakthi Kannan, MS Software Engineer, Specsoft (Hexaware Technologies) [E]: gen...@ya... [M]: (91) 98407-87007 [W]: http://www.shakthimaan.com [L]: Chennai, India __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |
From: Manish R. <reg...@gm...> - 2005-09-16 17:45:57
|
Hi, In manrix, pmap_pre_init() (asm/pmap.c) creates mapping for first 4 MB. The= =20 first 1 MB is unused. grub loads kernel and modules in 1MB+ and the rest (<= =20 3MB) is free to use. The rest of the memory cannot be used unless the memor= y=20 subsystem is initialized properly.=20 ManRiX virtual memory manager keeps information about each page on a=20 structure called "struct page" which is 34 bytes. So just to store per page= =20 structure the system needs 4.25 MB for 512 MB memory. Your system tried to use memory >4MB. so, you got page fault. The page faul= t=20 handler tried to create a mapping but the the memory subsystem was not=20 initialized. so the system paniced and halted.=20 We need to devise a workaround for this issue. 1) create additional mapping according to tatal memory.=20 2) ??? replace asm/pmap.c: pmap_pre_init() with this and give a second try. =20 void pmap_pre_init() { extern u8 _text_start[], _end[], _text_end[]; vm_offset_t addr; int i; pde_t *pte, *pte2; pde_t *pde; kernel_map.pdbr =3D (pde_t *) get_next_frame(); pte =3D (pde_t *) get_next_frame(); pde =3D kernel_map.pdbr; for(i=3D0 ; i < NTABLES ; i++) kernel_map.pdbr[i] =3D 0; /* we initialize one page directory entries only. It is * enough to hold 4 MB memory. */ pde[KTABLE_START] =3D (addr_to_pte((vm_offset_t)pte)) | PAGE_PRESENT |=20 PAGE_RW; /* * create mapping for more memory. Needed if the system has more * physical memory than 256MB. Used for per page structure if it exceeds 4mb= =20 limit. */ if(ending_mem >=3D 0x10000000) { pte2 =3D (pde_t *) get_next_frame(); pde[KTABLE_START + 1] =3D (addr_to_pte((vm_offset_t)pte2)) | PAGE_PRESENT |= =20 PAGE_RW; } /* temp mapping only */ pde[0] =3D (addr_to_pte((vm_offset_t)pte)) | PAGE_PRESENT | PAGE_RW ; for(i =3D 0 ; i < NTABLES ; i++) { addr =3D i*PAGE_SIZE ; if (addr >=3D 0xa0000 && addr <=3D 0xbffff) pte[i] =3D (addr_to_pte(addr)) | PAGE_PRESENT | PAGE_RW ; if((addr >=3D (vm_offset_t)_text_start) && (addr <=3D (vm_offset_t)_end)) { if((addr >=3D (vm_offset_t)_text_start) && (addr <=3D (vm_offset_t)_text_en= d)) pte[i] =3D (addr_to_pte(addr)) | PAGE_PRESENT|PAGE_RW; else pte[i] =3D (addr_to_pte(addr)) | PAGE_PRESENT | PAGE_RW; } else if((addr >=3D (vm_offset_t)pte) && (addr <=3D ((vm_offset_t)pte +=20 PAGE_SIZE))) pte[i] =3D (addr_to_pte(addr)) | PAGE_PRESENT | PAGE_RW ; else if((addr >=3D (vm_offset_t)pde) && (addr <=3D ((vm_offset_t)pde +=20 PAGE_SIZE))) pte[i] =3D (addr_to_pte(addr)) | PAGE_PRESENT | PAGE_RW ; else pte[i] =3D 0 /*(addr_to_pte(addr)) | PAGE_PRESENT | PAGE_RW */; } invlpg((void *)addr); list_init(&pmap_object.page); pmap_object.size =3D ending_mem - starting_mem; } Regards=20 Manish Regmi |
From: Shakthi K. <gen...@ya...> - 2005-09-18 09:45:41
|
Hi, --- Manish Regmi <reg...@gm...> wrote: > replace asm/pmap.c: pmap_pre_init() with this and > give a second try. > > void pmap_pre_init() > { > extern u8 _text_start[], _end[], _text_end[]; > vm_offset_t addr; I tried this patch. Output is as follows: Booting 'ManRiX OS' root (hd0,1) Filesystem type is ext2fs, partition type 0x83 kernel /boot/manrix/kern [Multiboot-elf, <0x100000:0xad1c:0x0>, <0x10b000:0x2aa4:0x1a20>, shtab:0x1101e0, entry=0x100000] module /boot/manrix/conmngr [Multiboot module @ 0x114000, 0xc4b5 bytes] ManRix Microkernel Loaded as '/boot/manrix/kern'. Total Memory: 523648k @ 0x122 000, 0x106fb bytes thr 10c000 CPU Speed 1393867 MHz 16:22:10 17/9/2005 entry 100000 size d000 end 10d000 entry 100000 size 11000 end 111000 entry 100000 size b000 end 10b000 entry 100000 size d000 end 10d00 maintaining /boot/manrix conmngr ENTRY returned NULL Sending SEGV to thread 0 add 63332611db bytes CS: 1B DS: 23 ES: 23SS:23 EIP: 100025 ESP: DFEFFFC3 EBP: DFEFFFFB EDI: AB8F4109 ESI: 3001F8D0 EAX: FF EBI: 63332605 ECX: 33312035 EDX: AB904809 Dequeuing 14 Sig 0 Exit Called by tid0 pid 0 My grub entry for manrix: title ManRiX OS root (hd0,1) kernel /boot/manrix/kern module /boot/manrix/conmngr module /boot/manrix/fsiomngr 2 module /boot/manrix/init module /boot/manrix/misciomngr Regards, SK -- Shakthi Kannan, MS Software Engineer, Specsoft (Hexaware Technologies) [E]: gen...@ya... [M]: (91) 98407-87007 [W]: http://www.shakthimaan.com [L]: Chennai, India __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |
From: Manish R. <reg...@gm...> - 2005-09-18 11:16:20
|
On 9/18/05, Shakthi Kannan <gen...@ya...> wrote:=20 >=20 > root (hd0,1) > Filesystem type is ext2fs, partition type 0x83 > kernel /boot/manrix/kern > [Multiboot-elf, <0x100000:0xad1c:0x0>, > <0x10b000:0x2aa4:0x1a20>, shtab:0x1101e0, > entry=3D0x100000] > module /boot/manrix/conmngr > [Multiboot module @ 0x114000, 0xc4b5 bytes] > ManRix Microkernel Loaded as '/boot/manrix/kern'. > Total Memory: 523648k @ 0x122 000, 0x106fb bytes > thr 10c000 CPU Speed 1393867 MHz 16:22:10 17/9/2005 > entry 100000 size d000 end 10d000 entry 100000 size > 11000 end 111000 entry 100000 size b000 end 10b000 > entry 100000 size d000 end 10d00 maintaining > /boot/manrix conmngr ENTRY returned NULL Sending SEGV > to thread 0 add 63332611db bytes > CS: 1B DS: 23 ES: 23SS:23 > EIP: 100025 ESP: DFEFFFC3 > EBP: DFEFFFFB EDI: AB8F4109 > ESI: 3001F8D0 > EAX: FF EBI: 63332605 ECX: 33312035 > EDX: AB904809 > Dequeuing 14 Sig 0 Exit Called by tid0 pid 0 >=20 > My grub entry for manrix: >=20 > title ManRiX OS > root (hd0,1) > kernel /boot/manrix/kern > module /boot/manrix/conmngr > module /boot/manrix/fsiomngr 2 > module /boot/manrix/init > module /boot/manrix/misciomngr try removing misciomngr.=20 I will post latest codes in a day. A hint for debugging is create the disassembly of the application that=20 caused the fault (identified by pid see bootup.c).=20 objdump -D appname > my.dmp see the address where fault occured.... cs=3D1b ds=3D23 means it is user mode app. regards Manish Regmi |