This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
EDB7312 - Linux booting
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 06 Feb 2003 17:25:23 -0700
- Subject: EDB7312 - Linux booting
Index: hal/arm/arch/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/arch/current/ChangeLog,v
retrieving revision 1.81
diff -u -5 -p -r1.81 ChangeLog
--- hal/arm/arch/current/ChangeLog 31 Jan 2003 16:45:57 -0000 1.81
+++ hal/arm/arch/current/ChangeLog 7 Feb 2003 00:17:51 -0000
@@ -1,5 +1,9 @@
+2003-02-06 Gary Thomas <gary@mlbassoc.com>
+
+ * src/redboot_linux_exec.c: Make sure RAM description is sane.
+
2003-01-31 Mark Salter <msalter@redhat.com>
* src/hal_syscall.c (hal_syscall_handler): Let generic syscall code
handle exit.
Index: hal/arm/arch/current/src/redboot_linux_exec.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/arch/current/src/redboot_linux_exec.c,v
retrieving revision 1.5
diff -u -5 -p -r1.5 redboot_linux_exec.c
--- hal/arm/arch/current/src/redboot_linux_exec.c 22 Jan 2003 04:55:10 -0000 1.5
+++ hal/arm/arch/current/src/redboot_linux_exec.c 7 Feb 2003 00:17:53 -0000
@@ -7,10 +7,11 @@
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas
//
// eCos 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 or (at your option) any later version.
//
@@ -304,17 +305,19 @@ do_exec(int argc, char *argv[])
params = (struct tag *)((long *)params + params->hdr.size);
/* Next ATAG_MEM. */
params->hdr.size = (sizeof(struct tag_mem32) + sizeof(struct tag_header))/sizeof(long);
params->hdr.tag = ATAG_MEM;
- params->u.mem.start = CYGARC_PHYSICAL_ADDRESS(CYGMEM_REGION_ram);
/* Round up so there's only one bit set in the memory size.
* Don't double it if it's already a power of two, though.
*/
params->u.mem.size = 1<<hal_msbindex(CYGMEM_REGION_ram_SIZE);
if (params->u.mem.size < CYGMEM_REGION_ram_SIZE)
params->u.mem.size <<= 1;
+ params->u.mem.start = CYGARC_PHYSICAL_ADDRESS(CYGMEM_REGION_ram);
+ // Linux doesn't like physical RAM to start on odd boundary
+ params->u.mem.start &= ~(params->u.mem.size-1);
params = (struct tag *)((long *)params + params->hdr.size);
if (ramdisk_addr_set) {
params->hdr.size = (sizeof(struct tag_initrd) + sizeof(struct tag_header))/sizeof(long);
params->hdr.tag = ATAG_INITRD2;
params->u.initrd.start = CYGARC_PHYSICAL_ADDRESS(ramdisk_addr);
Index: hal/arm/edb7xxx/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/edb7xxx/current/ChangeLog,v
retrieving revision 1.38
diff -u -5 -p -r1.38 ChangeLog
--- hal/arm/edb7xxx/current/ChangeLog 6 Dec 2002 15:04:03 -0000 1.38
+++ hal/arm/edb7xxx/current/ChangeLog 7 Feb 2003 00:23:19 -0000
@@ -1,5 +1,14 @@
+2003-02-06 Gary Thomas <gary@mind.be>
+
+ * misc/edb7312_redboot_ROMRAM.ecm:
+ * src/edb7xxx_misc.c:
+ * include/plf_io.h:
+ * include/hal_platform_setup.h:
+ * cdl/hal_arm_edb7xxx.cdl: Add support for booting Linux by defining
+ CYGARC_PHYSICAL_ADDRESS().
+
2002-12-06 Gary Thomas <gthomas@ecoscentric.com>
* misc/edb7312_redboot_ROMRAM.ecm:
* misc/edb7312_redboot_ROM.ecm:
* misc/edb7312_redboot_RAM.ecm:
Index: hal/arm/edb7xxx/current/cdl/hal_arm_edb7xxx.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/edb7xxx/current/cdl/hal_arm_edb7xxx.cdl,v
retrieving revision 1.15
diff -u -5 -p -r1.15 hal_arm_edb7xxx.cdl
--- hal/arm/edb7xxx/current/cdl/hal_arm_edb7xxx.cdl 2 Aug 2002 12:59:41 -0000 1.15
+++ hal/arm/edb7xxx/current/cdl/hal_arm_edb7xxx.cdl 6 Feb 2003 21:02:37 -0000
@@ -7,10 +7,11 @@
# ====================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2003 Gary Thomas <gary@mind.be>
##
## eCos 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 or (at your option) any later version.
##
@@ -68,11 +69,15 @@ CL-PS7111 and EP7xxx based development b
implements CYGINT_HAL_SUPPORTS_MMU_TABLES
define_proc {
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_edb7xxx.h>"
+ puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 131"
+ puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"
}
+
+ requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xC0038000 }
cdl_option CYGHWR_HAL_ARM_EDB7XXX_VARIANT {
display "Cirrus Logic processor variant"
flavor data
legal_values { "CL_PS7111" "EP7209" "EP7211" "EP7212" "EP7312" }
Index: hal/arm/edb7xxx/current/include/hal_platform_setup.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/edb7xxx/current/include/hal_platform_setup.h,v
retrieving revision 1.14
diff -u -5 -p -r1.14 hal_platform_setup.h
--- hal/arm/edb7xxx/current/include/hal_platform_setup.h 23 May 2002 23:01:58 -0000 1.14
+++ hal/arm/edb7xxx/current/include/hal_platform_setup.h 7 Feb 2003 00:18:56 -0000
@@ -10,10 +10,11 @@
//=============================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas <gary@mind.be>
//
// eCos 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 or (at your option) any later version.
//
@@ -121,11 +122,11 @@
#define SRAM_PA 0x60000000
#define IO_LA_START 0x80000000
#define IO_LA_END 0x8000f000
#define IO_PA 0x80000000
-
+#ifndef _CYGHWR_LAYOUT_ONLY
// Define startup code [macros]
#if defined(CYGSEM_HAL_INSTALL_MMU_TABLES)
#ifdef CYGHWR_HAL_ARM_EDB7XXX_VARIANT_CL_PS7111 // CL7111, 710 processor
.macro MMU_INITIALIZE
@@ -551,9 +552,10 @@ _phys_store_end:
#else // CYGSEM_HAL_INSTALL_MMU_TABLES
#define PLATFORM_SETUP1
#endif
+#endif //_CYGHWR_LAYOUT_ONLY
/*---------------------------------------------------------------------------*/
/* end of hal_platform_setup.h */
#endif /* CYGONCE_HAL_PLATFORM_SETUP_H */
Index: hal/arm/edb7xxx/current/include/plf_io.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/edb7xxx/current/include/plf_io.h,v
retrieving revision 1.2
diff -u -5 -p -r1.2 plf_io.h
--- hal/arm/edb7xxx/current/include/plf_io.h 23 May 2002 23:01:59 -0000 1.2
+++ hal/arm/edb7xxx/current/include/plf_io.h 7 Feb 2003 00:19:34 -0000
@@ -10,10 +10,11 @@
//=============================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas <gary@mind.be>
//
// eCos 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 or (at your option) any later version.
//
@@ -52,9 +53,15 @@
//
//####DESCRIPTIONEND####
//
//===========================================================================*/
+#include <pkgconf/hal.h>
+#include <pkgconf/system.h>
+#include CYGBLD_HAL_PLATFORM_H
#include <cyg/hal/hal_edb7xxx.h>
+
+extern unsigned long _edb7xxx_physical_address(unsigned long addr);
+#define CYGARC_PHYSICAL_ADDRESS(x) _edb7xxx_physical_address((unsigned long) x)
#endif // CYGONCE_HAL_ARM_EDB7XXX_PLF_IO_H
// EOF plf_io.h
Index: hal/arm/edb7xxx/current/misc/edb7312_redboot_ROMRAM.ecm
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/edb7xxx/current/misc/edb7312_redboot_ROMRAM.ecm,v
retrieving revision 1.2
diff -u -5 -p -r1.2 edb7312_redboot_ROMRAM.ecm
--- hal/arm/edb7xxx/current/misc/edb7312_redboot_ROMRAM.ecm 6 Dec 2002 15:04:07 -0000 1.2
+++ hal/arm/edb7xxx/current/misc/edb7312_redboot_ROMRAM.ecm 7 Feb 2003 00:20:25 -0000
@@ -15,17 +15,18 @@ cdl_configuration eCos {
package -hardware CYGPKG_HAL_ARM_EDB7XXX current ;
package -hardware CYGPKG_DEVS_ETH_ARM_EDB7XXX current ;
package -hardware CYGPKG_DEVS_ETH_CL_CS8900A current ;
package -hardware CYGPKG_IO_SERIAL_ARM_EDB7XXX current ;
package -hardware CYGPKG_DEVS_FLASH_EDB7XXX current ;
- package -hardware CYGPKG_DEVS_FLASH_STRATA current ;
package -template CYGPKG_HAL current ;
package -template CYGPKG_INFRA current ;
package -template CYGPKG_REDBOOT current ;
package -template CYGPKG_ISOINFRA current ;
package -template CYGPKG_LIBC_STRING current ;
package -template CYGPKG_NS_DNS current ;
+ package -template CYGPKG_CRC current ;
+ package -hardware CYGPKG_DEVS_FLASH_STRATA current ;
package CYGPKG_IO_FLASH current ;
package CYGPKG_IO_ETH_DRIVERS current ;
package CYGPKG_COMPRESS_ZLIB current ;
};
@@ -71,14 +72,26 @@ cdl_component CYG_HAL_STARTUP {
cdl_component CYGBLD_BUILD_REDBOOT {
user_value 1
};
+cdl_option CYGBLD_BUILD_REDBOOT_WITH_EXEC {
+ user_value 1
+};
+
cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
user_value 0x00040000
};
+cdl_option CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG {
+ user_value 1
+};
+
+cdl_option CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT {
+ inferred_value 0xC0038000
+};
+
cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
inferred_value 1 <cyg/libc/string/string.h>
};
cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER {
@@ -103,10 +116,6 @@ cdl_option CYGBLD_ISO_DNS_HEADER {
cdl_option CYGPKG_NS_DNS_BUILD {
inferred_value 0
};
-
-cdl_option CYGBLD_BUILD_REDBOOT_WITH_EXEC {
- user_value 0
-};
Index: hal/arm/edb7xxx/current/src/edb7xxx_misc.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/arm/edb7xxx/current/src/edb7xxx_misc.c,v
retrieving revision 1.14
diff -u -5 -p -r1.14 edb7xxx_misc.c
--- hal/arm/edb7xxx/current/src/edb7xxx_misc.c 23 May 2002 23:02:01 -0000 1.14
+++ hal/arm/edb7xxx/current/src/edb7xxx_misc.c 7 Feb 2003 00:19:50 -0000
@@ -7,10 +7,11 @@
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003 Gary Thomas <gary@mind.be>
//
// eCos 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 or (at your option) any later version.
//
@@ -555,9 +556,25 @@ void hal_interrupt_configure(int vector,
}
void hal_interrupt_set_level(int vector, int level)
{
// No interrupts are configurable on this hardware
+}
+
+#define _CYGHWR_LAYOUT_ONLY
+#include <cyg/hal/hal_platform_setup.h>
+
+unsigned long
+_edb7xxx_physical_address(unsigned long addr)
+{
+ unsigned long res;
+
+ if (addr < DRAM_LA_END) {
+ res = addr + DRAM_PA;
+ } else {
+ res = addr | 0xC0000000;
+ }
+ return res;
}
/*------------------------------------------------------------------------*/
// EOF hal_misc.c
--
------------------------------------------------------------
Gary Thomas |
MLB Associates | Consulting for the
+1 (970) 229-1963 | Embedded world
http://www.mlbassoc.com/ |
email: <gary@mlbassoc.com> |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------