Wolfgang Denk | 1 Apr 2007 01:04
Picon
Picon
Favicon

Re: PPC login puzzle

In message <9F3F0A752CAEBE4FA7E906CC2FBFF57C069B6B <at> MERCURY.inside.istor.com> you wrote:
>
> The question is:
>  
> "What are the various things that might cause one toaster to be able to login from a telnet session and
another, very similar one to not be able to do this?"

Different settings of "disable = ..." in the /etc/xinetd.d/telnet
config file?

Best regards,

Wolfgang Denk

--

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd <at> denx.de
"It is easier to port a shell than a shell script."      - Larry Wall
Steve Iribarne (GMail | 1 Apr 2007 20:00
Picon

Re: PPC login puzzle

On 3/31/07, Charles Krinke <ckrinke <at> istor.com> wrote:

Seems to me thing you can do is find out why the telnet session is being rejected.  Have you done an ethernet capture?

<snip....>
It is interesting that 'telnet localhost' fails in a similar way as telnet across the


Ok.. This tells me it's a telnet problem.  So either the telentd isn't starting up properly on this system OR there is some weird rights thing that you have setup differently on both systems.

Are you using anything like busybox?  Which telnet are you using.  It's killing me because I know I have run into this same problem.  But I am old and I forgot what I did.  I had this problem about 3 years ago.. ugh.

To me it was something with securetty or the like.  There is a config file that allows telnet or not.  Another thing to try is to load telnetd with more options.  I think there is "-a debug" you can turn on and that will turn on the authentication debugging... "-D report" should also help you out.

I'm sure it has something to do with root not being able to logon or maybe it's the blank password.  Create a password for root and see if that helps.

-stv
 

network, and I appreciate your kind hints, especially about the log file and /var/log/syslog helps a bit on this problem.

When trying to telnet accross the network, syslog says

in.telnetd[]: connect from x.x.x.x

But entering root doesnt work and the host then says:
sff1 login: root
Login incorrect

There are no further errors on the 8541. When trying to 'telnet localhost', syslog says

in.telnetd []: connect from 127.0.0.1

But neither completes the login, so although there is a clue here, the logical path to conclusion is still escaping me a little bit.

I can see that both targets have the same /etc/xinted.d/telnet file and it contains:

service telnet
{
flags  = REUSE
socket_type = stream
protocol = tcp
wait  = no
user  = root
server  = /usr/sbin/in.telnetd
server_args = -h
log_on_failure += USERID
}

which I think is reasonable in this situation. So, this begs the question of what other things still bear on this type of problem. Again, I appreciate your taking the time to help me understand a bit more of how this fits together.

Charles





--
/*
* Steve Iribarne
* Software Engineer
* (aka Grunt)
*/
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded <at> ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Eric Nuckols | 2 Apr 2007 00:31
Picon
Favicon

Re: PPC login puzzle


>
>Are you using anything like busybox?  Which telnet are you using.  It's
>killing me because I know I have run into this same problem.  But I am old
>and I forgot what I did.  I had this problem about 3 years ago.. ugh.
>
>To me it was something with securetty or the like.  There is a config file
>that allows telnet or not.  Another thing to try is to load telnetd with
>more options.  I think there is "-a debug" you can turn on and that will
>turn on the authentication debugging... "-D report" should also help you
>out.

I had a problem like this with telnet on an older linux with busybox and 
tiny login...

my problem had to do with making sure I had /dev/ptyX created...

so I just did:

cd /dev
MAKEDEV pty

not sure if that's your problem, but it's just something else to look into..

-Eric

_________________________________________________________________
Live Search Maps – find all the local information you need, right when you 
need it. http://maps.live.com/?icid=hmtag2&FORM=MGAC01

_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded <at> ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Didier Kryn | 2 Apr 2007 11:15
Picon
Picon

Re: Reading and writing from/to VME device

    Konstantin, I reproduced your ioctl() problem with the attached 
program. The conclusion is that the only valid size and base parameters 
for A16 are windowSizeL=0x10000 and xlatedAddrL=0. This means the A16 
space can only be mapped as a whole. What you observed with  
xlatedAddrL=0x10100000 is that the ioctl(), gently masks the irrelevant 
high order bits.

    Best regards.
    Didier

Didier Kryn a écrit :
>
>
>     Now, for the ioctl problem, Konstantin, did you try to set 
> xlatedAddrL to zero. The Tsio148, and therefore the driver, enforce 
> alignment on  rather big blocks and maybe misalignment is the cause of 
> the "invalid argument" error. I see no reason not to map the entire 
> A16, A24 or CR/CSR spaces. For the others, of course, you are limited 
> by the size of the cpu's address space.
>
>     I will eventually try to reproduce your ioctl problem next week. 
> Hopping you will solve it before :-) .
>
>     Best regards. Didier
>
> Konstantin Boyanov said:
>> Hi again,
>>
>> Thank you once again for presenting the VME world to me :)
>>
>> >Looks like you're reading something.  Address 0x10100000 is larger than
>> >a 24 bit address.  Perhaps you should be using A32 transfers instead of
>> >A24?
>>
>> No, no, I need to do A16 access, thats the only way to read the 
>> control registers. Form here comes also my confusion - I thought that 
>> when I'm reading CS/CSR register I need to do it in CSR address 
>> space. So no algorithms for geographical location of boards are 
>> needed in my case I guess.
>> Actually the base address of CSR on the board is 0xA000 (10100000 is 
>> the first byte of the address selection in inary, shame on me :( ). 
>> But when I try to configure it with outWinCfgADC.zlatedAddrL = 
>> 0xA000, when I run the programm I get an errno 29 (Invalid argument) 
>> from ioctl(). In fact if I set the xlatedAddrL to some value smaller 
>> that 0x10000 I get this error. Here's my most recent configuration:
>>
>>     outWinCfgADC.windowNbr           = 0;
>>     outWinCfgADC.windowEnable      = 1;
>>     outWinCfgADC.wrPostEnable      = 0;
>>     outWinCfgADC.userAccessType  = VME_SUPER;
>>     outWinCfgADC.dataAccessType  = VME_DATA;
>>     outWinCfgADC.windowSizeL       = 0x10000;
>>     outWinCfgADC.xferProtocol         = VME_SCT;
>>     outWinCfgADC.addrSpace           = VME_A16;
>>     outWinCfgADC.maxDataWidth     = VME_D16;
>>     outWinCfgADC.xlatedAddrL          = 0x10000000;
>>
>> I think that 0x10000 for window size is big enough to encompass the 
>> whole A16 addressable space. With the 0x10000000 xlatedAddr I get no 
>> errors and read the desired registers when I increment this address 
>> to 0x1000A000. But nevertheless it seems strange to me that the 
>> device does not accept xlatedAddr lower that 0x10000. Maybe its due 
>> to the configuration of the VME controller?
>>
>
Didier Kryn | 2 Apr 2007 11:21
Picon
Picon

Re: Reading and writing from/to VME device

Didier Kryn a écrit :
>     Konstantin, I reproduced your ioctl() problem with the attached 
> program. The conclusion is that the only valid size and base parameters 
> for A16 are windowSizeL=0x10000 and xlatedAddrL=0. This means the A16 
> space can only be mapped as a whole. What you observed with  
> xlatedAddrL=0x10100000 is that the ioctl(), gently masks the irrelevant 
> high order bits.
>
>     Best regards.
>     Didier
>   
    Oops! I forgot the attachment...
Attachment (test148.c): text/x-csrc, 1554 bytes
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded <at> ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Andrea Galbusera | 2 Apr 2007 11:29
Picon

RE: Post-boot PCI bus rescan

Hi Arvid,
sorry for very very late reply... I had to collect a few ideas that I
hope could be useful to you.

First let me state that we didn't reach a completely clean solution to
the PCI rescan issue yet. I have been mainly experimenting on the topic.
Let me share my results...

I had reasonably good result in getting "basic" rescan to work: this can
be done at least with two methods:

1. Exploting the fake-php module already included in vanilla kernels
(see drivers/pci/hotplug/fakephp.c). If you already have a probed device
on the bus (I have the bridge to the CPU in my system) you can fire the
rescan, after configuring your fpga, by "re-powering" the already
available device. This is done by issuing from shell: 

echo 1 > /sys/bus/pci/slot/≤PCI-device-ID>/power

I found documentation about fakephp in mailinglist archives by deeply
googlein' on the subject.

NOTE: to enable the choice of this module in kconfig I had to add the
following line to arch/ppc/Kconfig

source "drivers/pci/hotplug/Kconfig"

In my kernel (2.6.16) this is available in arch/powerpc but not in
arch/ppc. Don't know if this is wanted or not. This step should not be
required if you are using ARCH=powerpc instead. After enabling the
choice the module is built ok with my kernel.

After adding the line above you can find "Fake PCI hotplug driver" in
kconfig under Bus Options / PCI Hotplug support.

2. Using the rescan procedure contributed by John Carlson. This is
basically a kernel module that issue a PCI bus rescan when you load it.
John helped me to port this module to 2.6.16 kernel API and I had more
or less the same result using this and fakephp. 

I said these two methods would bring only "basic" rescan. The main point
is that, as far as I can figure out, when bus scanning is done at boot,
the ppc platform specific code will start a lot of quirks, irq fixups
and resource remapping functions that will not be executed with the
"manual" rescan done by the methods listed above. As a result, the
config space for the pci device exposed by my fpga is sligtly different
from that I have by rebooting after configuring the fpga. I suppose I
can fix this later i.e. by using the setpci tool, but I don't have deep
enough understanding of all those platform specific fixups and didn't
get the same result of rebooting yet.

Hope this quite confused thoughts may help you implementing your rescan.
Please, keep me informed if you go further and get a cleaner solution.

Regaards,
Andrea

On Wed, 2007-03-21 at 17:32 +0100, Arvid Staub wrote:
> Hi there!
> 
> I'm very interested if you found a clean solution to the PCI rescan issue.
> We have a board in development here which should utilize such a mechanism as well - but it's not yet done.
it's a Taihu-like PPC405EP setup with the PCI bus connected to a Virtex-5 LXT FPGA.
> 
> can you point me to some information about the rescan in general?
> which PCI bridge and Buses do you use inside your FPGA?
> 
> thx & ciao,
> arvid
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: linuxppc-embedded-bounces+arvid.staub=mediornet.com <at> ozlabs.org
[mailto:linuxppc-embedded-bounces+arvid.staub=mediornet.com <at> ozlabs.org] Im Auftrag von Andrea Galbusera
> Gesendet: Mittwoch, 28. Februar 2007 12:41
> An: linuxppc-embedded <at> ozlabs.org
> Betreff: Post-boot PCI bus rescan
> 
> Hi all,
> I'm working on a mpc5200 based custom board. This is basically a
> Lite5200 like platform. I have an onboard FPGA that I configure from
> userspace linux with the required "firmware". Only after configuration
> the FPGA shows its PCI device "nature".
> I have the problem to make linux correctly see the PCI device, in order
> to load my device driver and go on running applications.
> 
> First solution we implemented was to go through a reboot (without
> powering off the FPGA, of course) and consequent boot-time rescan of the
> bus. Works fine but performance is an issue here.
> 
> I then started digging around and found some PCI rescan solution (mainly
> fakephp from the kernel tree and a rescan routine by John Carlson). Both
> these can detect the device and correctly initialize /sys entries. 
> 
> Unfortunately my PCI device config space appears to be different from
> the one I have with the reboot approach. I then compiled my kernel with
> full PCI debugging enabled and got the log attached below. As far as I
> can understand during boot linux calls some fixups on irqs and resouces
> for my PCI device (0000:00:18.0). Those seem to be called by
> pcibios_init() in arch/ppc/kernel/pci.c.
> 
> My question is: am I on the right way to figure out why PCI device
> config space appear different with the two approaches? What is the logic
> behind those fixups? Can I call them again after boot i.e. from my
> rescan module?
> 
> Thanks in advance for any kind help
> Andrea
> 
> 
> ----------------------------------------
> Boot time PCI debug messages if I reboot
> ----------------------------------------
> 
> > PCI: Probing PCI hardware
> > DEV: registering device: ID = 'pci0000:00'
> > kobject pci0000:00: registering. parent: <NULL>, set: devices
> > kobject_uevent
> > CLASS: registering class device: ID = '0000:00'
> > kobject 0000:00: registering. parent: pci_bus, set: class_obj
> > kobject_uevent
> > fill_kobj_path: path = '/class/pci_bus/0000:00'
> > class_uevent - name = 0000:00
> > PCI: Scanning bus 0000:00
> > PCI: Found 0000:00:18.0 [1172/abcd] 00ffed 00
> > PCI: Calling quirk c00098bc for 0000:00:18.0
> > PCI: Calling quirk c010d400 for 0000:00:18.0
> > PCI: Found 0000:00:1a.0 [1057/5809] 000680 00
> > PCI: Calling quirk c00098bc for 0000:00:1a.0
> > PCI: Calling quirk c010d400 for 0000:00:1a.0
> > PCI: Fixups for bus 0000:00
> > PCI: Bus scan for 0000:00 returning with max=00
> > DEV: registering device: ID = '0000:00:18.0'
> > kobject 0000:00:18.0: registering. parent: pci0000:00, set: devices
> > kobject_uevent
> > fill_kobj_path: path = '/devices/pci0000:00/0000:00:18.0'
> > bus pci: add device 0000:00:18.0
> > DEV: registering device: ID = '0000:00:1a.0'
> > kobject 0000:00:1a.0: registering. parent: pci0000:00, set: devices
> > kobject_uevent
> > fill_kobj_path: path = '/devices/pci0000:00/0000:00:1a.0'
> > bus pci: add device 0000:00:1a.0
> > PCI: fixup irq: (0000:00:18.0) got 1
> > PCI: fixup irq: (0000:00:1a.0) got 0
> > PCI: bridge rsrc 0..ffffff (100), parent c027a1fc
> > PCI: bridge rsrc 80000000..9fffffff (1200), parent c027a1e0
> > PCI: bridge rsrc a0000000..afffffff (200), parent c027a1e0
> >   got res [80000000:80000fff] bus [80000000:80000fff] flags 1208 for
> BAR 0 of 0000:00:18.0
> > PCI: moved device 0000:00:18.0 resource 0 (1208) to 80000000
> >   got res [80800000:80ffffff] bus [80800000:80ffffff] flags 1208 for
> BAR 1 of 0000:00:18.0
> > PCI: moved device 0000:00:18.0 resource 1 (1208) to 80800000
> >   got res [a0000000:a0003fff] bus [a0000000:a0003fff] flags 200 for
> BAR 2 of 0000:00:18.0
> > PCI: moved device 0000:00:18.0 resource 2 (200) to a0000000
> >   got res [a0040000:a007ffff] bus [a0040000:a007ffff] flags 200 for
> BAR 0 of 0000:00:1a.0
> > PCI: moved device 0000:00:1a.0 resource 0 (200) to a0040000
> 
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded <at> ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
Vitaly Bordug | 2 Apr 2007 12:51

Re: MDIO bus description and bitbang property

On Fri, 30 Mar 2007 23:15:47 +0400
"Matvejchikov Ilya" <matvejchikov <at> gmail.com> wrote:

> Hi all!
> 
> As I see it mpc82xx MDIO description given in DTS file contains several
> inaccuracies concerning 'bitbang' property. Thus, 'bitbang' is the property
> of MDIO bus, but not a device on the bus (PHY for ex.). I have changed
> fs_enet_of_init() a little bit. Does anyone require such a patch?

Sorry but I don't quite follow the logic upper. If you have a patch, pls send it to me CC this list and 
we'll get it discussed. 

Thanks.
--

-- 
Sincerely, 
Vitaly
Vitaly Bordug | 2 Apr 2007 12:57

Re: Allocating (placing) BufferDescriptors in Dual-Port RAM (CPM2)

On Sun, 01 Apr 2007 00:26:19 +0200
Robert Staven <robert <at> stopthespam_remove.staven.no> wrote:

> It's probably basic knowledge, but I still having trouble figure it 
> out.... anyway:
> 
> Working with a SCC in a CPM (MPC8250 running linux 2.6.13-AM)
> 
> I need to place Buffer Descriptors (BD) in the Dual-Port RAM (DPRAM) 
> somewhere....
> But two FCCs, SMC1 and SCC1 are in use, and they might use some part of 
> the DPRAM.
> 
... cpm_dpalloc() will work for you I guess.

> Is there any way to figure out what part of the DPRAM thats free?
> And how to reserve the part I need?
> 
> Robert
> 
> (SCC3 parameter RAM are at 0x8200 in DPRAM so I just place a struct 
> there and assume that linux stays away from this memory area and don't 
> get mad cause I use it without allocating it. Or have I got this wrong to?)
> 

I'd suggest to look at the implemented 8260-like stuff and platform device approach
(syslib/pq2_devices.c). Whole immr including DPRAM are is io_block_mapped early by the platform code so
you can do stuff in brackets I guess, but that might look weird and be more complex to debug.

Thanks.

--

-- 
Sincerely, 
Vitaly
powerpc440 | 2 Apr 2007 16:25

vbetool and x86emu compile problem

Hi,

I have ppc405ep custom board with PCI slot. In the slot is a standard
PCI Graphic adapter (Radeon 7000). Of course the card is not low-level
initialized and I can't obtain any image, neither with Kernel's frame
buffer driver nor xorg's radeon driver. With vbetool is possible to
enable the video BIOS of the graphic adapter. My problem is that, I
can't compile vbetool on my  PPC board, seems to be platform
compatibility problems, also with x86emu key enabled. I think that,
vbetool till now is only for x86, and AMD 64bit platforms suitable.
Have somebody succeed to compile vbetools on PPC platform and when yes -
how?
Are there another possibilities to low-level initialize the video card,
may be still in u-boot or Linux kernel?

Thank you in advance!

Best regards,
Zhivko Yordanov
Domen Puncer | 3 Apr 2007 10:46

Re: [PATCH] icecube/lite5200b: wakeup from low-power support

U-Boot part of Lite5200b low power mode support.
Puts SDRAM out of self-refresh and transfers control to
address saved at physical 0x0.

---
On 26/03/07 10:08 -0600, Grant Likely wrote:
> On 3/15/07, Domen Puncer <domen.puncer <at> telargo.com> wrote:
> >U-Boot part of Lite5200b low power mode support.
> >Puts SDRAM out of self-refresh and transfers control to
> >address saved at physical 0x0.
> 
> This looks pretty straight forward.
> 
> My only comment is that psc2_4 is probably used as GPIO instead of
> power control by some users (The lite5200 is an eval board after all).
> Maybe wrap the code with #ifdef CONFIG_LITE5200B_PM (instead of
> CONFIG_LITE5200B) so that it can be easily compiled out.
> 
> Also, '//' style comments should be changed to '/* */'
> 
> Otherwise;
> Acked-by: Grant Likely <grant.likely <at> secretlab.ca>
> 

OK. This one should be better:

 Makefile                |    5 ++++
 board/icecube/icecube.c |   49 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

Index: u-boot.git/board/icecube/icecube.c
===================================================================
--- u-boot.git.orig/board/icecube/icecube.c
+++ u-boot.git/board/icecube/icecube.c
 <at>  <at>  -42,6 +42,53  <at>  <at> 
 #include "mt48lc16m16a2-75.h"
 # endif
 #endif
+
+#ifdef CONFIG_LITE5200B_PM
+/* u-boot part of low-power mode implementation */
+#define SAVED_ADDR (*(void **)0x00000000)
+#define PSC2_4 0x02
+
+void lite5200b_wakeup(void)
+{
+	unsigned char wakeup_pin;
+	void (*linux_wakeup)(void);
+
+	/* check PSC2_4, if it's down "QT" is signaling we have a wakeup
+	 * from low power mode */
+	*(vu_char *)MPC5XXX_WU_GPIO_ENABLE = PSC2_4;
+	__asm__ volatile ("sync");
+
+	wakeup_pin = *(vu_char *)MPC5XXX_WU_GPIO_DATA_I;
+	if (wakeup_pin & PSC2_4)
+		return;
+
+	/* acknowledge to "QT"
+	 * by holding pin at 1 for 10 uS */
+	*(vu_char *)MPC5XXX_WU_GPIO_DIR = PSC2_4;
+	__asm__ volatile ("sync");
+	*(vu_char *)MPC5XXX_WU_GPIO_DATA_O = PSC2_4;
+	__asm__ volatile ("sync");
+	udelay(10);
+
+	/* put ram out of self-refresh */
+	*(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x80000000;	/* mode_en */
+	__asm__ volatile ("sync");
+	*(vu_long *)MPC5XXX_SDRAM_CTRL |= 0x50000000;	/* cke ref_en */
+	__asm__ volatile ("sync");
+	*(vu_long *)MPC5XXX_SDRAM_CTRL &= ~0x80000000;	/* !mode_en */
+	__asm__ volatile ("sync");
+	udelay(10); /* wait a bit */
+
+	/* jump back to linux kernel code */
+	linux_wakeup = SAVED_ADDR;
+	printf("\n\nLooks like we just woke, transferring control to 0x%08lx\n",
+			linux_wakeup);
+	linux_wakeup();
+}
+#else
+#define lite5200b_wakeup()
+#endif
+
 #ifndef CFG_RAMBOOT
 static void sdram_start (int hi_addr)
 {
 <at>  <at>  -208,6 +255,8  <at>  <at>  long int initdram (int board_type)
 		__asm__ volatile ("sync");
 	}

+	lite5200b_wakeup();
+
 	return dramsize + dramsize2;
 }

Index: u-boot.git/Makefile
===================================================================
--- u-boot.git.orig/Makefile
+++ u-boot.git/Makefile
 <at>  <at>  -430,6 +430,7  <at>  <at>  inka4x0_config:	unconfig
 	 <at> $(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0

 lite5200b_config	\
+lite5200b_PM_config	\
 lite5200b_LOWBOOT_config:	unconfig
 	 <at> mkdir -p $(obj)include
 	 <at> mkdir -p $(obj)board/icecube
 <at>  <at>  -438,6 +439,10  <at>  <at>  lite5200b_LOWBOOT_config:	unconfig
 	 <at>  echo "... DDR memory revision"
 	 <at>  echo "#define CONFIG_MPC5200"		>>$(obj)include/config.h
 	 <at>  echo "#define CONFIG_LITE5200B"	>>$(obj)include/config.h
+	 <at> [ -z "$(findstring _PM_,$ <at> )" ] || \
+		{ echo "#define CONFIG_LITE5200B_PM"	>>$(obj)include/config.h ; \
+		  echo "... with power management (low-power mode) support" ; \
+		}
 	 <at> [ -z "$(findstring LOWBOOT_,$ <at> )" ] || \
 		{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \
 		  echo "... with LOWBOOT configuration" ; \

Gmane