From: "Ling Su" <lingsu@palmmicro.com>
To: "Jonathan Larmour" <jlarmour@redhat.com>
Cc: <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] Re: Problem on allocate PCI memory space...
Date: Thu, 14 Sep 2000 17:53:00 -0000 [thread overview]
Message-ID: <004a01c01eaf$860309b0$1601a8c0@crusoe> (raw)
In-Reply-To: <39C14861.B9617622@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]
Ling Su wrote,
> > Could you please do me a favor? As you may know, I still have trouble to
use
> > my tool chain with "-O2" option. I believe Nick's point is correct,
since
> > the RAM startup code doesn't initlize the MMU. I have tried to include
the
> > hal_mmu_init in the RAM startup code, the progrem just hang somewhere,
it is
> > not so good to initialize the TLB twice, I guess. I think to rebuild the
> > gdbstub will be a better solution, I hope I can have a optimized stub
code,
> > could you help me build me and send me a gzipped code privately? Thanks
a
> > lot!
>
Jifl Wrote,
> First it would surely be better to rebuild the stubs without -O0 just to
> see if it works. Is there any requirement for the stubs to be optimized?
Do
> they not fit otherwise?
>
> Once we _know_ you have code that works, then you can send the patches,
and
> I'll gladly build you a new stub image in return :-).
>
Hi, Dear Jifl,
I attached the small patch for the PCI bus access. I tested using the old
stub rom provided in eCos-1.3.1 release, now I can access my PCI card
without any problem. Basically I just add the hal_mmu_init even for RAM
startup program.
I still have trouble to build a stub rom, I guess it is due to my toolchain
problem. If I build one using "-O2" option, it simply doesn't not response,
but I am sure it is alive since I can observe its PCI access to serial port.
But it can not connect to GDB. If I build with "-O0" option, it can
connected, but the strange thing is it display a different thing when I type
"target remote /dev/ttyS0" from the original stub ROM. Even worse, I simply
complain can not find 0x8000xxxx to start the program. If you have interests
to see the problem, I can send you a detail log.
If you have some time, can you build a stub rom for me after applying the
patch, thanks a lot.
Best Regards,
-Ling
[-- Attachment #2: patch_pci --]
[-- Type: text/x-diff, Size: 3333 bytes --]
Index: hal/mips/arch/current/src/vectors.S
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/mips/arch/current/src/vectors.S,v
retrieving revision 1.20
diff -u -r1.20 vectors.S
--- vectors.S 2000/08/25 17:33:03 1.20
+++ vectors.S 2000/09/15 00:38:27
@@ -51,7 +51,8 @@
# include <pkgconf/kernel.h>
#endif
-#include <cyg/hal/arch.inc>
+#include <cyg/hal/arch.inc>
+#include <cyg/hal/platform.inc>
#include <cyg/hal/hal_arch.h>
#ifdef at
Index: hal/mips/vrc4373/current/include/platform.inc
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/mips/vrc4373/current/include/platform.inc,v
retrieving revision 1.1
diff -u -r1.1 platform.inc
--- platform.inc 2000/03/28 14:11:31 1.1
+++ platform.inc 2000/09/15 00:38:29
@@ -155,7 +155,7 @@
# Since the setup code must work only in registers, we do not do a subroutine
# linkage here, instead the setup code knows to jump back here when finished.
-#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
+#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM) || defined(CYG_HAL_STARTUP_RAM)
.macro hal_mmu_init
.extern hal_mmu_setup
@@ -174,7 +174,7 @@
# MEMC macros.
#
-#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
+#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
.macro hal_memc_init
.extern hal_memc_setup
Index: hal/mips/vrc4373/current/include/plf_io.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/mips/vrc4373/current/include/plf_io.h,v
retrieving revision 1.1
diff -u -r1.1 plf_io.h
--- plf_io.h 2000/03/28 14:11:32 1.1
+++ plf_io.h 2000/09/15 00:38:29
@@ -67,7 +67,7 @@
// This is where the PCI spaces are mapped in the CPU's (virtual)
// address space.
-#define HAL_PCI_PHYSICAL_MEMORY_BASE 0xC0000000
+#define HAL_PCI_PHYSICAL_MEMORY_BASE 0x40000000
#define HAL_PCI_PHYSICAL_IO_BASE 0xAC000000
//-----------------------------------------------------------------------------
@@ -176,7 +176,7 @@
// Resources
// Map PCI device resources starting from these addresses in PCI space.
-#define HAL_PCI_ALLOC_BASE_MEMORY 0
+#define HAL_PCI_ALLOC_BASE_MEMORY 0x90000000
#define HAL_PCI_ALLOC_BASE_IO 0
// Translate the PCI interrupt requested by the device (INTA#, INTB#,
Index: hal/mips/vrc4373/current/src/platform.S
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/mips/vrc4373/current/src/platform.S,v
retrieving revision 1.2
diff -u -r1.2 platform.S
--- platform.S 2000/09/01 13:45:26 1.2
+++ platform.S 2000/09/15 00:38:31
@@ -275,7 +275,7 @@
## Much of this code is taken from the PMON sources, hence it does not fully
## conform to our normal coding conventions.
-#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
+#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM) || defined(CYG_HAL_STARTUP_RAM)
## DEFINITIONS FOR THE TLB SUPPORT
@@ -301,7 +301,7 @@
#define TLBLO_UNCACHED (CFG_C_UNCACHED<<TLBLO_CSHIFT)
#define PAGE_SIZE 0x01000000
#define PADDR_INC 0x02000000
-#define NUMB_PG 8
+#define NUMB_PG 16
.text
next prev parent reply other threads:[~2000-09-14 17:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-11 21:05 [ECOS] Fw: [ECOS] How to access PCI memory(HELP) Ling Su
2000-09-12 2:56 ` [ECOS] " Nick Garnett
2000-09-12 11:07 ` Ling Su
2000-09-13 3:09 ` Nick Garnett
2000-09-12 15:52 ` [ECOS] Anyway to access the 7 segment display on NEC vrc4373 board? Ling Su
2000-09-13 11:58 ` [ECOS] " Jonathan Larmour
2000-09-12 18:31 ` [ECOS] Problem on allocate PCI memory space Ling Su
2000-09-13 3:19 ` [ECOS] " Nick Garnett
2000-09-13 12:40 ` Ling Su
2000-09-13 17:41 ` Ling Su
2000-09-14 3:32 ` Nick Garnett
2000-09-14 3:43 ` Andrew Lunn
2000-09-14 14:46 ` Ling Su
2000-09-14 14:51 ` Jonathan Larmour
2000-09-14 17:53 ` Ling Su [this message]
2000-09-14 3:08 ` Nick Garnett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004a01c01eaf$860309b0$1601a8c0@crusoe' \
--to=lingsu@palmmicro.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=jlarmour@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).