On Wed, Oct 29, 2008 at 2:30 PM, Chris Lingard <<a href="mailto:chris@stockwith.co.uk">chris@stockwith.co.uk</a>> wrote:<br>><br>> Motherboards DFI NF-570 range, (NF570SLI-M2/G, NF570-M2/G and NF550-M2/G).<br>><br>
><br>> This is a suggestion to port coreboot to the NF570 series. I have already posted a patch, but this just duplicates the entire M57SLI stuff just for a two line change. If the build script could set a flag, shown in the example as dfi_nf570, then coreboot would work on the above motherboards.<br>
><br>> After discussion on IRC this would be a better implementation<br>><br>><br>> From mptable.c<br>><br>> PCI_INT(0,sbdn+6,1, 23); /* HD Audio */<br>> PCI_INT(0,sbdn+5,0, 20); /* SATA */<br>
> PCI_INT(0,sbdn+5,2, 22); /* SATA */<br>> PCI_INT(0,sbdn+5,1, 23); /* SATA */<br>><br>> #ifdef dfi_nf570<br>><br>> PCI_INT(0,sbdn+5,2, 22); /* SATA */<br>><br>> PCI_INT(0,sbdn+8,0, 21); /* GBit Ether */<br>
><br>> #else<br>><br>> PCI_INT(0,sbdn+5,2, 21); /* SATA */<br>><br>> PCI_INT(0,sbdn+8,0, 22); /* GBit Ether */<br>><br>> #endif<br>><br>> /* The PCIe slots, each on its own bus */<br>
><br>> Taken and modified from the Gigabyte M57SLI tree<br>> signed-of-by: Chris Lingard <a href="mailto:chris@stockwith.co.uk">chris@stockwith.co.uk</a><br>> Tested on a DSI NF570-M2/G motherboard<br>><br>
> The use of this motherboard eases the learning path into coreboot, because it has a socketed BIOS, and needs no modification. I had never hot plugged a chip nor flashed a BIOS until this week<br><br>I don't like this for one simple reason, I don't like the idea of trying to explain to users that they have to compile target x with config variable y set to make it work on board z, because once we start down that road it's going to get messy quick.<br>
<br>If we really want to avoid duplicated code, my proposal would be a mainboard Config.lb like the following. I'm stuck in windows atm, so no way to test if it actually would build correctly, but I think it should. There are reasons we've avoided doing stuff like this in the past though, mainly because of the possibility of a change to one target breaking multiple other targets using the same code, and I'm much more comfortable with a bit of duplicated code.<br>
<br>-Corey<br> <br>1##<br>2## This file is part of the coreboot project.<br>3##<br>4## Copyright (C) 2007 AMD<br>5## Written by Yinghai Lu <<a href="mailto:yinghailu@amd.com">yinghailu@amd.com</a>> for AMD.<br>6##<br>
<br><snip><br><br>72##<br>73## Build the objects we have code for in this directory.<br>74##<br>75<br><br># These files duplicated, reflect different mainboard name and irq tables<br><br>76driver mainboard.o<br>77#needed by irq_tables and mptable and acpi_tables<br>
78object get_bus_conf.o<br>79<br>80if HAVE_MP_TABLE object mptable.o end<br>81if HAVE_PIRQ_TABLE object irq_tables.o end<br>82#object reset.o<br>83if USE_DCACHE_RAM<br>84<br>85 if CONFIG_USE_INIT<br><br># These don't have to be<br>
<br>86 makerule ../../gigabyte/m57sli/cache_as_ram_auto.o<br>87 depends "../../gigabyte/m57sli/cache_as_ram_auto.c option_table.h"<br>88 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) ../../gigabyte/m57sli/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"<br>
89 end<br>90 else<br>91 makerule ../../gigabyte/m57slicache_as_ram_auto.inc<br>92 depends "../../gigabyte/m57sli/cache_as_ram_auto.c option_table.h"<br>
93 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) ../../gigabyte/m57sli/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"<br>94 action "perl -e 's/.rodata/.rom.data/g' -pi $@"<br>
95 action "perl -e 's/.text/.section .rom.text/g' -pi $@"<br>96 end<br>97 end<br>98<br>99end<br>