The hardwaremain become more tidy.
How about the progress about the romcc? I hope I can enable debug info while include all ati support stuff.
Regards
YH
-----邮件原件----- 发件人: ebiederman@lnxi.com [mailto:ebiederman@lnxi.com] 发送时间: 2004年7月7日 21:03 收件人: LinuxBIOS 抄送: YhLu; ron minnich; Stefan Reinauer 主题: Re: CPU refactoring status....
ebiederman@lnxi.com (Eric W. Biederman) writes:
The next big task is to get make the SMP cpu initialization methods normal device tree methods. I have everything ready to do that except I need a good way to get the information in the struct mem_range array by sizeram(). My gut feel is that I want to incorporate the sizeram functionality into the resource allocator,
Moving sizeram into read_resources/set_resources comes out fairly clean, but it did require some grunt work.
That has allowed me to sort out the device tree and have a fairly generic method of initializing cpus. Cpus don't fit into device model methods as nicely as I would like (largely because their methods have to run on the cpu in question). But it does work well enough I can remove the special case from hardwaremain. I still have a special case in the root_device methods but that can be overridden, if necessary.
Because I have restructured where things fall in the device tree. Because I have removed the sizeram call. Because I have refactored x86 cpu handling. Because I have removed the array initial_apic_id.
Every port in the tree is likely to break when I check this code in.
I have the arima/hdama working and I can with a little care fix up the k8 based ports.
I can also likely fixup the recent e7501 forward port from the freebios tree.
However beyond that I don't have testing resources to fix things up so I am looking for some feedback before I break everything.
When in the next week or so is a good time?
Does any one have concerns about this set of changes?
I have attached my current version of hardwaremain below to give a feel of what the changes look like.
Ok now I am off to bed. Before I commit anything I am going to let the code sit a little.
Good Night,
Eric
/* * C Bootstrap code for the LinuxBIOS */
#include <console/console.h> #include <mem.h> #include <version.h> #include <boot/tables.h> #include <device/device.h> #include <device/pci.h> #include <device/chip.h> #include <delay.h> #include <stdlib.h> #include <part/hard_reset.h> #include <boot/elf.h>
void hardwaremain(int boot_complete) { /* the order here is a bit tricky. We don't want to do much of * anything that uses config registers until after PciAllocateResources * since that function also figures out what kind of config strategy * to use (type 1 or type 2). * so we turn on cache, then worry about PCI setup, then do other * things, so that the other work can use the PciRead* and PciWrite* * functions. */ struct lb_memory *lb_mem;
post_code(0x80);
CONFIGURE(CONF_PASS_PRE_CONSOLE);
/* displayinit MUST PRECEDE ALL PRINTK! */ console_init(); post_code(0x39); printk_notice("LinuxBIOS-%s%s %s %s...\n", linuxbios_version, linuxbios_extra_version, linuxbios_build, (boot_complete)?"rebooting":"booting");
post_code(0x40);
/* If we have already booted attempt a hard reboot */ if (boot_complete) { hard_reset(); }
init_timer(); /* needs to be moved into static configuration */
CONFIGURE(CONF_PASS_PRE_PCI);
/* pick how to scan the bus. This is first so we can get at memory size. */ printk_info("Finding PCI configuration type.\n"); pci_set_method(); post_code(0x5f); enumerate_static_devices(); dev_enumerate(); post_code(0x66); /* Now do the real bus. * We round the total ram up a lot for thing like the SISFB, which * shares high memory with the CPU. */ dev_configure(); post_code(0x88);
dev_enable();
dev_initialize(); post_code(0x89);
CONFIGURE(CONF_PASS_POST_PCI);
/* Now that we have collected all of our information * write our configuration tables. */ lb_mem = write_tables();
CONFIGURE(CONF_PASS_PRE_BOOT);
elfboot(lb_mem); }
YhLu YhLu@tyan.com writes:
The hardwaremain become more tidy.
How about the progress about the romcc? I hope I can enable debug info while include all ati support stuff.
The major bug that was causing the core dump is fixed. As far as improving the optimizations things are working well enough it is not killing me at the moment. At this point I feel more urgency for getting the APIs in the freebios2 tree to the point where we can comfortably freeze them.
Thinking about it size is a significant factor so if I can't reduce the about of inlining in romcc we have some structural changes that are needed at least on x86. So that needs to come before a final freeze as well.
YHLu your mailer currently breaks threads, because it does include a references line for older messages. Could see if that can be fixed? It makes it hard to keep all of the pieces of a conversation together.
Eric
Hello,
I'm using Linux BIOS with etherboot-filo. I have a usb stick has a kernel and a usb aware initrd on it. The problem I am having is when I use etherboot-filo to boot off of uba1:/boot/vmlinuz initrd=/boot/initrd root=/dev/sda1 console=tty0 console=ttyS0,115200. I get this: Mounted reiserfs Found Linux version 2.6.6 (daubin@buildserver1) #3 SMP Thu Jul 8 09:25:46 EDT 2004 bzImage. Loading kernel... ok Loading initrd... dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046d9d dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046da1 dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046da9 dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046db1 dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046db9 dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046dc1 dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sector=00046dc9 dma_to_td: can not find td dma_to_td: can not find td dma_to_td: can not find td Disk read error dev_type=3 drive=0 sec
Ultimately I get this invalid image:
ide1 at 0x170-0x177,0x376 on irq 15 ide-floppy driver 0.99.newide mice: PS/2 mouse device common for all mice serio: i8042 AUX port at 0x60,0x64 irq 12 serio: i8042 KBD port at 0x60,0x64 irq 1 md: linear personality registered as nr 1 md: raid0 personality registered as nr 2 md: raid1 personality registered as nr 3 md: raid5 personality registered as nr 4 raid5: measuring checksumming speed generic_sse: 5996.000 MB/sec raid5: using function: generic_sse (5996.000 MB/sec) raid6: int64x1 1656 MB/s raid6: int64x2 2390 MB/s raid6: int64x4 2585 MB/s raid6: int64x8 1750 MB/s raid6: sse2x1 2351 MB/s raid6: sse2x2 3367 MB/s raid6: sse2x4 3578 MB/s raid6: using algorithm sse2x4 (3578 MB/s) md: raid6 personality registered as nr 8 md: multipath personality registered as nr 7 md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27 device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com NET: Registered protocol family 2 IP: routing cache hash table of 2048 buckets, 32Kbytes TCP: Hash tables configured (established 65536 bind 65536) NET: Registered protocol family 1 Bluetooth: L2CAP ver 2.1 Bluetooth: L2CAP socket layer initialized Bluetooth: SCO (Voice Link) ver 0.3 Bluetooth: SCO socket layer initialized Bluetooth: RFCOMM ver 1.2 Bluetooth: RFCOMM socket layer initialized Bluetooth: RFCOMM TTY layer initialized Bluetooth: BNEP (Ethernet Emulation) ver 1.0 Bluetooth: BNEP filters: protocol multicast md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. RAMDISK: Compressed image found at block 0 invalid compressed format (err=2) Root-NFS: No NFS server available, giving up. VFS: Unable to mount root fs via NFS, trying floppy. VFS: Insert root floppy and press ENTER
I've also placed an elf image of the kernel & intird, but it too failed, but it seemed to fail in not even seeing the initrd bundled in the elf. This same elf works fine in etherboot. Any sugestions?
Thanks, Dave
On Thu, 8 Jul 2004, David Aubin wrote:
RAMDISK: Compressed image found at block 0
well if found the image ...
invalid compressed format (err=2)
this is odd. you've got linux up, and it found an image, but it seems busted. Are you certain this initrd is ok? You could try booting the kernel and initrd on a known-good system to make sure the initrd is right.
Do you have the right VFS for the initrd build into the kernel?
ron
This exact same elf boots up fine with etherboot. In fact I have etherboot-filo configured to boot off of the net and it grabs this elf and boots the system well. But when I use USB and this same elf, it gets a crc error during the initrd portion. It loads the kernel fine though.
Dave
On Thu, 2004-07-08 at 17:41, ron minnich wrote:
On Thu, 8 Jul 2004, David Aubin wrote:
RAMDISK: Compressed image found at block 0
well if found the image ...
invalid compressed format (err=2)
this is odd. you've got linux up, and it found an image, but it seems busted. Are you certain this initrd is ok? You could try booting the kernel and initrd on a known-good system to make sure the initrd is right.
Do you have the right VFS for the initrd build into the kernel?
ron