Patchwork HP e-Vectra P2706T support

login
register
about
Submitter Uwe Hermann
Date 2009-10-19 19:46:31
Message ID <20091019194631.GI22827@greenwood>
Download mbox | patch
Permalink /patch/438/
State Accepted
Headers show

Comments

Uwe Hermann - 2009-10-19 19:46:31
On Sun, Oct 18, 2009 at 12:46:40PM +0200, Paweł Stawicki wrote:
> I  already run coreboot on my system.

OK, let's first add a proper target for the board then
(patch attached). We can then improve the code as needed.

Please reply with
  Acked-by: Paweł Stawicki <stawel@gmail.com>
if it builds and boots on your hardware.


> The problem is that my linux started from coreboot
> i very slow (comparing to the original BIOS)

Could be missing cache initialization for the CPU, not sure.
We don't yet enable cache on all CPUs (it's on our TODO list
though).


Uwe.
Paweł Stawicki - 2009-10-20 21:34:16
Acked-by: Paweł Stawicki <stawel@gmail.com>


the patch is working correct.
My linux distribution boots very fast :)
the only problem is that the vga bios is not booting.
I'm  trying  investigate.


2009/10/19 Uwe Hermann <uwe@hermann-uwe.de>

> On Sun, Oct 18, 2009 at 12:46:40PM +0200, Paweł Stawicki wrote:
> > I  already run coreboot on my system.
>
> OK, let's first add a proper target for the board then
> (patch attached). We can then improve the code as needed.
>
> Please reply with
>  Acked-by: Paweł Stawicki <stawel@gmail.com>
> if it builds and boots on your hardware.
>
>
> > The problem is that my linux started from coreboot
> > i very slow (comparing to the original BIOS)
>
> Could be missing cache initialization for the CPU, not sure.
> We don't yet enable cache on all CPUs (it's on our TODO list
> though).
>
>
> Uwe.
> --
> http://www.hermann-uwe.de  | http://www.randomprojects.org
> http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
>
Paweł Stawicki - 2009-10-20 22:56:00
I was able to turn on the vga bios with some little changes:

I added the following lines to the files:
file: coreboot-v2/targets/hp/e_vectra_p2706t/Config.lb
    #vga bios
    pci_rom /tmp/vgabios.rom vendor_id=0x8086 device_id=0x7125
    #ethernet bios
    #pci_rom /tmp/ethbios.rom vendor_id=0x10b7 device_id=0x9200

file: coreboot-v2/src/mainboard/hp/e_vectra_p2706t/Options.lb
    uses CONFIG_VGA_ROM_RUN
    default CONFIG_VGA_ROM_RUN = 1


sorry for this format but the patch not commited,
and it if difficult to me to create a diff.

the vga bios was generated with:
 $ amideco  In0203.rom -x
 $ cp amipci_00.20 /tmp/vgabios.rom

where: In0203.rom is a original BIOS file from hp sites

still, acpi is not working,
i try to find the reason tomorrow.

Paweł


W dniu 20 października 2009 23:34 użytkownik Paweł Stawicki <
stawel@gmail.com> napisał:

> Acked-by: Paweł Stawicki <stawel@gmail.com>
>
>
> the patch is working correct.
> My linux distribution boots very fast :)
> the only problem is that the vga bios is not booting.
> I'm  trying  investigate.
>
>
> 2009/10/19 Uwe Hermann <uwe@hermann-uwe.de>
>
> On Sun, Oct 18, 2009 at 12:46:40PM +0200, Paweł Stawicki wrote:
>> > I  already run coreboot on my system.
>>
>> OK, let's first add a proper target for the board then
>> (patch attached). We can then improve the code as needed.
>>
>> Please reply with
>>  Acked-by: Paweł Stawicki <stawel@gmail.com>
>> if it builds and boots on your hardware.
>>
>>
>> > The problem is that my linux started from coreboot
>> > i very slow (comparing to the original BIOS)
>>
>> Could be missing cache initialization for the CPU, not sure.
>> We don't yet enable cache on all CPUs (it's on our TODO list
>> though).
>>
>>
>> Uwe.
>> --
>> http://www.hermann-uwe.de  | http://www.randomprojects.org
>> http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
>>
>
>
Uwe Hermann - 2009-10-20 22:57:53
On Tue, Oct 20, 2009 at 11:34:16PM +0200, Paweł Stawicki wrote:
> Acked-by: Paweł Stawicki <stawel@gmail.com>
> the patch is working correct.

Thanks, r4820.


> My linux distribution boots very fast :)
> the only problem is that the vga bios is not booting.
> I'm  trying  investigate.

As this is onboard VGA (not a PCI plugin-card) I assume, you need to
add the VGA BIOS image to coreboot.rom.

This can be done by adding a line like this to targets/.../Config.lb:

  pci_rom /tmp/vga.bin vendor_id=0x8086 device_id=0x27a2

(in kconfig it's a bit simpler, but I'm not sure if your board works
fine with kconfig already)

You need to adapt the vga.bin path/filename, and the PCI vendor/device ID
(you can do a test-boot and coreboot will tell you which ID it tries to
find on the serial console).

You can get vga.bin (filename may differ) using the phnxdeco, amideco,
awardeco, or bios_extract utilities.

For PCI graphics cards it's simpler, they should usually work out of the
box, but let us know if that's not the case.

I'll make a superiotool patch for your Super I/O so we can dump the
register contents and fix the Super I/O setup a bit.

Can you tell us how big the ROM chip is in the board (so we can fix the
default Kconfig file)? Also, if you have some time to test all available
hardware components with coreboot let us know the results. It would be
nice if we could make a wiki status page for your board, such as this
one for example:

  http://www.coreboot.org/MSI_MS-6178


Uwe.
Paweł Stawicki - 2009-10-20 23:43:37
2009/10/21 Uwe Hermann <uwe@hermann-uwe.de>

> On Tue, Oct 20, 2009 at 11:34:16PM +0200, Paweł Stawicki wrote:
> > Acked-by: Paweł Stawicki <stawel@gmail.com>
> > the patch is working correct.
>
> Thanks, r4820.
>
>
> > My linux distribution boots very fast :)
> > the only problem is that the vga bios is not booting.
> > I'm  trying  investigate.
>
> As this is onboard VGA (not a PCI plugin-card) I assume, you need to
> add the VGA BIOS image to coreboot.rom.
>
> This can be done by adding a line like this to targets/.../Config.lb:
>
>  pci_rom /tmp/vga.bin vendor_id=0x8086 device_id=0x27a2
>

yes i added this line and it seems that i need also  add:
uses CONFIG_VGA_ROM_RUN
default CONFIG_VGA_ROM_RUN = 1
to the Options.lb file, without this it doesn't work.
I needed  also this patch:
http://www.coreboot.org/pipermail/coreboot/2009-July/050497.html

The console is turning on
when the linux is starting (not at the FILO start)



> (in kconfig it's a bit simpler, but I'm not sure if your board works
> fine with kconfig already)
>
> You need to adapt the vga.bin path/filename, and the PCI vendor/device ID
> (you can do a test-boot and coreboot will tell you which ID it tries to
> find on the serial console).
>
> You can get vga.bin (filename may differ) using the phnxdeco, amideco,
> awardeco, or bios_extract utilities.
>
> For PCI graphics cards it's simpler, they should usually work out of the
> box, but let us know if that's not the case.
>

the e-Vectra has no  additional slots on board , therefor it has only an
onboard vga card.


> I'll make a superiotool patch for your Super I/O so we can dump the
> register contents and fix the Super I/O setup a bit.
>

sounds great.


> Can you tell us how big the ROM chip is in the board (so we can fix the
> default Kconfig file)b?


the bios size is 512KB - really :-)
the vga bios size is 32KB
it has also an ethernet bios inside the bios (size 58880B)



> Also, if you have some time to test all available
> hardware components with coreboot let us know the results. It would be
> nice if we could make a wiki status page for your board, such as this
> one for example:
>
>  http://www.coreboot.org/MSI_MS-6178
>

ok, I will try to make the tests tomorrow.


>
> Uwe.
> --
> http://www.hermann-uwe.de  | http://www.randomprojects.org
> http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
>


Thanks a lot.
Paweł
Uwe Hermann - 2009-10-21 00:37:07
On Wed, Oct 21, 2009 at 12:56:00AM +0200, Paweł Stawicki wrote:
> I was able to turn on the vga bios with some little changes:
> 
> I added the following lines to the files:
> file: coreboot-v2/targets/hp/e_vectra_p2706t/Config.lb
>     #vga bios
>     pci_rom /tmp/vgabios.rom vendor_id=0x8086 device_id=0x7125
>     #ethernet bios
>     #pci_rom /tmp/ethbios.rom vendor_id=0x10b7 device_id=0x9200
> 
> file: coreboot-v2/src/mainboard/hp/e_vectra_p2706t/Options.lb
>     uses CONFIG_VGA_ROM_RUN
>     default CONFIG_VGA_ROM_RUN = 1

Thanks, added to svn (the pci_rom lines are comments only, you have
to enable them).

 
> still, acpi is not working,
> i try to find the reason tomorrow.

Oh, this is easy. There is no ACPI implementation for this board
in coreboot.


Uwe.
Paweł Stawicki - 2009-10-21 21:30:58
2009/10/21 Uwe Hermann <uwe@hermann-uwe.de>

>
>  Also, if you have some time to test all available
> hardware components with coreboot let us know the results. It would be
> nice if we could make a wiki status page for your board, such as this
> one for example:
>
>  http://www.coreboot.org/MSI_MS-6178
>
>
I have tested some (which I know how) hardware components,
if you need some more, tell me how, and I make the tests.

I'm attaching the results.

I have tested the board with 3 CPUs, and 2 RAMs.
the summary are in the summary.txt file.

it seems that my Via C3 processor is not working correct.
I'll try  to find why. (it hasn't worked with my original BIOS, too)


bests regards
Paweł Stawicki
Paweł Stawicki - 2009-10-22 01:16:22
I was able  run my VIA c3 processor :-)

changing the line:
    chip cpu/intel/socket_PGA370        # CPU
to:
    chip cpu/via/model_c3

in Config.lb

but how to turn on intel processors AND via C3 processors ?
Peter Stuge - 2009-10-22 01:50:04
Paweł Stawicki wrote:
> I was able  run my VIA c3 processor :-)

Nice.


> but how to turn on intel processors AND via C3 processors ?

This is the first time it has been done.

The code does not really support more than one CPU "type" at a time.
It would be nice to improve this because the AM2 mainboards can use
both k8 and fam10, but it's not being worked on.


//Peter
Carl-Daniel Hailfinger - 2009-10-22 02:56:58
On 22.10.2009 03:50, Peter Stuge wrote:
> Paweł Stawicki wrote:
>   
>> but how to turn on intel processors AND via C3 processors ?
>>     
>
> This is the first time it has been done.
>
> The code does not really support more than one CPU "type" at a time.
> It would be nice to improve this because the AM2 mainboards can use
> both k8 and fam10, but it's not being worked on.
>   

CAR code for K8/Fam10 autodetects the CPU and issues the right commands
based on autodetection.

Regards,
Carl-Daniel
Peter Stuge - 2009-10-22 05:06:02
Carl-Daniel Hailfinger wrote:
> > The code does not really support more than one CPU "type" at a time.
> 
> CAR code for K8/Fam10 autodetects the CPU and issues the right
> commands based on autodetection.

That's fine, but it's not worth much without actually supporting both
CPU types later on in the binary as well..


//Peter
Stefan Reinauer - 2009-10-22 07:22:45
Peter Stuge wrote:
> Carl-Daniel Hailfinger wrote:
>   
>>> The code does not really support more than one CPU "type" at a time.
>>>       
>> CAR code for K8/Fam10 autodetects the CPU and issues the right
>> commands based on autodetection.
>>     
>
> That's fine, but it's not worth much without actually supporting both
> CPU types later on in the binary as well..
>   
Yes, and no. We used that codeto be able to switch between two
completely different AMD mainboards (different chipsets and different
CPUs) instead of doing normal/fallback. On K8/Fam10 this choice is done
after enabling CAR. So just having unified CAR is worth a whole lot already.

Apart from that, it would be very nice to unify the later K8/Fam10 CPU
code of course. Maybe you want to give it a try?

Stefan
Stefan Reinauer - 2009-10-22 07:32:18
Paweł Stawicki wrote:
>
> I was able  run my VIA c3 processor :-)
>
> changing the line:
>     chip cpu/intel/socket_PGA370        # CPU
> to:
>     chip cpu/via/model_c3
>
> in Config.lb
>
> but how to turn on intel processors AND via C3 processors ?
Instead of the above, you should add the VIA cpu to the PGA370 socket.

right now the Config.lb of that socket looks like this:

config chip.h
object socket_PGA370.o
dir /cpu/intel/model_6xx

You should add another line there:

dir /cpu/via/model_c3

This will enable CPU support code for all model 6xx intel CPUs as well
as VIA C3 CPUs

As a side discussion to all developers: We could move the sockets from
intel/ and amd/ to src/cpu/sockets or some such for those few CPUs that
have a cross vendor compatible socket (right now I think only some old
VIA CPUs have that...) Not sure if it's worth the effort. Flames? Ideas?

Stefan
Stefan Reinauer - 2009-10-22 07:44:21
Peter Stuge wrote:
>> but how to turn on intel processors AND via C3 processors ?
>>     
>
> This is the first time it has been done.
>   
Supporting several CPUs on one socket is not so new though.
> The code does not really support more than one CPU "type" at a time.
>   
Not exactly. All required infrastructure is there and we have been doing
that many, many times. For example
for Core Duo and Core 2 Duo CPUs. The difference here is that the two
CPU types come from different vendor directories, but that shouldn't be
an issue.

Check the cpu_table[] array of each supported CPU and
arch/i386/lib/cpu.c:cpu_initialize()/set_cpu_ops() to learn about the
matching.

> It would be nice to improve this because the AM2 mainboards can use
> both k8 and fam10, but it's not being worked on.
>   
The problem with K8 and Fam10 is not a CPU issue but a northbridge
issue. All CPU specific code can be executed just fine, but in our model
the northbridge is always fixed part of the board and not of the CPU,
which is why it is somewhat hard coded. This is not a problem for
stage2, but only for auto.c. Basically auto.c needs to do know
both/several northbridges and choose which one to use.

Stefan
Paweł Stawicki - 2009-10-22 11:51:14
2009/10/22 Stefan Reinauer <stepan@coresystems.de>

> Instead of the above, you should add the VIA cpu to the PGA370 socket.
>
> right now the Config.lb of that socket looks like this:
>
> config chip.h
> object socket_PGA370.o
> dir /cpu/intel/model_6xx
>
> You should add another line there:
>
> dir /cpu/via/model_c3
>
> This will enable CPU support code for all model 6xx intel CPUs as well
> as VIA C3 CPUs
>

This change seems to work.
Thanks a lot.

Paweł
Myles Watson - 2009-10-22 15:45:03
> dir /cpu/via/model_c3
>
Since this worked for him, is there a reason not to commit the change?


> This will enable CPU support code for all model 6xx intel CPUs as well
> as VIA C3 CPUs
>
> As a side discussion to all developers: We could move the sockets from
> intel/ and amd/ to src/cpu/sockets or some such for those few CPUs that
> have a cross vendor compatible socket (right now I think only some old
> VIA CPUs have that...) Not sure if it's worth the effort. Flames? Ideas?
>
I think we can justify the position that it's still an Intel socket, even if
a VIA CPU fits in it.

Thanks,
Myles
Stefan Reinauer - 2009-10-22 16:16:14
Myles Watson wrote:
>
>     dir /cpu/via/model_c3
>
> Since this worked for him, is there a reason not to commit the change?
No.

>
>     As a side discussion to all developers: We could move the sockets from
>     intel/ and amd/ to src/cpu/sockets or some such for those few CPUs
>     that
>     have a cross vendor compatible socket (right now I think only some old
>     VIA CPUs have that...) Not sure if it's worth the effort. Flames?
>     Ideas?
>
> I think we can justify the position that it's still an Intel socket,
> even if a VIA CPU fits in it.

good plan.

Patch

Add initial support for the HP e-Vectra P2706T.

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

Index: src/mainboard/hp/Kconfig
===================================================================
--- src/mainboard/hp/Kconfig	(Revision 4813)
+++ src/mainboard/hp/Kconfig	(Arbeitskopie)
@@ -3,6 +3,7 @@ 
 	depends on VENDOR_HP
         
 source "src/mainboard/hp/dl145_g3/Kconfig"
+source "src/mainboard/hp/e_vectra_p2706t/Kconfig"
 
 endchoice
 
Index: src/mainboard/hp/e_vectra_p2706t/Kconfig
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/Kconfig	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/Kconfig	(Revision 0)
@@ -0,0 +1,60 @@ 
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+# FIXME: It's a PC87360 actually.
+# FIXME: It's an i810E actually!
+# FIXME: ROM chip size really 512KB?
+config BOARD_HP_E_VECTRA_P2706T
+	bool "e-Vectra P2706T"
+	select ARCH_X86
+	select CPU_INTEL_SOCKET_PGA370
+	select NORTHBRIDGE_INTEL_I82810
+	select SOUTHBRIDGE_INTEL_I82801XX
+	select SUPERIO_NSC_PC87360
+	select HAVE_PIRQ_TABLE
+	select UDELAY_TSC
+	select TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
+	select BOARD_ROMSIZE_KB_512
+
+config MAINBOARD_DIR
+	string
+	default hp/e_vectra_p2706t
+	depends on BOARD_HP_E_VECTRA_P2706T
+
+config MAINBOARD_PART_NUMBER
+	string
+	default "e-Vectra P2706T"
+	depends on BOARD_HP_E_VECTRA_P2706T
+
+config HAVE_OPTION_TABLE
+	bool
+	default n
+	depends on BOARD_HP_E_VECTRA_P2706T
+
+config IRQ_SLOT_COUNT
+	int
+	default 3
+	depends on BOARD_HP_E_VECTRA_P2706T
+
+config VIDEO_MB
+	int
+	default 1
+	depends on BOARD_HP_E_VECTRA_P2706T
+
Index: src/mainboard/hp/e_vectra_p2706t/Config.lb
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/Config.lb	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/Config.lb	(Revision 0)
@@ -0,0 +1,131 @@ 
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+## CONFIG_XIP_ROM_SIZE must be a power of 2.
+default CONFIG_XIP_ROM_SIZE = 64 * 1024
+include /config/nofailovercalculation.lb
+
+arch i386 end
+driver mainboard.o
+if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
+makerule ./failover.E
+	depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ../romcc"
+	action "../romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
+end
+makerule ./failover.inc
+	depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ../romcc"
+	action "../romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
+end
+makerule ./auto.E
+	# depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc"
+	depends	"$(CONFIG_MAINBOARD)/auto.c ../romcc"
+	action	"../romcc -E -mcpu=p2 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
+end
+makerule ./auto.inc
+	# depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc"
+	depends "$(CONFIG_MAINBOARD)/auto.c ../romcc"
+	action	"../romcc    -mcpu=p2 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
+end
+mainboardinit cpu/x86/16bit/entry16.inc
+mainboardinit cpu/x86/32bit/entry32.inc
+ldscript /cpu/x86/16bit/entry16.lds
+ldscript /cpu/x86/32bit/entry32.lds
+if CONFIG_USE_FALLBACK_IMAGE
+	mainboardinit cpu/x86/16bit/reset16.inc
+	ldscript /cpu/x86/16bit/reset16.lds
+else
+	mainboardinit cpu/x86/32bit/reset32.inc
+	ldscript /cpu/x86/32bit/reset32.lds
+end
+mainboardinit arch/i386/lib/cpu_reset.inc
+mainboardinit arch/i386/lib/id.inc
+ldscript /arch/i386/lib/id.lds
+if CONFIG_USE_FALLBACK_IMAGE
+	ldscript /arch/i386/lib/failover.lds
+	mainboardinit ./failover.inc
+end
+mainboardinit cpu/x86/fpu_enable.inc
+mainboardinit ./auto.inc
+mainboardinit cpu/x86/mmx_disable.inc
+dir /pc80
+config chip.h
+
+# TODO: i810E actually!
+chip northbridge/intel/i82810			# Northbridge
+  device apic_cluster 0 on			# APIC cluster
+    chip cpu/intel/socket_PGA370		# CPU
+      device apic 0 on end			# APIC
+    end
+  end
+  device pci_domain 0 on
+    device pci 0.0 on end			# Host bridge
+    chip drivers/pci/onboard			# Onboard VGA
+      device pci 1.0 on end
+      register "rom_address" = "0xfff80000"	# 512 KB image
+    end
+    chip southbridge/intel/i82801xx		# Southbridge
+      register "ide0_enable" = "1"
+      register "ide1_enable" = "1"
+
+      device pci 1e.0 on end			# PCI bridge
+      device pci 1f.0 on			# ISA/LPC bridge
+        # TODO: PC87364 actually!
+        # TODO: Check Super I/O settings and compare to superiotool -d.
+        chip superio/nsc/pc87360		# Super I/O
+          device pnp 2e.0 on			# Floppy
+            io 0x60 = 0x3f0
+            irq 0x70 = 6
+            drq 0x74 = 2
+          end
+          device pnp 2e.1 on			# Parallel port
+            io 0x60 = 0x378
+            irq 0x70 = 7
+            drq 0x74 = 3
+          end
+          device pnp 2e.2 on			# Com2
+            io 0x60 = 0x2f8
+            irq 0x70 = 3
+          end
+          device pnp 2e.3 on			# Com1
+            io 0x60 = 0x3f8
+            irq 0x70 = 4
+          end
+          device pnp 2e.4 off end		# SWC
+          device pnp 2e.5 off end		# PS/2 mouse
+          device pnp 2e.6 on			# PS/2 keyboard
+            io 0x60 = 0x60
+            io 0x62 = 0x64
+            irq 0x70 = 1
+          end
+          device pnp 2e.7 off end		# GPIO
+          device pnp 2e.8 off end		# ACB
+          device pnp 2e.9 off end		# FSCM
+          device pnp 2e.a off end		# WDT
+        end
+      end
+      device pci 1f.1 on end			# IDE
+      device pci 1f.2 on end			# USB
+      device pci 1f.3 on end			# SMBus
+      device pci 1f.5 on end			# AC'97 audio
+      device pci 1f.6 off end			# AC'97 modem (N/A ?)
+    end
+  end
+end
+
Index: src/mainboard/hp/e_vectra_p2706t/devicetree.cb
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/devicetree.cb	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/devicetree.cb	(Revision 0)
@@ -0,0 +1,62 @@ 
+# TODO: i810E actually!
+chip northbridge/intel/i82810			# Northbridge
+  device apic_cluster 0 on			# APIC cluster
+    chip cpu/intel/socket_PGA370		# CPU
+      device apic 0 on end			# APIC
+    end
+  end
+  device pci_domain 0 on
+    device pci 0.0 on end			# Host bridge
+    chip drivers/pci/onboard			# Onboard VGA
+      device pci 1.0 on end
+      register "rom_address" = "0xfff80000"	# 512 KB image
+    end
+    chip southbridge/intel/i82801xx		# Southbridge
+      register "ide0_enable" = "1"
+      register "ide1_enable" = "1"
+
+      device pci 1e.0 on end			# PCI bridge
+      device pci 1f.0 on			# ISA/LPC bridge
+        # TODO: PC87364 actually!
+        # TODO: Check Super I/O settings and compare to superiotool -d.
+        chip superio/nsc/pc87360		# Super I/O
+          device pnp 2e.0 on			# Floppy
+            io 0x60 = 0x3f0
+            irq 0x70 = 6
+            drq 0x74 = 2
+          end
+          device pnp 2e.1 on			# Parallel port
+            io 0x60 = 0x378
+            irq 0x70 = 7
+            drq 0x74 = 3
+          end
+          device pnp 2e.2 on			# Com2
+            io 0x60 = 0x2f8
+            irq 0x70 = 3
+          end
+          device pnp 2e.3 on			# Com1
+            io 0x60 = 0x3f8
+            irq 0x70 = 4
+          end
+          device pnp 2e.4 off end		# SWC
+          device pnp 2e.5 off end		# PS/2 mouse
+          device pnp 2e.6 on			# PS/2 keyboard
+            io 0x60 = 0x60
+            io 0x62 = 0x64
+            irq 0x70 = 1
+          end
+          device pnp 2e.7 off end		# GPIO
+          device pnp 2e.8 off end		# ACB
+          device pnp 2e.9 off end		# FSCM
+          device pnp 2e.a off end		# WDT
+        end
+      end
+      device pci 1f.1 on end			# IDE
+      device pci 1f.2 on end			# USB
+      device pci 1f.3 on end			# SMBus
+      device pci 1f.5 on end			# AC'97 audio
+      device pci 1f.6 off end			# AC'97 modem (N/A ?)
+    end
+  end
+end
+
Index: src/mainboard/hp/e_vectra_p2706t/Makefile.inc
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/Makefile.inc	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/Makefile.inc	(Revision 0)
@@ -0,0 +1,22 @@ 
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+include $(src)/mainboard/Makefile.romccboard.inc
+
Index: src/mainboard/hp/e_vectra_p2706t/irq_tables.c
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/irq_tables.c	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/irq_tables.c	(Revision 0)
@@ -0,0 +1,46 @@ 
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <arch/pirq_routing.h>
+
+const struct irq_routing_table intel_irq_routing_table = {
+	PIRQ_SIGNATURE,
+	PIRQ_VERSION,
+	32 + 16 * CONFIG_IRQ_SLOT_COUNT,/* Max. number of devices on the bus */
+	0x00,			/* Interrupt router bus */
+	(0x1f << 3) | 0x0,	/* Interrupt router device */
+	0x0,			/* IRQs devoted exclusively to PCI usage */
+	0x8086,			/* Vendor */
+	0x2410,			/* Device */
+	0,			/* Crap (miniport) */
+	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */
+	0x59,			/* Checksum */
+	{
+		/* bus,        dev | fn,   {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap},  slot, rfu */
+		{0x00, (0x01 << 3) | 0x0, {{0x60, 0xdeb8}, {0x61, 0xdeb8}, {0x00, 0xdeb8}, {0x00, 0xdeb8}}, 0x0, 0x0},
+		{0x00, (0x1e << 3) | 0x0, {{0x60, 0xdeb8}, {0x61, 0xdeb8}, {0x62, 0xdeb8}, {0x63, 0xdeb8}}, 0x0, 0x0},
+		{0x00, (0x1f << 3) | 0x0, {{0xfe, 0x4000}, {0x61, 0xdeb8}, {0x00, 0x0000}, {0x63, 0xdeb8}}, 0x0, 0x0},
+	}
+};
+
+unsigned long write_pirq_routing_table(unsigned long addr)
+{
+	return copy_pirq_routing_table(addr);
+}
Index: src/mainboard/hp/e_vectra_p2706t/Options.lb
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/Options.lb	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/Options.lb	(Revision 0)
@@ -0,0 +1,99 @@ 
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+uses CONFIG_GENERATE_MP_TABLE
+uses CONFIG_GENERATE_PIRQ_TABLE
+uses CONFIG_USE_FALLBACK_IMAGE
+uses CONFIG_HAVE_FALLBACK_BOOT
+uses CONFIG_HAVE_HARD_RESET
+uses CONFIG_HAVE_OPTION_TABLE
+uses CONFIG_USE_OPTION_TABLE
+uses CONFIG_ROM_PAYLOAD
+uses CONFIG_IRQ_SLOT_COUNT
+uses CONFIG_MAINBOARD
+uses CONFIG_MAINBOARD_VENDOR
+uses CONFIG_MAINBOARD_PART_NUMBER
+uses COREBOOT_EXTRA_VERSION
+uses CONFIG_ARCH
+uses CONFIG_FALLBACK_SIZE
+uses CONFIG_STACK_SIZE
+uses CONFIG_HEAP_SIZE
+uses CONFIG_ROM_SIZE
+uses CONFIG_ROM_SECTION_SIZE
+uses CONFIG_ROM_IMAGE_SIZE
+uses CONFIG_ROM_SECTION_SIZE
+uses CONFIG_ROM_SECTION_OFFSET
+uses CONFIG_COMPRESSED_PAYLOAD_LZMA
+uses CONFIG_PRECOMPRESSED_PAYLOAD
+uses CONFIG_ROMBASE
+uses CONFIG_RAMBASE
+uses CONFIG_XIP_ROM_SIZE
+uses CONFIG_XIP_ROM_BASE
+uses CONFIG_GENERATE_MP_TABLE
+uses CONFIG_CROSS_COMPILE
+uses CC
+uses HOSTCC
+uses CONFIG_OBJCOPY
+uses CONFIG_DEFAULT_CONSOLE_LOGLEVEL
+uses CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
+uses CONFIG_CONSOLE_SERIAL8250
+uses CONFIG_TTYS0_BAUD
+uses CONFIG_TTYS0_BASE
+uses CONFIG_TTYS0_LCS
+uses CONFIG_UDELAY_TSC
+uses CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
+uses CONFIG_CONSOLE_VGA
+uses CONFIG_PCI_ROM_RUN
+uses CONFIG_WRITE_HIGH_TABLES
+uses CONFIG_VIDEO_MB
+
+default CONFIG_ROM_SIZE = 512 * 1024
+default CONFIG_HAVE_FALLBACK_BOOT = 1
+default CONFIG_GENERATE_MP_TABLE = 0
+default CONFIG_HAVE_HARD_RESET = 0
+default CONFIG_GENERATE_PIRQ_TABLE = 1
+default CONFIG_IRQ_SLOT_COUNT = 3
+default CONFIG_MAINBOARD_VENDOR = "HP"
+default CONFIG_MAINBOARD_PART_NUMBER = "e-Vectra P2706T"
+default CONFIG_ROM_IMAGE_SIZE = 64 * 1024
+default CONFIG_FALLBACK_SIZE = CONFIG_ROM_IMAGE_SIZE
+default CONFIG_STACK_SIZE = 8 * 1024
+default CONFIG_HEAP_SIZE = 16 * 1024
+default CONFIG_HAVE_OPTION_TABLE = 0
+#default CONFIG_USE_OPTION_TABLE = !CONFIG_USE_FALLBACK_IMAGE
+default CONFIG_USE_OPTION_TABLE = 0
+default CONFIG_RAMBASE = 0x00004000
+default CONFIG_ROM_PAYLOAD = 1
+default CONFIG_CROSS_COMPILE = ""
+default CC = "$(CONFIG_CROSS_COMPILE)gcc -m32"
+default HOSTCC = "gcc"
+default CONFIG_CONSOLE_SERIAL8250 = 1
+default CONFIG_TTYS0_BAUD = 115200
+default CONFIG_TTYS0_BASE = 0x3f8
+default CONFIG_TTYS0_LCS = 0x3			# 8n1
+default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
+default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
+default CONFIG_UDELAY_TSC = 1
+default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 = 1
+default CONFIG_CONSOLE_VGA = 1
+default CONFIG_PCI_ROM_RUN = 1
+default CONFIG_WRITE_HIGH_TABLES = 1
+default CONFIG_VIDEO_MB = 1
+end
Index: src/mainboard/hp/e_vectra_p2706t/chip.h
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/chip.h	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/chip.h	(Revision 0)
@@ -0,0 +1,24 @@ 
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+extern struct chip_operations mainboard_ops;
+
+struct mainboard_config {
+};
Index: src/mainboard/hp/e_vectra_p2706t/auto.c
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/auto.c	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/auto.c	(Revision 0)
@@ -0,0 +1,67 @@ 
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#define ASSEMBLY 1
+
+#include <stdint.h>
+#include <device/pci_def.h>
+#include <arch/io.h>
+#include <device/pnp_def.h>
+#include <arch/romcc_io.h>
+#include <arch/hlt.h>
+#include <stdlib.h>
+#include "pc80/serial.c"
+#include "arch/i386/lib/console.c"
+#include "lib/ramtest.c"
+/* TODO: It's a PC87364 actually! */
+#include "superio/nsc/pc87360/pc87360_early_serial.c"
+/* TODO: It's i810E actually! */
+#include "northbridge/intel/i82810/raminit.h"
+#include "cpu/x86/mtrr/earlymtrr.c"
+#include "cpu/x86/bist.h"
+#include "southbridge/intel/i82801xx/i82801xx_early_smbus.c"
+#include "pc80/udelay_io.c"
+#include "lib/debug.c"
+#include "northbridge/intel/i82810/raminit.c"
+
+/* TODO: It's a PC87364 actually! */
+#define SERIAL_DEV PNP_DEV(0x2e, PC87360_SP1)
+
+static void main(unsigned long bist)
+{
+	if (bist == 0)
+		early_mtrr_init();
+
+	/* TODO: It's a PC87364 actually! */
+	pc87360_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
+
+	uart_init();
+	console_init();
+
+	enable_smbus();
+
+	report_bist_failure(bist);
+
+	/* dump_spd_registers(); */
+	sdram_set_registers();
+	sdram_set_spd_registers();
+	sdram_enable();
+	/* ram_check(0, 640 * 1024); */
+}
Index: src/mainboard/hp/e_vectra_p2706t/mainboard.c
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/mainboard.c	(Revision 0)
+++ src/mainboard/hp/e_vectra_p2706t/mainboard.c	(Revision 0)
@@ -0,0 +1,26 @@ 
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <device/device.h>
+#include "chip.h"
+
+struct chip_operations mainboard_ops = {
+	CHIP_NAME("HP e-Vectra P2706T Mainboard")
+};
Index: targets/hp/e_vectra_p2706t/Config.lb
===================================================================
--- targets/hp/e_vectra_p2706t/Config.lb	(Revision 0)
+++ targets/hp/e_vectra_p2706t/Config.lb	(Revision 0)
@@ -0,0 +1,39 @@ 
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+target e_vectra_p2706t
+mainboard hp/e_vectra_p2706t
+
+option CONFIG_ROM_SIZE = 512 * 1024
+
+romimage "normal"
+	option CONFIG_USE_FALLBACK_IMAGE = 0
+	option COREBOOT_EXTRA_VERSION = ".0Normal"
+	payload ../payload.elf
+end
+
+romimage "fallback"
+	option CONFIG_USE_FALLBACK_IMAGE = 1
+	option COREBOOT_EXTRA_VERSION = ".0Fallback"
+	payload ../payload.elf
+end
+
+buildrom ./coreboot.rom CONFIG_ROM_SIZE "normal" "fallback"
+