* [U-Boot] [PATCH 1/2] Blackfin: add os log functions
@ 2009-07-10 6:36 Mike Frysinger
2009-07-10 6:36 ` [U-Boot] [PATCH 2/2] Blackfin: split cpu COBJS into multilines Mike Frysinger
2009-07-10 11:45 ` [U-Boot] [PATCH 1/2] Blackfin: add os log functions Wolfgang Denk
0 siblings, 2 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-07-10 6:36 UTC (permalink / raw)
To: u-boot
Part of the mini Blackfin ABI with operating systems is that they can use
0x4f0-0x4f8 to pass log buffers to/from bootloaders. So add support to
U-Boot for reading the log buffer.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
cpu/blackfin/Makefile | 2 +-
cpu/blackfin/os_log.c | 30 ++++++++++++++++++++++++++++++
include/asm-blackfin/blackfin_local.h | 3 +++
lib_blackfin/board.c | 6 ++++++
4 files changed, 40 insertions(+), 1 deletions(-)
create mode 100644 cpu/blackfin/os_log.c
diff --git a/cpu/blackfin/Makefile b/cpu/blackfin/Makefile
index 1378fd1..f684106 100644
--- a/cpu/blackfin/Makefile
+++ b/cpu/blackfin/Makefile
@@ -17,7 +17,7 @@ EXTRA :=
CEXTRA := initcode.o
SEXTRA := start.o
SOBJS := interrupt.o cache.o
-COBJS-y := cpu.o traps.o interrupts.o reset.o serial.o watchdog.o
+COBJS-y := cpu.o traps.o interrupts.o os_log.o reset.o serial.o watchdog.o
COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
ifeq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
diff --git a/cpu/blackfin/os_log.c b/cpu/blackfin/os_log.c
new file mode 100644
index 0000000..e1c8e29
--- /dev/null
+++ b/cpu/blackfin/os_log.c
@@ -0,0 +1,30 @@
+/*
+ * functions for handling OS log buffer
+ *
+ * Copyright (c) 2009 Analog Devices Inc.
+ *
+ * Licensed under the 2-clause BSD.
+ */
+
+#include <common.h>
+
+#define OS_LOG_MAGIC 0xDEADBEEF
+#define OS_LOG_MAGIC_ADDR ((unsigned long *)0x4f0)
+#define OS_LOG_PTR_ADDR ((char **)0x4f4)
+
+bool bfin_os_log_check(void)
+{
+ if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC)
+ return false;
+ *OS_LOG_MAGIC_ADDR = 0;
+ return true;
+}
+
+void bfin_os_log_dump(void)
+{
+ char *log = *OS_LOG_PTR_ADDR;
+ while (*log) {
+ puts(log);
+ log += strlen(log) + 1;
+ }
+}
diff --git a/include/asm-blackfin/blackfin_local.h b/include/asm-blackfin/blackfin_local.h
index e17d8a2..8ec7928 100644
--- a/include/asm-blackfin/blackfin_local.h
+++ b/include/asm-blackfin/blackfin_local.h
@@ -61,6 +61,9 @@ extern u_long get_sclk(void);
# define bfin_revid() (*pCHIPID >> 28)
+extern bool bfin_os_log_check(void);
+extern void bfin_os_log_dump(void);
+
extern void blackfin_icache_flush_range(const void *, const void *);
extern void blackfin_dcache_flush_range(const void *, const void *);
extern void blackfin_icache_dcache_flush_range(const void *, const void *);
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index 047f164..96ec3bb 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -384,6 +384,12 @@ void board_init_r(gd_t * id, ulong dest_addr)
post_run(NULL, POST_RAM | post_bootmode_get(0));
#endif
+ if (bfin_os_log_check()) {
+ puts("\nLog buffer from operating system:\n");
+ bfin_os_log_dump();
+ puts("\n");
+ }
+
/* main_loop() can return to retry autoboot, if so just run it again. */
for (;;)
main_loop();
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/2] Blackfin: split cpu COBJS into multilines
2009-07-10 6:36 [U-Boot] [PATCH 1/2] Blackfin: add os log functions Mike Frysinger
@ 2009-07-10 6:36 ` Mike Frysinger
2009-07-10 11:45 ` [U-Boot] [PATCH 1/2] Blackfin: add os log functions Wolfgang Denk
1 sibling, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-07-10 6:36 UTC (permalink / raw)
To: u-boot
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
cpu/blackfin/Makefile | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/cpu/blackfin/Makefile b/cpu/blackfin/Makefile
index f684106..5eef6a3 100644
--- a/cpu/blackfin/Makefile
+++ b/cpu/blackfin/Makefile
@@ -17,8 +17,14 @@ EXTRA :=
CEXTRA := initcode.o
SEXTRA := start.o
SOBJS := interrupt.o cache.o
-COBJS-y := cpu.o traps.o interrupts.o os_log.o reset.o serial.o watchdog.o
+COBJS-y += cpu.o
+COBJS-y += interrupts.o
COBJS-$(CONFIG_JTAG_CONSOLE) += jtag-console.o
+COBJS-y += os_log.o
+COBJS-y += reset.o
+COBJS-y += serial.o
+COBJS-y += traps.o
+COBJS-y += watchdog.o
ifeq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
COBJS-y += initcode.o
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] Blackfin: add os log functions
2009-07-10 6:36 [U-Boot] [PATCH 1/2] Blackfin: add os log functions Mike Frysinger
2009-07-10 6:36 ` [U-Boot] [PATCH 2/2] Blackfin: split cpu COBJS into multilines Mike Frysinger
@ 2009-07-10 11:45 ` Wolfgang Denk
2009-07-10 14:14 ` Mike Frysinger
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2009-07-10 11:45 UTC (permalink / raw)
To: u-boot
Dear Mike Frysinger,
In message <1247207772-6512-1-git-send-email-vapier@gentoo.org> you wrote:
> Part of the mini Blackfin ABI with operating systems is that they can use
> 0x4f0-0x4f8 to pass log buffers to/from bootloaders. So add support to
> U-Boot for reading the log buffer.
...
> diff --git a/cpu/blackfin/os_log.c b/cpu/blackfin/os_log.c
> new file mode 100644
> index 0000000..e1c8e29
> --- /dev/null
> +++ b/cpu/blackfin/os_log.c
> @@ -0,0 +1,30 @@
> +/*
> + * functions for handling OS log buffer
> + *
> + * Copyright (c) 2009 Analog Devices Inc.
> + *
> + * Licensed under the 2-clause BSD.
> + */
Please use "GPLv2 or later"; see
http://www.denx.de/wiki/U-Boot/Patches
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Nothing is easier than to denounce the evildoer; nothing is more
difficult than to understand him. - Fyodor Dostoevski
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] Blackfin: add os log functions
2009-07-10 11:45 ` [U-Boot] [PATCH 1/2] Blackfin: add os log functions Wolfgang Denk
@ 2009-07-10 14:14 ` Mike Frysinger
2009-07-10 14:34 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2009-07-10 14:14 UTC (permalink / raw)
To: u-boot
On Friday 10 July 2009 07:45:48 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > --- /dev/null
> > +++ b/cpu/blackfin/os_log.c
> > @@ -0,0 +1,30 @@
> > +/*
> > + * functions for handling OS log buffer
> > + *
> > + * Copyright (c) 2009 Analog Devices Inc.
> > + *
> > + * Licensed under the 2-clause BSD.
> > + */
>
> Please use "GPLv2 or later"; see
> http://www.denx.de/wiki/U-Boot/Patches
that note says it must be GPLv3 compatible, which BSD is. there is no problem
including BSD software with any GPL version
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090710/013c1ef8/attachment.pgp
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] Blackfin: add os log functions
2009-07-10 14:14 ` Mike Frysinger
@ 2009-07-10 14:34 ` Wolfgang Denk
2009-07-10 15:00 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2009-07-10 14:34 UTC (permalink / raw)
To: u-boot
Dear Mike Frysinger,
In message <200907101014.28297.vapier@gentoo.org> you wrote:
>
> > Mike Frysinger wrote:
> > > --- /dev/null
> > > +++ b/cpu/blackfin/os_log.c
> > > @@ -0,0 +1,30 @@
> > > +/*
> > > + * functions for handling OS log buffer
> > > + *
> > > + * Copyright (c) 2009 Analog Devices Inc.
> > > + *
> > > + * Licensed under the 2-clause BSD.
> > > + */
> >
> > Please use "GPLv2 or later"; see
> > http://www.denx.de/wiki/U-Boot/Patches
>
> that note says it must be GPLv3 compatible, which BSD is. there is no problem
> including BSD software with any GPL version
Then please explain exactly what "2-clause BSD" is referring to.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There is nothing so deadly as not to hold up to people the
opportunity to do great and wonderful things, if we wish to stimulate
them in an active way."
- Dr. Harold Urey, Nobel Laureate in chemistry
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/2] Blackfin: add os log functions
2009-07-10 14:34 ` Wolfgang Denk
@ 2009-07-10 15:00 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-07-10 15:00 UTC (permalink / raw)
To: u-boot
On Friday 10 July 2009 10:34:20 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > Mike Frysinger wrote:
> > > > --- /dev/null
> > > > +++ b/cpu/blackfin/os_log.c
> > > > @@ -0,0 +1,30 @@
> > > > +/*
> > > > + * functions for handling OS log buffer
> > > > + *
> > > > + * Copyright (c) 2009 Analog Devices Inc.
> > > > + *
> > > > + * Licensed under the 2-clause BSD.
> > > > + */
> > >
> > > Please use "GPLv2 or later"; see
> > > http://www.denx.de/wiki/U-Boot/Patches
> >
> > that note says it must be GPLv3 compatible, which BSD is. there is no
> > problem including BSD software with any GPL version
>
> Then please explain exactly what "2-clause BSD" is referring to.
-> http://www.google.com/search?q=2-clause+bsd
-> http://en.wikipedia.org/wiki/BSD_licenses
-> the BSD license with only 2 clauses, not the original 4 clause or the 3
clause, i.e. no advertising clause
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090710/72bb4757/attachment.pgp
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-10 15:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 6:36 [U-Boot] [PATCH 1/2] Blackfin: add os log functions Mike Frysinger
2009-07-10 6:36 ` [U-Boot] [PATCH 2/2] Blackfin: split cpu COBJS into multilines Mike Frysinger
2009-07-10 11:45 ` [U-Boot] [PATCH 1/2] Blackfin: add os log functions Wolfgang Denk
2009-07-10 14:14 ` Mike Frysinger
2009-07-10 14:34 ` Wolfgang Denk
2009-07-10 15:00 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox