Partial diff attached, .... here are comments.
Still builds.
On 9/8/07, Uwe Hermann <[EMAIL PROTECTED]> wrote:
> Add a license header, please.
done
> As it's commented out (and likely copied from some other target), please
> drop the file completely for now. We can add a working version (or
> preferrably use a global/common file if possible) if and when we need it.
> I don't like adding dummy files which aren't really necessary.
removed.
> > + 32+16*9, /* There can be total 9 devices on the bus */
>
> Is the 9 (and the rest of this file) correct and tested?
fixed constant in options.lb and replace 9 with the IRQ_SLOT_COUNT.
> Add a license header, please.
done
>
> NACK. Not yet another copy of this file, please. Move it into lib/ or
> somewhere globally, and use that in all targets. We should stop
> replicating there files again and again.
patch 2 as attached.
>
> NACK, see above. This is common code just about every board duplicateѕ
> again and again. I have a patch which adds a global failover.c into
> lib/ (which my recent i810 board patch already uses, btw).
>
> I'll post the patch ASAP.
I'll wait for your failover.c patch, but beware: they are not ALWAYS
totally identical.
>
>
> > Index: src/mainboard/pcengines/alix1c/chip.h
> > ===================================================================
> > --- src/mainboard/pcengines/alix1c/chip.h (revision 0)
> > +++ src/mainboard/pcengines/alix1c/chip.h (revision 0)
>
> Trivial, but please add a license header.
done.
> > +++ src/mainboard/pcengines/alix1c/cmos.layout (revision 0)
>
> This should be dropped for now (needs a small fix in Config.lb to make
> it still compile), as you use
not, I want it here as we will want CMOS support on this board at some point.
> Add a license header, please.
done.
> > +
> > +/* Print the platform configuration */
> > +void print_conf(void) {
>
> Is this really needed here? Should it go in some common lib/ file?
> Doesn't look board-specific to me.
let's unify it but later. It's not always non-board-specific.
> > + printk_debug("ALIX1C ENTER %s\n", __FUNCTION__);
> > +
> > + printk_debug("ALIX1C EXIT %s\n", __FUNCTION__);
>
> Drop both printks? Are they useful?
They are useful for debug, so that people can see what's getting run
and when. I would prefer to leave them in.
>
> CHIP_NAME("PC Engines ALIX1.C Mainboard")
done I think.
> > +++ src/mainboard/pcengines/alix1c/cache_as_ram_auto.c (revision 0)
>
> Add a license header, please.
done
> > +#define POST_CODE(x) outb(x, 0x80)
>
> We have a global implementation already.
cache as ram is weird, I want to test this before I use the library.
The library can do lots more than outb, what with serial post and
timers etc.
> > +
> > +}
>
> Is this board-specific or chipset-specific? If the latter, it should not
> be here.
I am not sure. Marc?
> > + /* Check all of memory */
>
> Only checks _some_ memory.
:-)
Will fix in next go round, I forgot to.
> > +
> > + We use method 1 on Norwich and on this board too.
> > + */
>
> This comment is in some other file, too. Maybe it should go in the wiki
> or in the generic CAR code somewhere? No need to duplicate it in every
> LX board...
I want this comment in, since not all users of LX read all files that use LX ;-)
>
>
> > + POST_CODE(0x02);
> > + print_err("POST 02\n");
> > + __asm__("wbinvd\n");
>
> Don't we have a wbinvd() function? Or is that in v3 only?
v3 only AFAIK.
> > +++ targets/pcengines/alix1c/Config.lb (revision 0)
>
> Add a license header, please.
done
So, try 2.
ron
Partial changes and fixup.
Removed reset.c and added copyright headers.
Signed-off-by: Ronald G. Minnich <[EMAIL PROTECTED]>
Index: src/mainboard/pcengines/alix1c/Config.lb
===================================================================
--- src/mainboard/pcengines/alix1c/Config.lb (revision 2765)
+++ src/mainboard/pcengines/alix1c/Config.lb (working copy)
@@ -1,4 +1,23 @@
##
+## This file is part of the LinuxBIOS project.
+##
+## Copyright (C) 2006-2007 Ronald G. Minnich <[EMAIL PROTECTED]>
+##
+## 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
+##
+##
## Compute the location and size of where this firmware image
## (linuxBIOS plus bootloader) will live in the boot rom chip.
##
Index: src/mainboard/pcengines/alix1c/reset.c
===================================================================
--- src/mainboard/pcengines/alix1c/reset.c (revision 2764)
+++ src/mainboard/pcengines/alix1c/reset.c (working copy)
@@ -1,43 +0,0 @@
-#if 0
-//#include "arch/romcc_io.h"
-#include <arch/io.h>
-
-typedef unsigned device_t;
-
-#define PCI_DEV(BUS, DEV, FN) ( \
- (((BUS) & 0xFF) << 16) | \
- (((DEV) & 0x1f) << 11) | \
- (((FN) & 0x7) << 8))
-
-static void pci_write_config8(device_t dev, unsigned where, unsigned char value)
-{
- unsigned addr;
- addr = dev | where;
- outl(0x80000000 | (addr & ~3), 0xCF8);
- outb(value, 0xCFC + (addr & 3));
-}
-
-static void pci_write_config32(device_t dev, unsigned where, unsigned value)
-{
- unsigned addr;
- addr = dev | where;
- outl(0x80000000 | (addr & ~3), 0xCF8);
- outl(value, 0xCFC);
-}
-
-static unsigned pci_read_config32(device_t dev, unsigned where)
-{
- unsigned addr;
- addr = dev | where;
- outl(0x80000000 | (addr & ~3), 0xCF8);
- return inl(0xCFC);
-}
-
-#include "../../../northbridge/amd/amdk8/reset_test.c"
-
-void hard_reset(void)
-{
- set_bios_reset();
- pci_write_config8(PCI_DEV(1, 0x04, 0), 0x47, 1);
-}
-#endif
Index: src/mainboard/pcengines/alix1c/irq_tables.c
===================================================================
--- src/mainboard/pcengines/alix1c/irq_tables.c (revision 2765)
+++ src/mainboard/pcengines/alix1c/irq_tables.c (working copy)
@@ -44,7 +44,7 @@
const struct irq_routing_table intel_irq_routing_table = {
PIRQ_SIGNATURE, /* u32 signature */
PIRQ_VERSION, /* u16 version */
- 32+16*9, /* There can be total 9 devices on the bus */
+ 32+16*IRQ_SLOT_COUNT, /* There can be total IRQ_SLOT_COUNT devices on the bus */
0x00, /* Where the interrupt router lies (bus) */
(0x0f<<3)|0x0, /* Where the interrupt router lies (dev) */
0, /* IRQs devoted exclusively to PCI usage */
Index: src/mainboard/pcengines/alix1c/Options.lb
===================================================================
--- src/mainboard/pcengines/alix1c/Options.lb (revision 2765)
+++ src/mainboard/pcengines/alix1c/Options.lb (working copy)
@@ -1,3 +1,26 @@
+##
+## This file is part of the LinuxBIOS project.
+##
+## Copyright (C) 2006-2007 Ronald G. Minnich <[EMAIL PROTECTED]>
+##
+## 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
+##
+##
+## Compute the location and size of where this firmware image
+## (linuxBIOS plus bootloader) will live in the boot rom chip.
+##
uses HAVE_MP_TABLE
uses HAVE_PIRQ_TABLE
uses USE_FALLBACK_IMAGE
@@ -83,7 +106,7 @@
## Build code to export a programmable irq routing table
##
default HAVE_PIRQ_TABLE=1
-default IRQ_SLOT_COUNT=6
+default IRQ_SLOT_COUNT=9
#object irq_tables.o
##
Index: src/mainboard/pcengines/alix1c/chip.h
===================================================================
--- src/mainboard/pcengines/alix1c/chip.h (revision 2765)
+++ src/mainboard/pcengines/alix1c/chip.h (working copy)
@@ -1,3 +1,21 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright (C) 2007 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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_pcengines_alix1c_ops;
struct mainboard_pcengines_alix1c_config {
Index: src/mainboard/pcengines/alix1c/mainboard.c
===================================================================
--- src/mainboard/pcengines/alix1c/mainboard.c (revision 2765)
+++ src/mainboard/pcengines/alix1c/mainboard.c (working copy)
@@ -1,3 +1,21 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright (C) 2007 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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 <console/console.h>
#include <device/device.h>
#include <device/pci.h>
@@ -148,7 +166,7 @@
}
struct chip_operations mainboard_pcengines_alix1c_ops = {
- CHIP_NAME("PC ENGINES ALIX1C Mainboard")
+ CHIP_NAME("PC ENGINES ALIX1.C Mainboard")
.enable_dev = enable_dev,
};
Index: src/mainboard/pcengines/alix1c/cache_as_ram_auto.c
===================================================================
--- src/mainboard/pcengines/alix1c/cache_as_ram_auto.c (revision 2765)
+++ src/mainboard/pcengines/alix1c/cache_as_ram_auto.c (working copy)
@@ -1,3 +1,21 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright (C) 2007 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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>
Remove this file. It is not used and should not be here.
Signed-off-by: Ronald G. Minnich <[EMAIL PROTECTED]>
Index: src/mainboard/pcengines/alix1c/debug.c
===================================================================
--- src/mainboard/pcengines/alix1c/debug.c (revision 2765)
+++ src/mainboard/pcengines/alix1c/debug.c (working copy)
@@ -1,66 +0,0 @@
-
-static void print_debug_pci_dev(unsigned dev)
-{
- print_debug("PCI: ");
- print_debug_hex8((dev >> 16) & 0xff);
- print_debug_char(':');
- print_debug_hex8((dev >> 11) & 0x1f);
- print_debug_char('.');
- print_debug_hex8((dev >> 8) & 7);
-}
-
-static void print_pci_devices(void)
-{
- device_t dev;
- for(dev = PCI_DEV(0, 0, 0);
- dev <= PCI_DEV(0, 0x1f, 0x7);
- dev += PCI_DEV(0,0,1)) {
- uint32_t id;
- id = pci_read_config32(dev, PCI_VENDOR_ID);
- if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0x0000)) {
- continue;
- }
- print_debug_pci_dev(dev);
- print_debug("\r\n");
- }
-}
-
-static void dump_pci_device(unsigned dev)
-{
- int i;
- print_debug_pci_dev(dev);
- print_debug("\r\n");
-
- for(i = 0; i <= 255; i++) {
- unsigned char val;
- if ((i & 0x0f) == 0) {
- print_debug_hex8(i);
- print_debug_char(':');
- }
- val = pci_read_config8(dev, i);
- print_debug_char(' ');
- print_debug_hex8(val);
- if ((i & 0x0f) == 0x0f) {
- print_debug("\r\n");
- }
- }
-}
-
-static void dump_pci_devices(void)
-{
- device_t dev;
- for(dev = PCI_DEV(0, 0, 0);
- dev <= PCI_DEV(0, 0x1f, 0x7);
- dev += PCI_DEV(0,0,1)) {
- uint32_t id;
- id = pci_read_config32(dev, PCI_VENDOR_ID);
- if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0xffff) ||
- (((id >> 16) & 0xffff) == 0x0000)) {
- continue;
- }
- dump_pci_device(dev);
- }
-}
--
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios