Commit graph

31 commits

Author SHA1 Message Date
Myles Watson
9d6d811dd1 This patch converts __FUNCTION__ to __func__, since __func__ is standard.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1131 f3766cd6-281f-0410-b1cd-43a5c92072e9
2009-02-12 21:15:34 +00:00
Myles Watson
0fb2a8f081 This patch simplifies the resource allocator by splitting it into distinct
phases.  One benefit of this is that it makes the call chain easier to follow.

device/device.c:
	Remove references to have_resources.
	Remove read_resources from compute allocate resources.
	Split compute_allocate_resources into two
	1. compute_resource_needs
		A. Traverse the tree depth first
		B. Sum resources
		C. Adjust limits and bases
		D. Update bridge resources sizes
	2. assign_resource_values
		A. Traverse the tree breadth first
		B. Assign resource values

device/device_util.c:
	Remove references to have_resources.

device/pci_device.c:
	Remove saved values stubs (they're not needed now.)
		1. Sizing function restores values
	Fix 64-bit flag masking.
	Add an error message for an invalid value.
	Update pci_record_bridge_resource:
		1. remove compute_allocate_resource call
		2. remove pci_set_resource call
	Update pci_bus_read_resources to read children's too.
	Update pci_set_resource:
		1. change logic for setting zero-size resources
			A. Set range to [limit->limit-2^gran]
				(Could have been any range with base > limit)
		2. remove compute_allocate_resource calls
		3. Change phase4_assign_resources ->phase4_set_resources

device/pci_ops.c:
	Change an error message to be more helpful.

device/root_device.c:
	Remove code for read_resources and set resources.
	Add a .id to the ops.

include/device/device.h:
	Remove have_resources.
	Comment out assign_resources.  I think we could comment out more here.
	Add debugging function prototypes.
	Change phase4_assign_resources to phase4_set_resources.

include/device/resource.h
	Add a IORESOURCE_BRIDGE flag.

device/cardbus_device.c
	Remove compute_allocate_resource call.
	Use probe_resource (doesn't die) instead of find_resource.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@1089 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-12-31 19:43:34 +00:00
Myles Watson
981c3652a1 This patch adds some debug functions, cleans up whitespace (per indent), and adds const in a few places.
include/device/path.h
	Make path_eq take const path*.
	
include/device/device.h
	Use const with dev_path, dev_id_string, bus_path, find_dev_path,
	andalloc_find.

device/device.c
	Add functions for tree printing of devs and resources.
	Change %p to more useful info.

device/device_util.c
	Use const changes from device.h.

lib/stage2.c
	Use updated printing functions.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1024 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-11-14 16:15:33 +00:00
Ronald G. Minnich
3eec9e7790 General cleanup and comments for things that should be fixed in future.
Most substantive change is getting rid of 'initialized', which was only
ever needed in v2 due to an implementation mistake.

With Uwe's comments taken into account, 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@961 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-29 04:25:32 +00:00
Uwe Hermann
9b90a6f22b Fix a bunch of Doxygen warnings in v3 (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@951 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-10-23 18:55:01 +00:00
Ronald G. Minnich
99792d89fc Emergency patch for an ancient bug in device_util.c, self-acked:
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: : Ronald G. Minnich <rminnich@gmail.com>
smbus_ops patched
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@758 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-14 00:02:27 +00:00
Carl-Daniel Hailfinger
77010a1111 The named unions in the device tree code are obnoxious and degrade
readability. Move to anonymous unions.

Build tested on all targets. Boot tested on qemu.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Ron tested this and it boots to Linux.
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@730 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-10 00:20:24 +00:00
Ronald G. Minnich
f7ad196c0a This started out as a trivial change and turned into a big change. This
code boots and works on qemu and
alix1c. It represents a huge change and a huge improvement. There are a
few fixes left to do, which 
will come once this is in. 

This change started out easy: get the device IDs OUT of the the dts, and
into one place. We
decided the device IDs should be in the constructors ONLY. To make a
long story short, that just did 
not work out, and it revealed a flaw in the design. The result? 

- no more ids in the various dts files. 
- the constructor struct is gone -- one less struct, nobody liked the
  name anyway
- the device_operations struct now includes the device id.
- constructor property no longer used; use device_operations instead. 
- lpc replaced with ioport

All the changes below stem from this "simple" change. 

I am finding this new structure much easier to work with. I hope we're
done
on this for real, however!

TODO: 
1. Change limitation in dtc that makes it hard to use hex in pci@
notation. 

Now for the bad news. Sometime today, interrupts or io or something
stopped working between r596 and r602 -- but I did no commits at
that point. So something has gone wrong, but I don't think it's this
stuff.

I did try a build of HEAD, and it fails really, really badly. Much
more badly than this fails, so I think this commit is only going
to improve things. It does work fine on qemu, fails on alix1c, 
so I suspect one of today's "clean up commits" broke something. 


Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@603 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-16 04:13:44 +00:00
Ronald G. Minnich
4a6a5313bf The real change here is that paths can now be part of the node label
in dts. This gets rid of the ugly pcipath etc. properties. 

So, instead of

  somedevice {pcipath="1,0";};

We say pci@1,0{ etc. etc. };

As per my agreement I agree to document this in the design doc. 
The alix1c compiles but is untested, and will probably need some work. 
I will do these additional tasks on friday.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by:  Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

M    include/device/path.h
Add LPC path type, replacing SUPERIO path type, since SUPERIO is only
one type of LPC. Clean up tabbing in parts of the file (cosmetic).

M    mainboard/emulation/qemu-x86/dts
Modify this dts for the new path naming scheme.

M    device/pci_device.c
Change what used to be a BIOS_ERR (but is no longer) to a BIOS_NOTICE. 
The change is that the device tree includes more than just PCI devices, 
so finding a non-PCI device is no longer fatal; a notice is useful. 

M    device/device_util.c
Add string creation for PCI_BUS nad LPC.

M    northbridge/intel/i440bxemulation/dts
Add ID info for the chip. 

M    northbridge/intel/i440bxemulation/i440bx.c
Change initialization so it is explicitly for the .ops struct member. 

M    util/dtc/flattree.c
Add support for the new path naming scheme. 
I'm in the middle of this commit so I'll fix the hard-coded lengths 
next commit. 
Also delete dead code between #if 0 and /* and //

M    util/x86emu/vm86.c
comment out unused variables. these may someday be use, not ready
to delete them yet. 

M    Makefile
Change -O2 to -g. We need debugging on LAR far more than we need performance. 



git-svn-id: svn://coreboot.org/repository/coreboot-v3@593 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-13 21:00:20 +00:00
Stefan Reinauer
6220b632e7 Now version 3: LinuxBIOS -> coreboot rename.
- I left LB_TAG_ intact because they are used by the payloads
- file renames are still missing. see next commit
- some lb_ renames might be missing. feel free to provide patches.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@564 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-27 18:54:57 +00:00
Carl-Daniel Hailfinger
68b97a6034 include/device/device.h
Remove old vendor,device struct members since we are now using the
device_id struct. 
Change declaration of dev_find_device to use device_id struct. 

device/device_util.c
Change dev_find_device to use device_id struct instead of vendor, device
parameters.
Add convenience function, dev_find_pci_device, to make it easier for
users. 

device/pci_device.c
Change uses of dev->vendor and dev->device to dev->id. 
Change prints of dev->vendor, dev->device to use the 
dev_id_string function. 

device/pci_rom.c
Change uses of dev->vendor and dev->device to dev->id. 

southbridge/amd/cs5536/cs5536.c
Change uses of dev_find_device to dev_find_pci_device

southbridge/amd/cs5536/dts
Add pciid of the cs5536

northbridge/amd/geodelx/dts
add pciid of the geodelx northbridge. 

util/x86emu/vm86.c
Change uses of dev_find_device to dev_find_pci_device

With these changes, the chipsetinit function now finds the southbridge
in the static tree, which is the first time this has worked in v3.
This success in turn means that the chipsetinit code is running for the
first time. 
We are still failing in "Finding PCI configuration type"

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@558 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-20 23:03:40 +00:00
Carl-Daniel Hailfinger
97722c6e7d Add resource size and resource granularity reporting to device_util.c.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@507 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-10-16 19:29:34 +00:00
Uwe Hermann
d73c7038ba This patch changes all occurences of (working) %Lx to (standards
conformant, working) %llx in printk/printf.
While I'm at it, affected lines with 271 characters can be broken into
smaller chunks.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@479 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-26 12:06:51 +00:00
Stefan Reinauer
0598fd602a This patch removes all printk format warnings from my LBv3 build (Qemu
x86 config). This was tested with gcc 4.1.0 on x86 and gcc 4.2.1 on x86_64.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@466 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-08-11 18:38:24 +00:00
Uwe Hermann
588f740124 Drop the round() function, as it is an exact copy of align_up().
Also, make align_up()/align_down() non-static as they are useful
even outside of device/device_util.c.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@437 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-07-07 19:19:44 +00:00
Stefan Reinauer
6c4d4e2c95 device code cleanup. this is the uncritical part of my device cleanup
patch. Most of it are printk_ cleanup fixes required for the v2->v3 
transition, thus trivial.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@327 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-19 23:55:25 +00:00
Uwe Hermann
71ccb36afc Massive file rename and moving orgy:
- Everything in include/cpu/generic/x86/arch/* goes into
   include/arch/x86 now.

 - include/cpu/generic/x86/div64.h moves into include/arch/x86, too.

 - The former include/cpu/generic/x86/arch/elf.h moved to
   include/arch/x86/archelf.h, as elf.h already exists in include/
   and we must prevent a name clash.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@314 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-05 21:36:52 +00:00
Uwe Hermann
7e752a0631 Move include/console/console.h to include/console.h in order to
get rid of a directory which only contains a single file, and
at the same time simplify the #includes and their hierarchies.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@313 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-05 20:18:28 +00:00
Uwe Hermann
c8e549a3ff Fix a bunch of typos (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@302 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-03 00:20:53 +00:00
Uwe Hermann
31fa35e06a Run indent on all the code in device/ to fix the coding style.
Various additional cosmetic fixes and corrected typos (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@297 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-01 20:52:09 +00:00
Uwe Hermann
78ae9963e4 Sync over the copyright headers from src/device/* in LinuxBIOSv2.
Self-acked as this was already approved in v2.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@285 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-04-22 19:24:15 +00:00
Stefan Reinauer
8a8f3f4836 * fix typos in device_util.c
* drop double error in malloc.c
* add extra CFLAGS to reduce code size by 10%
* add more build time defines and use them in the LB table.

The LB_TAG_COMPILE_TIME is a partly duplicate of LB_TAG_BUILD,
as LB_TAG_BUILD contains both date and time. I left this in for
compatibility reasons.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@268 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-22 00:36:11 +00:00
Stefan Reinauer
0528863e20 This patch reshapes northbridge and southbridge inclusion. It selects
southbridge drivers in Kconfig.

* It includes initial superio code as well, but there is at least one
  error in the pnp_device.c/superio scenario left

* Fixed biosemu.c, vm86.c, pnp_device.c (sort of)

* Enable vm86 instead of x86emu per default for vga init for now. This
  makes VGA in qemu work. There might be a bug in x86emu or the compiler
  I am using. (gcc version 4.1.2 20070115 (prerelease) (SUSE Linux))

* Import isa-dma.c, keyboard.c and i8259.c from v2 /pc80, which was taken
  from LinuxBIOSv1 released from LANL under release LA-CC Number 00-34
  and using parts from the Linux kernel.

This patch makes vga and keyboard work in qemu. Yippie

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@260 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-13 09:31:08 +00:00
Stefan Reinauer
6869f4a129 new device model from Ron
This tree shows the new model. It demonstrates the constructor array
in use, for devices that are and are not specified in the dts. It
introduces a new generic structure, device_id, analogous to
device_path, which can describe all the types of device IDs we have.
It shows a way to set up arrays of structs, in the dts, for the
constructors, so we avoid ldscript hacks.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@233 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-10 15:55:41 +00:00
Ronald G. Minnich
446979be46 This set of changes:
- makes sprintf work, in a re-entrant way
- gets rid of a lot of ugly debug stuff (thanks for the Kconfig log
  level stuff guys!)
- boots like a bat out of hell on qemu :-)

The changes are trivial, I am self-acking. 

To run this under qemu, I do this:

cp LinuxBIOSv3/build/linuxbios.rom bios.bin ;  qemu -nographic -L .
-kernel linux-2.6.15-bochs/vmlinux -hdc hda -hda hda | tee  out 2>&1

here is the output from a run. Note that cpu's still don't have a path
of any kind, and that show_all_devs is not working right. But we're
getting there. I think I'll next try to really boot a linux with a hard
drive, and see how it goes.


LinuxBIOS-3.0.0- Tue Mar  6 18:41:59 MST 2007 starting...
Start search at 0xfffc0000, size 258048
filename is normal/initram
start 0xfffc0000 len 0x3f000
fullname is normal/initram
RAM init code started
Nothing to do.Done ram init code
filename is normal/stage2
start (qemu) 0xfffc0000 len 0x3f000
fullname is normal/initram
fullname is normal/stage2
Phase 1: done
show all devs..
cpus: Unknown device path type: 0
Phase 2: Early setup...
Phase 2: Done.
show all devs..
cpus: Unknown device path type: 0
Phase 3: Enumerating buses...
qemu-x86 enable_dev done
dev_phase3_scan: scanning root(Root Device)
scan_static_bus for root(Root Device)
cpus: Unknown device path type: 0
i440bxemulation_enable_dev: 
i440bxemulation_enable_dev: Done.
dev_phase5: device0_0(PCI: 00:00.0) missing ops
domain0(PCI_DOMAIN: 0000) scanning...
dev_phase3_scan: scanning domain0(PCI_DOMAIN: 0000)
set_pci_ops: dev 00007aa0(device0_0) set ops to 00007220
set_pci_ops: dev 00007d80(dynamic PCI: 00:01.0) set ops to 00007220
set_pci_ops: dev 00008040(dynamic PCI: 00:01.1) set ops to 00007220
set_pci_ops: dev 00008300(dynamic PCI: 00:01.3) set ops to 00007220
set_pci_ops: dev 000085c0(dynamic PCI: 00:02.0) set ops to 00007220
set_pci_ops: dev 00008880(dynamic PCI: 00:03.0) set ops to 00007220
dev_phase3_scan: device0_0: busdevice 00007aa0 enabled 1 ops 00007220
dev_phase3_scan: can not scan from here, returning 0
dev_phase3_scan: dynamic PCI: 00:01.0: busdevice 00007d80 enabled 1 ops 00007220
dev_phase3_scan: can not scan from here, returning 0
dev_phase3_scan: dynamic PCI: 00:01.1: busdevice 00008040 enabled 1 ops 00007220
dev_phase3_scan: can not scan from here, returning 0
dev_phase3_scan: dynamic PCI: 00:01.3: busdevice 00008300 enabled 1 ops 00007220
dev_phase3_scan: can not scan from here, returning 0
dev_phase3_scan: dynamic PCI: 00:02.0: busdevice 000085c0 enabled 1 ops 00007220
dev_phase3_scan: can not scan from here, returning 0
dev_phase3_scan: dynamic PCI: 00:03.0: busdevice 00008880 enabled 1 ops 00007220
dev_phase3_scan: can not scan from here, returning 0
dev_phase3_scan: returning 0
scan_static_bus for root(Root Device) done
dev_phase3_scan: returning 0
Phase 3: Done.
show all devs..
cpus: Unknown device path type: 0
Phase 4: Allocating resources...
Phase 4: Reading resources...
cpus: Unknown device path type: 0
read_resources: cpus() missing phase4_read_resources
cpus: Unknown device path type: 0
read_resources: cpus() missing phase4_read_resources
Phase 4: Done reading resources.
Phase 4: Setting resources...
cpus: Unknown device path type: 0
read_resources: cpus() missing phase4_read_resources
cpus: Unknown device path type: 0
read_resources: cpus() missing phase4_read_resources
ram_resource: add ram resoource 33554432 bytes
Phase 4: Done setting resources.
Phase 4: Done allocating resources.
show all devs..
cpus: Unknown device path type: 0
Phase 5: Enabling resources...
cpus: Unknown device path type: 0
dev_phase5: cpus() missing ops
Phase 5: Done.
show all devs..
cpus: Unknown device path type: 0
Phase 6: Initializing devices...
Phase 6: Devices initialized.
show all devs..
cpus: Unknown device path type: 0
lb_memory_range: start 0x0 size 0x2000000
lb_cleanup_memory_ranges: # entries 1
  #0: base 0x0 size 0x2000000
lb_memory_range: start 0x0 size 0x500
lb_cleanup_memory_ranges: # entries 2
  #0: base 0x500 size 0x1fffb00
  #1: base 0x0 size 0x500
lb_memory_range: start 0xf0000 size 0x0
lb_cleanup_memory_ranges: # entries 4
  #0: base 0x0 size 0x500
  #1: base 0x500 size 0xefb00
  #2: base 0xf0000 size 0x1f10000
  #3: base 0xf0000 size 0x0
show all devs..
cpus: Unknown device path type: 0
Done stage2 code
filename is normal/payload
start 0xfffc0000 len 0x3f000
fullname is normal/initram
fullname is normal/stage2
fullname is normal/payload

Elfboot
set 00100000 to 0 for 137936 bytes
Copy to 00100000 from fffc6ef4 for 30472 bytes
set 00121ae0 to 0 for 72 bytes
Copy to 00121ae0 from fffce614 for 72 bytes
FILO version 0.5 (rminnich@q.ccstar.lanl.gov) Tue Mar  6 18:41:56 MST 2007
collect_sys_info: boot eax = 0xfe
collect_sys_info: boot ebx = 0xffffd444
collect_sys_info: boot arg = 0x1049c0
collect_sys_info: info->memrange 00000000
collect_linuxbios_info: Searching for LinuxBIOS tables...
find_lb_table: Found candidate at: 00000500
find_lb_table: header checksum o.k.
find_lb_table: table checksum o.k.
find_lb_table: record count o.k.
collect_linuxbios_info: collect_linuxbios_info: yes
collect_linuxbios_info: Found LinuxBIOS table at: 00000500
read_lbtable: read_lbtable begin
read_lbtable: lbrec tag 1 LB_TAG_MEMORY 1
convert_memmap: info->memrange 0x107740
convert_memmap: 0x00000000000000 0x000000000005a4 16
convert_memmap: 0x000000000005a4 0x000000000efa5c 1
convert_memmap: 0x000000000f0000 0x00000001f10000 1
convert_memmap: 0x000000000f0000 0x00000000000000 16
read_lbtable: lbrec tag 3 LB_TAG_MEMORY 1
read_lbtable: lbrec tag 4 LB_TAG_MEMORY 1
read_lbtable: read_lbtable end
collect_linuxbios_info: collect_linuxbios_info: done
collect_sys_info: after collect info->memrange 00107740
collect_sys_info: 00000000000005a4-00000000000f0000
collect_sys_info: 00000000000f0000-0000000002000000
collect_sys_info: RAM 32 MB
relocate: virt_offset is 0
relocate: Current location: 0x100000-0x121b27
relocate: Relocating to 0x1fde4d0-0x1fffff7... ok
setup_timers: CPU 599 MHz
Press <Enter> for default boot, or <Esc> for boot prompt... 2 1 timed out
boot: hda:/bzImage console=ttyS0,115200
malloc_diag: alloc: 0 bytes (0 blocks), free: 16376 bytes (1 blocks)
malloc_diag: alloc: 48 bytes (1 blocks), free: 16328 bytes (1 blocks)
malloc_diag: alloc: 64 bytes (2 blocks), free: 16312 bytes (1 blocks)
file_open: dev=hda, path=/bzImage
ide_software_reset: Waiting for ide0 to become ready for reset... ok
init_drive: Testing for hda
init_drive: Probing for hda
init_drive: LBA mode, sectors=32768
init_drive: LBA48 mode, sectors=32768
init_drive: Init device params... ok
hda: LBA48 16MB: QEMU HARDDISK                           
Mounted ext2fs
malloc_diag: alloc: 48 bytes (1 blocks), free: 16328 bytes (1 blocks)
elf_load: Not a bootable ELF image
malloc_diag: alloc: 64 bytes (2 blocks), free: 16312 bytes (1 blocks)
file_open: dev=hda, path=/bzImage
devopen: already open
malloc_diag: alloc: 48 bytes (1 blocks), free: 16328 bytes (1 blocks)
Found Linux version 2.6.15-geode (rminnich@q.ccstar.lanl.gov) #36 Sun Mar 4 22:20:47 MST 2007 (protocol 0x204) (loadflags 0x1) bzImage.
init_linux_params: Setting up paramters at 0x90000
set_memory_size: 00000000000005a4 - 00000000000f0000
set_memory_size: 00000000000f0000 - 0000000002000000
set_memory_size: ramtop=0x2000000
set_memory_size: ext_mem_k=31744, alt_mem_k=31744
parse_command_line: original command line: "console=ttyS0,115200"
parse_command_line: kernel command line at 0x91000
parse_command_line: kernel command line (20 bytes): "console=ttyS0,115200"
load_linux_kernel: offset=0x1600 addr=0x100000 size=0x1175e1
Loading kernel... ok
start_linux: eip=0x100000
Jumping to entry point...
Linux version 2.6.15-geode (rminnich@q.ccstar.lanl.gov) (gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)) #36 Sun Mar 4 22:20:47 MST 2007
BIOS-provided physical RAM map:
 BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
 BIOS-e801: 0000000000100000 - 0000000002000000 (usable)
32MB LOWMEM available.
DMI not present.
Allocating PCI resources starting at 10000000 (gap: 02000000:fe000000)
Built 1 zonelists
Kernel command line: console=ttyS0,115200
Initializing CPU#0
PID hash table entries: 256 (order: 8, 4096 bytes)
Detected 1694.987 MHz processor.
Using pit for high-res timesource
Console: colour dummy device 80x25
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 29752k/32768k available (1500k kernel code, 2628k reserved, 502k data, 144k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Mount-cache hash table entries: 512
CPU: L1 I cache: 8K
CPU: L2 cache: 128K
mtrr: v2.0 (20020519)
CPU: Intel Pentium II (Klamath) stepping 03
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
Checking for popad bug... OK.
NET: Registered protocol family 16
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI quirk: region b100-b10f claimed by PIIX4 SMB
PCI: Ignore bogus resource 6 [0:0] of 0000:00:02.0
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
PCI: PIIX3: Enabling Passive Release on 0000:00:01.0
Limiting direct PCI/PCI transfers.
Activating ISA DMA hang workarounds.
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
e100: Intel(R) PRO/100 Network Driver, 3.4.14-k4-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX3: IDE controller at PCI slot 0000:00:01.1
PIIX3: chipset revision 0
PIIX3: not 100% native mode: will probe irqs later
PIIX3: neither IDE port enabled (BIOS)
hda: QEMU HARDDISK, ATA DISK drive
hdc: QEMU HARDDISK, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 1024KiB
hda: 32768 sectors (16 MB) w/256KiB Cache, CHS=32/255/63
hda: set_multmode: status=0x41 { DriveReady Error }
hda: set_multmode: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xef
hda: cache flushes supported
 hda: hda1
hdc: max request size: 1024KiB
hdc: 32768 sectors (16 MB) w/256KiB Cache, CHS=32/255/63
hdc: set_multmode: status=0x41 { DriveReady Error }
hdc: set_multmode: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xef
hdc: cache flushes supported
 hdc: hdc1
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
input: AT Raw Set 2 keyboard as /class/input/input0
input: ImExPS/2 Generic Explorer Mouse as /class/input/input1
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
VFS: Cannot open root device "<NULL>" or unknown-block(3,2)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2)
 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@207 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-07 00:53:40 +00:00
Ronald G. Minnich
44c092f57d With the current set of changes, bochs bios sees the right amount of
memory. qemu does not, which is odd. 

in bochs, we get this. 

find_lb_table: header test: L I I O
find_lb_table: Found candidate at: 00000500
find_lb_table: header checksum o.k.
find_lb_table: table checksum o.k.
find_lb_table: record count o.k.
collect_linuxbios_info: collect_linuxbios_info: yes
collect_linuxbios_info: Found LinuxBIOS table at: 00000500
malloc_diag: alloc: 0 bytes (0 blocks), free: 16376 bytes (1 blocks)
malloc_diag: alloc: 72 bytes (1 blocks), free: 16304 bytes (1 blocks)
convert_memmap: 0x00000000000000 0x000000000005a4 16
convert_memmap: 0x000000000005a4 0x000000000efa5c 1
convert_memmap: 0x000000000f0000 0x00000001f10000 1
convert_memmap: 0x000000000f0000 0x00000000000000 16
collect_sys_info: after collect info->memrange 00119418
collect_sys_info: 00000000000005a4-00000000000f0000
collect_sys_info: 00000000000f0000-0000000002000000
collect_sys_info: RAM 32 MB

Some further changes are coming, aimed at making it easier for people to
understand how things fit together. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@185 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-05 03:42:12 +00:00
Ronald G. Minnich
53283b1e36 fix a stupid bug in malloc.
add debug printks. 

make dtc put 'root' as the first_node, instead of making the last node
be the first node .... much happier in linuxbios. 

sprintf is broken ... dammit. I hope someone will fix it. I've got about
another week of full-time I can spend on this and then I go back to part
time. So I'm going to need some help soon.

other fixups, and also, make the dts conform to the needs of the device
tree. So we have a domain0 and a device (0,0) that is the north. 

Mostly things are working, but we're STILL not getting any memory in the
LB tables from the north. The device tree is a bitch. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@175 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-03 00:39:30 +00:00
Ronald G. Minnich
7f949f70f5 This set of changes gets us here.
Phase 1: done
Phase 2: early setup ...
Phase 2: done
Phase 3: Enumerating buses...
qemu-x86 enable_dev done
dev_phase3_scan: scanning Root Device
scan_static_bus for root(Root Device)
cpus: Unknown device path type: 0
cpus() enabled
i440bxemulation_enable_dev: 
i440bxemulation_enable_dev: DONE
northbridge_intel_i440bxemulation() enabled
northbridge_intel_i440bxemulation() scanning...
dev_phase3_scan: scanning 
pci_scan_bus start
PCI: pci_scan_bus for bus 00
PCI: scan devfn 0x0 to 0xff
PCI: devfn 0x0
PCI: pci_scan_bus pci_scan_get_dev returns dev <NULL>

Change dts compiler to emit a new struct member, dtsname, for devices,
so we can get actual useful names for things. 

Several mods and printks added. 

printk(BIOS_SPEW
gives no output for reasons I don't understand. 

Next in line is bringing back v2 support for pci, but not doing it the
way v2 does it. 

note the cpus() printk above. cpus don't have a valid path yet. 

We still need to work out the dts syntax for systems with multiple links
(opteron)

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@163 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-01 09:20:25 +00:00
Ronald G. Minnich
7513bfdb03 Lots of changes here, build broken, but people need to see this.
renamed the phase3 etc. to stuff like phase3_scan, so you can get a
rought idea what it is. The names mean more. 

adding pci_device and, at the same time, showing how we can get rid of
the really ugly stuff that crept in. note you can specify ops in the
dts, which avoids the need for hideous stuff like this:
static void enable_dev(struct device *dev)
{
        /* Set the operations if it is a special bus type */
        if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {
                dev->ops = &pci_domain_ops;
                pci_set_method(dev);
        }
        else if (dev->path.type == DEVICE_PATH_APIC_CLUSTER) {
                dev->ops = &cpu_bus_ops;
        }
}

So that foolishness is gone. 

added delay functions. 

Note that we have include/lib.h, and define all the functions in there,
instead of in lots of fiddly includes. 

Brought back the enable op, once I understood it; renamed it to
something that makes sense. 


I'll be on a plane soon, will continue to work, but at least you can see
what's going on here. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@139 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-02-27 06:02:52 +00:00
Stefan Reinauer
464f4cb19d * initial console entries in Kconfig
* small warnings fixes

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@93 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-02-23 11:33:02 +00:00
Stefan Reinauer
791e590dea * rename devices to device for consistency
* fix malloc.c warnings
* add PCI_BUS_SEGN_BITS to pci.h


Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@92 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-02-23 11:23:37 +00:00
Renamed from devices/device_util.c (Browse further)