Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-03 Thread Alex G.
On 03/03/2011 04:49 PM, Keith Hui wrote:
> I like this solution too. Just that it requires hacking sconfig, and
> I'm not even close to qualified to actually do it. :)
> 
> And this requires sconfig to produce some other output for romstage as
> well. The hardware tree it produces is currently only used during
> ramstage.
> 
> While we're on sconfig, devicetree, superio and romstage, can we add a
> facility where I can declare some known, fixed initialization
> sequences that needs to be programmed into certain devices?
> 
And have the same sequence in every devicetree.cb that uses that device?
That's code duplication, which is exactly what we are trying to avoid.
Imagine if we find a problem with a superio used in 30 boards. Instead
of changing one file, we have 30 devicetree.cb .

> Suppose my new board requires 0x00 to be written into pnp device 2e.5,
> registers 0xf0-0xf5. Can we make it so that it will accept this
> declaration, and do it during romstage?
> 
On second thought, it might be a good idea if and only if your board
requires a _different_ sequence, and anything in devicetree.cb would
override the default one.

> If I need to do it now, I'll need to hijack either of io and drq for
> it and can only do it when pnp is initialized in ramstage.
> 
> chip superio/foo/bar# Super I/O
>   device pnp 2e.5 on# PME
> reg 0xf0 = 0x00
> reg 0xf1 = 0x00
> reg 0xf2 = 0x00
> reg 0xf3 = 0x00
> reg 0xf4 = 0x00
> reg 0xf5 = 0x00
>   end
> 
I'm not seeing any generic "reg" infrastructure. It doesn't look that
hard to extend though.

However, devicetree.cb _seems_ to deal exclusively with ramstage. Not
too sure how we can extend that to romstage.

Alex

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-03 Thread Keith Hui
I like this solution too. Just that it requires hacking sconfig, and
I'm not even close to qualified to actually do it. :)

And this requires sconfig to produce some other output for romstage as
well. The hardware tree it produces is currently only used during
ramstage.

While we're on sconfig, devicetree, superio and romstage, can we add a
facility where I can declare some known, fixed initialization
sequences that needs to be programmed into certain devices?

Suppose my new board requires 0x00 to be written into pnp device 2e.5,
registers 0xf0-0xf5. Can we make it so that it will accept this
declaration, and do it during romstage?

If I need to do it now, I'll need to hijack either of io and drq for
it and can only do it when pnp is initialized in ramstage.

chip superio/foo/bar# Super I/O
  device pnp 2e.5 on# PME
reg 0xf0 = 0x00
reg 0xf1 = 0x00
reg 0xf2 = 0x00
reg 0xf3 = 0x00
reg 0xf4 = 0x00
reg 0xf5 = 0x00
  end

Thanks

On Thu, Mar 3, 2011 at 3:40 AM, Alex G.  wrote:
> On 03/03/2011 09:35 AM, Georgi, Patrick wrote:
>> The chipset components in Kconfig could be derived from the
>> devicetree.cb (statically, on config time or before) - this would
>> simplify board config a bit by reducing duplication.
>>
>> Early serial could be managed with a new keyword there
>> ("chip superio/foo/bar early")
>>
>> Thoughts?
> I like the idea. It's long term, and cleaner.
>
>            chip superio/foo/bar                # Super I/O
>              device pnp 2e.1 on                # Com1
>                io 0x60 = 0x3f8
>                irq 0x70 = 4
>                serial_console
>              end
>
> So not only would we specify that the superio hosts the serial console,
> but also at which address that is, eliminating the need for
> #define SERIAL_DEV PNP_DEV(0x2e, FOOBAR_SP1)
> in romstage.c
>
> +1
>
> Alex
>

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-03 Thread Alex G.
On 03/03/2011 09:35 AM, Georgi, Patrick wrote:
> The chipset components in Kconfig could be derived from the
> devicetree.cb (statically, on config time or before) - this would
> simplify board config a bit by reducing duplication.
> 
> Early serial could be managed with a new keyword there
> ("chip superio/foo/bar early")
> 
> Thoughts?
I like the idea. It's long term, and cleaner.

chip superio/foo/bar# Super I/O
  device pnp 2e.1 on# Com1
io 0x60 = 0x3f8
irq 0x70 = 4
serial_console
  end

So not only would we specify that the superio hosts the serial console,
but also at which address that is, eliminating the need for
#define SERIAL_DEV PNP_DEV(0x2e, FOOBAR_SP1)
in romstage.c

+1

Alex

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-03 Thread Sven Schnelle
Hi Keith,

Keith Hui  writes:

>> Option C with GPLv2+ licensing.
>
> A few quick things:
>
> SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL seems long-winded for a name.
>
> I prefer to define CONFIG_SUPERIO_HAS_EARLY_SERIAL (or even just
> CONFIG_HAS_EARLY_SERIAL) within the superio Kconfig and not in
> mainboard Kconfig. This I think would be a per-superio setting. While
> we're at it, have we seen a board with 2+ superios?

Depends on what the definition of 'one Board' is. :) One example of
having more than one superio is the Lenovo X60/T60 - both have one
superio in the Laptop, and one in the Docking station. You can't
use the serial Port in the Laptop for an early console without
soldering, but that's one practically example of having more
than one superio.

I would prefer to add such settings to devicetree.cb - Kconfig isn't the
right right place for it IMHO, and isn't flexible enough.

Sven.

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-02 Thread Georgi, Patrick
Am Donnerstag, den 03.03.2011, 01:06 +0200 schrieb Alex G.:
> So you have:
>   select SUPERIO_KEITH875H
>   select SUPERIO_ALEX666G
>   select SUPERIO_ALEX666G_HAS_EARLY_SERIAL
> 
> > Having said that though, isn't early serial support sort of mandatory 
> > anyway?
> > 
> The point is not to specify if a superio has early serial. It is to
> specify which of the different superio's early serial will get compiled
> in, and used.
The chipset components in Kconfig could be derived from the
devicetree.cb (statically, on config time or before) - this would
simplify board config a bit by reducing duplication.

Early serial could be managed with a new keyword there
("chip superio/foo/bar early")

Thoughts?

Patrick
-- 
Patrick Georgi
SINA-Development - High Security
secunet Security Networks AG - Mergenthalerallee 77 - 65760 Eschborn, Germany
Phone +49 201 54 54-3610 - Fax +49 201 54 54-1325 - www.secunet.com 

Sitz: Kronprinzenstraße 30, 45128 Essen / Amtsgericht Essen HRB 13615
Vorstand: Dr. Rainer Baumgart (Vors.), Thomas Koelzer, Thomas Pleines
Aufsichtsratsvorsitzender: Dr. Karsten Ottenberg


signature.asc
Description: This is a digitally signed message part
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-02 Thread Alex G.
On 03/03/2011 01:01 AM, Keith Hui wrote:
>> Option C with GPLv2+ licensing.
> 
> A few quick things:
> 
> SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL seems long-winded for a name.
> 
> I prefer to define CONFIG_SUPERIO_HAS_EARLY_SERIAL (or even just
> CONFIG_HAS_EARLY_SERIAL) within the superio Kconfig and not in
> mainboard Kconfig. This I think would be a per-superio setting. While
> we're at it, have we seen a board with 2+ superios?
> 
The idea was that, if a board has more than one superio, we would have
to select which of those carries the early serial. Let's say board
PETER40S has two superios: an KEITH875H and an ALEX666G. Both have early
serial capability, but you have to specify which of those will be used
for serial purpose.

So you have:
select SUPERIO_KEITH875H
select SUPERIO_ALEX666G
select SUPERIO_ALEX666G_HAS_EARLY_SERIAL

> Having said that though, isn't early serial support sort of mandatory anyway?
> 
The point is not to specify if a superio has early serial. It is to
specify which of the different superio's early serial will get compiled
in, and used.

Alex

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-02 Thread Keith Hui
> Option C with GPLv2+ licensing.

A few quick things:

SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL seems long-winded for a name.

I prefer to define CONFIG_SUPERIO_HAS_EARLY_SERIAL (or even just
CONFIG_HAS_EARLY_SERIAL) within the superio Kconfig and not in
mainboard Kconfig. This I think would be a per-superio setting. While
we're at it, have we seen a board with 2+ superios?

Having said that though, isn't early serial support sort of mandatory anyway?

Secretly I'm hoping that some of my ideas end up in here. :-)

Cheers
Keith

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-03-02 Thread Alex G.
Option C with GPLv2+ licensing.

Alex
Signed-off-by: Alexandru Gagniuc 

Index: src/include/superio/early_serial.h
===
--- src/include/superio/early_serial.h	(revision 0)
+++ src/include/superio/early_serial.h	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011  Alexandru Gagniuc 
+ *
+ * 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
+ */
+#ifndef SUPERIO_EARLY_SERIAL_H
+#define SUPERIO_EARLY_SERIAL_H
+
+#include 
+#include 
+
+/**
+ * \brief Pre-RAM (romstage) serial port initialization
+ * 
+ * Initializes the serial port early in the boot sequence.
+ * \n
+ * The actual definition is in each superio chip's early_serial.c.
+ * early_serial.c should be included by the Makefile.inc of the respective
+ * superio See \n
+ * src/superio/fintek/f81865/Makefile.inc \n
+ * for details
+ * 
+ */
+void superio_enable_early_serial(device_t dev, u16 iobase);
+
+#endif /*  SUPERIO_EARLY_SERIAL_H */
\ No newline at end of file
Index: src/superio/fintek/Kconfig
===
--- src/superio/fintek/Kconfig	(revision 6380)
+++ src/superio/fintek/Kconfig	(working copy)
@@ -27,5 +27,8 @@
 	bool
 config SUPERIO_FINTEK_F71889
 	bool
+
 config SUPERIO_FINTEK_F81865F
 	bool
+config SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL
+	bool
\ No newline at end of file
Index: src/superio/fintek/f81865f/f81865f_early_serial.c
===
--- src/superio/fintek/f81865f/f81865f_early_serial.c	(revision 6380)
+++ src/superio/fintek/f81865f/f81865f_early_serial.c	(working copy)
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2011 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 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
- */
-
-/* Pre-RAM driver for the Fintek F81865F/FG Super I/O chip. */
-
-#include 
-#include "f81865f.h"
-
-static void pnp_enter_conf_state(device_t dev)
-{
-	u16 port = dev >> 8;
-	outb(0x87, port);
-	outb(0x87, port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
-	u16 port = dev >> 8;
-	outb(0xaa, port);
-}
-
-static void f81865f_enable_serial(device_t dev, u16 iobase)
-{
-	pnp_enter_conf_state(dev);
-	pnp_set_logical_device(dev);
-	pnp_set_enable(dev, 0);
-	pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
-	pnp_set_enable(dev, 1);
-	pnp_exit_conf_state(dev);
-}
Index: src/superio/fintek/f81865f/Makefile.inc
===
--- src/superio/fintek/f81865f/Makefile.inc	(revision 6380)
+++ src/superio/fintek/f81865f/Makefile.inc	(working copy)
@@ -2,6 +2,7 @@
 ## This file is part of the coreboot project.
 ##
 ## Copyright (C) 2011 Advanced Micro Devices, Inc.
+## Copyright (C) 2011 Alexandru Gagniuc 
 ##
 ## 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
@@ -19,3 +20,8 @@
 ##
 
 ramstage-$(CONFIG_SUPERIO_FINTEK_F81865F) += superio.c
+
+# Include early_serial.c automatically in romstage, so that including it in
+# romstage.c as a "#include .c" is no longer necesarry
+
+romstage-$(CONFIG_SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL) += early_serial.c
Index: src/superio/fintek/f81865f/early_serial.c
===
--- src/superio/fintek/f81865f/early_serial.c	(revision 6380)
+++ src/superio/fintek/f81865f/early_serial.c	(working copy)
@@ -19,10 +19,14 @@
  */
 
 /* Pre-RAM driver for the Fintek F81865F/FG Super I/O chip. */
+#include 	/* <== Must be in

Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-27 Thread Alex G.
Signed-off-by: Alexandru Gagniuc 
---
> C:
> Or, besides SUPERIO_VENDOR_NAME we can also have a Kconfig option
> SUPERIO_VENDOR_NAME_HAS_EARLY_SERIAL, and base our decision of including
> the early serial code in romstage based on the latter.
> 
I don't like options A, B, and D, so I created a patch to demonstrate
option C. I wasn't able to pick on a multi-superio board, as I don't
know which of the supported boards has more than one, and I'm not too
enthusiasti about looking thorugh 200+ Kconfig files.

Let me know what you think.

Alex
Index: src/include/superio/early_serial.h
===
--- src/include/superio/early_serial.h	(revision 0)
+++ src/include/superio/early_serial.h	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011  Alexandru Gagniuc 
+ *
+ * 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 3 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, see .
+ */
+#ifndef SUPERIO_EARLY_SERIAL_H
+#define SUPERIO_EARLY_SERIAL_H
+
+#include 
+#include 
+
+/**
+ * \brief Pre-RAM (romstage) serial port initialization
+ * 
+ * Initializes the serial port early in the boot sequence.
+ * \n
+ * The actual definition is in each superio chip's early_serial.c.
+ * early_serial.c should be included by the Makefile.inc of the respective
+ * superio See \n
+ * src/superio/fintek/f81865/Makefile.inc \n
+ * for details
+ * 
+ */
+void superio_enable_early_serial(device_t dev, u16 iobase);
+
+#endif /*  SUPERIO_EARLY_SERIAL_H */
\ No newline at end of file
Index: src/superio/fintek/Kconfig
===
--- src/superio/fintek/Kconfig	(revision 6380)
+++ src/superio/fintek/Kconfig	(working copy)
@@ -27,5 +27,8 @@
 	bool
 config SUPERIO_FINTEK_F71889
 	bool
+
 config SUPERIO_FINTEK_F81865F
 	bool
+config SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL
+	bool
\ No newline at end of file
Index: src/superio/fintek/f81865f/f81865f_early_serial.c
===
--- src/superio/fintek/f81865f/f81865f_early_serial.c	(revision 6380)
+++ src/superio/fintek/f81865f/f81865f_early_serial.c	(working copy)
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2011 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 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
- */
-
-/* Pre-RAM driver for the Fintek F81865F/FG Super I/O chip. */
-
-#include 
-#include "f81865f.h"
-
-static void pnp_enter_conf_state(device_t dev)
-{
-	u16 port = dev >> 8;
-	outb(0x87, port);
-	outb(0x87, port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
-	u16 port = dev >> 8;
-	outb(0xaa, port);
-}
-
-static void f81865f_enable_serial(device_t dev, u16 iobase)
-{
-	pnp_enter_conf_state(dev);
-	pnp_set_logical_device(dev);
-	pnp_set_enable(dev, 0);
-	pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
-	pnp_set_enable(dev, 1);
-	pnp_exit_conf_state(dev);
-}
Index: src/superio/fintek/f81865f/Makefile.inc
===
--- src/superio/fintek/f81865f/Makefile.inc	(revision 6380)
+++ src/superio/fintek/f81865f/Makefile.inc	(working copy)
@@ -2,6 +2,7 @@
 ## This file is part of the coreboot project.
 ##
 ## Copyright (C) 2011 Advanced Micro Devices, Inc.
+## Copyright (C) 2011 Alexandru Gagniuc 
 ##
 ## 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
@@ -19,3 +20,8 @@
 ##
 
 ramstage-$(CONFIG_SUPERIO_FINTEK_F81865F) += superio.c
+
+# Include early_serial.c automatically in romstage, so that including it in
+# romstage.c as a "#include .c" is no longer necesarry
+
+romstage-$(CONFIG_SUPERIO_FINTEK_

Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-26 Thread Alex G.
On 02/26/2011 11:43 PM, Patrick Georgi wrote:
> Am Samstag, 26. Februar 2011, 23:27:47 schrieb Alex G.:
>> Why bother holding dear to romcc when the obvious solution is to move
>> those boards to CAR? We introduce more unneeded complexity, and make it
>> at least just as hard to phase out romcc.
> Those boards carry CPUs without CAR.
> 
Then those boards are most likely old and obsolete. Is it worth still
supporting them? "Support for this board was dropped with revision
'xyzw'". Do we want to make it xyzwq ?

> As for phasing out such support: That would be easy (just drop everything 
> guarded in CONFIG_ROMCC in the build system).
> 
Yeah, wasting countless hours fixing something that should have been
done long ago is fun. Oh wait, you guys are grep/sed masters; nevermind
that. :)

Alex

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-26 Thread Alex G.
On 02/26/2011 11:16 PM, Peter Stuge wrote:
> Alex G. wrote:
>> Moves the inclusion of the superio early code from romstage.c in 
>> the mainboard directory to Makefile.inc in the superio directory.
> 
> Will it work also for boards with more than one superio?
> 
I'm very tempted (and sure) to say "no". That's why this is largely a
proposal, and you are welcome to extend it. I can only do one superio at
a time, and I definitely cannot do it all by myself.

A:
One other solution I had considered was to put the include in the
board's Makefile.inc, but, as you might have imagined, proved too messy.

B:
A fuzzy extension of this option is to declare
superio_enable_early_serial() as weak, and have the board select which
superio to use for serial output.

C:
Or, besides SUPERIO_VENDOR_NAME we can also have a Kconfig option
SUPERIO_VENDOR_NAME_HAS_EARLY_SERIAL, and base our decision of including
the early serial code in romstage based on the latter.

==
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
[...]
select SUPERIO_FINTEK_F81865F
select SUPERIO_OTHERVENDOR_OTHERMODEL
select SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL
[...]
==

romstage-$(CONFIG_SUPERIO_FINTEK_F81865F_HAS_EARLY_SERIAL) += early_serial.c

If the board has two identical superios, then the same file will get
included (only once). In this case, handling both superios will have to
be done in mainboard logic anyways.

D:
Just forget about it and never again worry about .c includes.

Alex

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-26 Thread Patrick Georgi
Am Samstag, 26. Februar 2011, 23:27:47 schrieb Alex G.:
> Why bother holding dear to romcc when the obvious solution is to move
> those boards to CAR? We introduce more unneeded complexity, and make it
> at least just as hard to phase out romcc.
Those boards carry CPUs without CAR.

As for phasing out such support: That would be easy (just drop everything 
guarded in CONFIG_ROMCC in the build system).


Patrick

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-26 Thread Alex G.
On 02/26/2011 10:50 PM, Patrick Georgi wrote:
> Am Samstag, 26. Februar 2011, 14:17:37 schrieb Alex G.:
>> 3) add a romstage-$(CONFIG_THIS_SUPERIO) += early_serial.c to the
>> superio's Makefile.inc
> This will fail for romcc boards, as for them, romstage must be compiled by a 
> single romcc invocation.
> 
If we break romcc boards in an effort to efficientize the code base, I
am all for it, just so as long as we plead to fix it not much later down
the road.

> I planned to work on this by having the build system generate a wrapper for 
> romcc boards automatically  (essentially a file in $(obj) with romstage.c and 
> other .c files #included, properly hidden from the dev), but that has some 
> issues with the right order in which things must be included (romcc doesn't 
> support forward declarations).
> 
Why bother holding dear to romcc when the obvious solution is to move
those boards to CAR? We introduce more unneeded complexity, and make it
at least just as hard to phase out romcc.

Alex

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-26 Thread Peter Stuge
Alex G. wrote:
> Moves the inclusion of the superio early code from romstage.c in 
> the mainboard directory to Makefile.inc in the superio directory.

Will it work also for boards with more than one superio?


//Peter

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [PATCH] Proposal for dealing with superio *.c includes

2011-02-26 Thread Patrick Georgi
Am Samstag, 26. Februar 2011, 14:17:37 schrieb Alex G.:
> 3) add a romstage-$(CONFIG_THIS_SUPERIO) += early_serial.c to the
> superio's Makefile.inc
This will fail for romcc boards, as for them, romstage must be compiled by a 
single romcc invocation.

I planned to work on this by having the build system generate a wrapper for 
romcc boards automatically  (essentially a file in $(obj) with romstage.c and 
other .c files #included, properly hidden from the dev), but that has some 
issues with the right order in which things must be included (romcc doesn't 
support forward declarations).


Patrick


-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot