[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] xenet_FifoSend(struct sk_buff *orig_skb,structnet_device*dev)
Hi,
Sorry for that - rushing too much.
Here's a real one - I tested it this time then built it into the kernel and
it seems to work after replacing the call to memmove() with a call to
move_halfword_higher() in FifoRecvHandler() in
drivers/net/xilinx_enet/adapter.c.
You had mentioned drivers/net/xilinx_emac/adapter.c in your previous email,
but my uClinux-2.4.x doesn't seem to have that directory. I am not using
the emaclite, although I assume there is a similar place there that this new
function might be useful.
Regards,
Jim
----- Original Message -----
From: "Brettschneider Falk" <fbrettschneider@xxxxxxxxxxxxxxx>
To: <microblaze-uclinux@xxxxxxxxxxxxxx>
Sent: Wednesday, April 30, 2008 2:43 AM
Subject: RE: [microblaze-uclinux] xenet_FifoSend(struct sk_buff
*orig_skb,structnet_device*dev)
Hi,
it doesn't compile at bneid 1b. Looking at your assly_memcpy1.S it seems
to me the countdown of r9 is missing, but my assembler skills aint good
enough.
Cheers, Falk
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
###################################-*-asm*-
#
# Copyright 2008 (c) Jim Law - Iris LP All rights reserved.
#
# This file is subject to the terms and conditions of the GNU General
# Public License. See the file COPYING in the main directory of this
# archive for more details.
#
# Written by Jim Law <jlaw@xxxxxxxxxxxxx>
#
# application specific memory move for the MB xilinx enet
# adapter.c code
#
#
# assly_movhalf.S
#
# Attempt at quicker utility for adapter.c for MicroBlaze
# Input : Operand1 in Reg r5 - dest must be 2 bytes higher than src
# Operand2 in Reg r6 - src must be word aligned
# Operand3 in Reg r7 - number of bytes to move
# Output: Result in Reg r3 - starting destination address
#
#
# Explanation:
# - moves a block 2 locations higher in memory
# - will overwrite an extra 2 to 7 bytes at end of dest memory,
# depending on length of move
#
#
#######################################
#include <asm/clinkage.h>
.globl C_SYMBOL_NAME(move_halfword_higher)
.ent C_SYMBOL_NAME(move_halfword_higher)
C_SYMBOL_NAME(move_halfword_higher):
addik r3,r5,0 # save dest address as return value
addik r7,r7,-1 # c = c-1
andi r7,r7,0xfffffffc # c = c & ~3
addik r7,r7,4 # c = c+4
andi r5,r5,0xfffffffc # d = d & ~3
addik r10,r0,0 # h = 0
addik r6,r6,-4 # s--
1: lw r11,r6,r7 # v = *(s + offset)
bslli r4,r11,16 # temp = v << 16
or r4,r4,r10 # temp = temp | h
sw r4,r5,r7 # *(d + offset) = temp
addik r7,r7,-4 # offset--
bneid r7,1b
bsrli r10,r11,16 # h = v >> 16 (IN DELAY SLOT)
sw r10,r5,r7 # *(d + offset) = h
rtsd r15,8
nop
.end C_SYMBOL_NAME(move_halfword_higher)