This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dreamcast bootup failed fix


At Thu, 29 Apr 2004 07:09:29 +0100,
Jonathan Larmour wrote:
> 
> Yoshinori Sato wrote:
> > Dreamcast cannot boot by some problems.
> > 1. Because definitions of CYG_HAL_STARTUP is illegal, 
> >    cannot form jmp to reset_platform justly.
> > 2. IPL starts execution from 0x8c010000, but cannot start 
> >    normally because _reset is 0x8c010200.
> > 
> > Correct a problem with this patch.
> 
> Hi Yoshinori,
> 
> This patch is mostly okay, except for this change to vectors.S:
> 
> +#ifdef CYGPKG_HAL_SH_SH7750_DREAMCAST
> +#------------------------------------------------------------------------------
> +# Dreamcast CD-ROM Boot entry
> +	.section .entry,"ax"
> +	.org	0
> +FUNC_START(_dc_entry)
> +	mov.l	$reset,r0
> +	jmp	@r0
> +	nop
> +	.align	2
> +$reset:
> +	.long	CYG_LABEL_DEFN(_reset)
> +#endif
> 
> We want to keep platform specific stuff out of vectors.S. Can you instead 
> add a little .S file in your platform HAL to include this section? You 
> would then use compile -library=libextras.a in the CDL file to force its 
> inclusion in the program image.
> 
> I would do it myself, but I'd prefer if it were tested.
> 
> Thanks,
> 

I corrected it so that it was arranged in Dreamcast dependence part.

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

Index: hal/sh/arch/current/ChangeLog
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/arch/current/ChangeLog,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 ChangeLog
--- hal/sh/arch/current/ChangeLog	4 Mar 2004 05:15:21 -0000	1.1.1.8
+++ hal/sh/arch/current/ChangeLog	30 Apr 2004 07:56:00 -0000
@@ -1,3 +1,7 @@
+2004-04-30  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* src/sh.ld: Add Dreamcast startup entry. fix bootup failed.
+
 2004-02-05  Kelvin Lawson  <klawson@ad-holdings.co.uk>
 
 	* include/hal_var_bank.inc: Fix build error on non-FPU systems due to
Index: hal/sh/arch/current/include/hal_var_bank.inc
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/arch/current/include/hal_var_bank.inc,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
Index: hal/sh/arch/current/src/sh.ld
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/arch/current/src/sh.ld,v
retrieving revision 1.1.1.4
retrieving revision 1.2
diff -u -r1.1.1.4 -r1.2
--- hal/sh/arch/current/src/sh.ld	27 Nov 2003 14:28:49 -0000	1.1.1.4
+++ hal/sh/arch/current/src/sh.ld	21 Apr 2004 17:01:17 -0000	1.2
@@ -203,6 +203,13 @@
       CYG_LABEL_DEFN(_bss_end) = ABSOLUTE (.); }	\
     > _region_
 
+# define SECTION_entry(_region_, _vma_, _lma_)		\
+  .entry _vma_ : _lma_					\
+  { 							\
+	KEEP(*(.entry))					\
+  }							\
+  > _region_
+
 #define SECTIONS_END . = ALIGN(4); CYG_LABEL_DEFN(end) = .; PROVIDE (end = .);
 
 #include <pkgconf/system.h>
Index: hal/sh/dreamcast/current/ChangeLog
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/dreamcast/current/ChangeLog,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 ChangeLog
--- hal/sh/dreamcast/current/ChangeLog	26 May 2002 12:29:07 -0000	1.1.1.2
+++ hal/sh/dreamcast/current/ChangeLog	30 Apr 2004 07:56:00 -0000
@@ -1,3 +1,17 @@
+2004-04-30  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* cdl/hal_sh_sh7750_dreamcast.cdl: 
+	* src/boot.S: Add Dreamcast startup entry. fix bootup failed.
+
+
+2004-04-22  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* cdl/hal_sh_sh7750_dreamcast.cdl: typo fix.
+	
+2004-04-21  Yoshinori Sato <ysato@users.sourceforge.jp>
+
+	* include/plf_io.h: add macro "CYGARC_PCI_DMA_ADDRESS"
+
 2001-11-21  Jesper Skov  <jskov@redhat.com>
 
 	* cdl/hal_sh_sh7750_dreamcast.cdl: Added
Index: hal/sh/dreamcast/current/cdl/hal_sh_sh7750_dreamcast.cdl
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/dreamcast/current/cdl/hal_sh_sh7750_dreamcast.cdl,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 hal_sh_sh7750_dreamcast.cdl
--- hal/sh/dreamcast/current/cdl/hal_sh_sh7750_dreamcast.cdl	26 May 2002 12:29:07 -0000	1.1.1.2
+++ hal/sh/dreamcast/current/cdl/hal_sh_sh7750_dreamcast.cdl	30 Apr 2004 07:56:01 -0000
@@ -64,6 +64,7 @@
     requires      { CYGDAT_REDBOOT_SH_LINUX_BOOT_COMMAND_LINE == "mem=16M" }
 
     compile       hal_diag.c plf_misc.c dreamcast_pci.c fb_support.c
+    compile       -library=libextras.a boot.S
 
     implements    CYGINT_HAL_DEBUG_GDB_STUBS
     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
@@ -82,8 +83,8 @@
     cdl_component CYG_HAL_STARTUP {
         display       "Startup type"
         flavor        data
-        legal_values  "RAM"
-        default_value "RAM"
+        legal_values  {"RAM"}
+        default_value {"RAM"}
         no_define
         define -file system.h CYG_HAL_STARTUP
         description   "
Index: hal/sh/dreamcast/current/include/plf_io.h
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/dreamcast/current/include/plf_io.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- hal/sh/dreamcast/current/include/plf_io.h	26 May 2002 12:29:09 -0000	1.1.1.2
+++ hal/sh/dreamcast/current/include/plf_io.h	21 Apr 2004 16:53:58 -0000	1.2
@@ -117,6 +117,8 @@
 #define HAL_PCI_PHYSICAL_MEMORY_BASE    0x00000000
 #define HAL_PCI_PHYSICAL_IO_BASE        0x00000000
 
+#define CYGARC_PCI_DMA_ADDRESS(_x_) ((_x_) & 0x1fffffff)
+
 //-----------------------------------------------------------------------------
 #endif // ifndef CYGONCE_PLF_IO_H
 // End of plf_io.h
Index: hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.ldi
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.ldi,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.ldi	21 Apr 2002 16:58:49 -0000	1.1.1.1
+++ hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.ldi	21 Apr 2004 17:01:17 -0000	1.2
@@ -12,6 +12,7 @@
 SECTIONS
 {
     SECTIONS_BEGIN
+    SECTION_entry (ram, 0x8c010000, LMA_EQ_VMA)
     SECTION_vectors (ram, 0x8c010200, LMA_EQ_VMA)
     SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
     SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
Index: hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.mlt
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.mlt,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.mlt	21 Apr 2002 16:58:49 -0000	1.1.1.1
+++ hal/sh/dreamcast/current/include/pkgconf/mlt_sh_sh7750_dreamcast_ram.mlt	21 Apr 2004 17:01:17 -0000	1.2
@@ -1,5 +1,6 @@
 version 0
 region ram 8c000000 1000000 0 !
+section entry 0 1 0 1 1 1 1 1 8c010000 8c010000 text text !
 section vectors 0 1 0 1 1 1 1 1 8c010200 8c010200 text text !
 section text 0 4 0 1 0 1 0 1 fini fini !
 section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
Index: hal/sh/dreamcast/current/src/boot.S
===================================================================
RCS file: hal/sh/dreamcast/current/src/boot.S
diff -N hal/sh/dreamcast/current/src/boot.S
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ hal/sh/dreamcast/current/src/boot.S	30 Apr 2004 07:56:01 -0000
@@ -0,0 +1,15 @@
+#------------------------------------------------------------------------------
+# Dreamcast CD-ROM Boot entry
+
+#include <cyg/hal/arch.inc>
+	
+	.section .entry,"ax"
+	.org	0
+FUNC_START(_dc_entry)
+	mov.l	$reset,r0
+	jmp	@r0
+	nop
+	.align	2
+$reset:
+	.long	CYG_LABEL_DEFN(_reset)
+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]