Re: [Xen-devel] Data Abort while in booting when using latest version on arm32 fastmodels

2016-07-12 Thread Wonseok Ko
Hi, Julien

I finally succeed booting xen on newer version of FVP(Fastmodels)
The problem is wrong memory size setting in command line option.

I left my command line for others who will face the same problem like me
and I marked bold memory setting part in command line.
NOTE: If you want to configure size of memory for domain 0, you should use
command as below for linux command line and xen command line(see the *BOLD*
).
If any you configure different size of memory, you may see the
data abort error(e.g. HSR: 0x9045 ).
In my case, domain0(mem=2048) has lager memory size than xen
configuration(dom0_mem=128M)

*1. For FVP_VE_Cortex-A15x124-A7x124 *

FVP_VE_Cortex-A15x4-A7x4 -a coretile.cluster0.*=./linux-system-semi.axf \

 -a coretile.cluster1.*=./linux-system-semi.axf \

 -C motherboard.smsc_91c111.enabled=1 -C
motherboard.hostbridge.userNetworking=1 \

 -C
coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3 \

 -C coretile.cluster0.cpu0.semihosting-cmd_line=" \

--kernel ../xen/xen/xen \

--module ../linux/arch/arm/boot/zImage
console=ttyAMA0 earlyprintk=xen debug *mem=128M* root=/dev/nfs
nfsroot=192.168.0.8:/srv/nfsroot/ rw ip=dhcp \

--dtb rtsm_ve-cortex_a15x4_a7x4.dtb --
earlyprintk *dom0_mem=128M*"
*2. For FVP_VE_Cortex-A15x124*

FVP_VE_Cortex-A15x4  -a ./linux-system-semi.axf \

   -C
motherboard.smsc_91c111.enabled=1 -C motherboard.hostbridge.userNetworking=1
\

   -C cluster.cpu0.semihosting-
cmd_line=" \

   --kernel ../xen/xen/xen \

   --module
../linux/arch/arm/boot/zImage console=ttyAMA0 earlyprintk=xen debug
root=/dev/nfs nfsroot=192.168.0.8:/srv/nfsroot/ rw ip=dhcp \

  --dtb rtsm_ve-cortex_a15x4.dtb --
earlyprintk console=ttyAMA0"


Thanks,
Wonseok


Thanks,
Wonseok.

2016-07-12 20:56 GMT+09:00 Wonseok Ko :

> Thank you for your help, Julien
>
> I found the memory overlapping problem between Kernel and Device Tree in
> bootwrapper.
> The problem came from INITRD_OFFSET and PHYS_OFFSET macro(0x00d0)
> I fixed these offsets from 0x00d0 to 0x00e0 and then I avoided the
> memory overlapping problem:
>
> (XEN) MODULE[0]: 80e0230c - 80e04731 Device Tree
> (XEN) MODULE[1]: 80a0 - 80d904b8 Kernel
> console=hvc0 earlyprintk=xen debug mem=2048M root=/dev/mmcblk0 rw ip=dhcp
>
>
> However, I've got another error as below:
>
> (XEN) Checking for initrd in /chosen
> (XEN) RAM: 8000 - 
> (XEN)
> (XEN) MODULE[0]: 80e0230c - 80e04731 Device Tree
> (XEN) MODULE[1]: 80a0 - 80d904b8 Kernel
> console=hvc0 earlyprintk=xen debug mem=2048M root=/dev/mmcblk0 rw ip=dhcp
>
> (XEN)
> (XEN) Command line: earlyprintk console=ttyAMA0
> (XEN) Placing Xen at 0xffe0-0x0001
> (XEN) Update BOOTMOD_XEN from 8020-802fd781 =>
> ffe0-ffefd781
> (XEN) Xen heap: fa00-fe00 (16384 pages)
> (XEN) Dom heap: 507904 pages
> (XEN) Domain heap initialised
> (XEN) Platform: VERSATILE EXPRESS
> (XEN) Bad console= option 'ttyAMA0'
>  Xen 4.8-unstable
> (XEN) Xen version 4.8-unstable (wonseok@) (arm-linux-gnueabihf-gcc
> (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03)
> 4.7.3 20130226 (prerelease)) debug=y Tue Jul 12 19:59:29 KST 2016
> (XEN) Latest ChangeSet: Thu Jun 30 14:01:02 2016 +0200 git:bb4f41b-dirty
> (XEN) Processor: 412fc0f0: "ARM Limited", variant: 0x2, part 0xc0f, rev 0x0
> (XEN) 32-bit Execution:
> (XEN)   Processor Features: 1131:00011011
> (XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
> (XEN) Extensions: GenericTimer Security
> (XEN)   Debug Features: 02010555
> (XEN)   Auxiliary Features: 
> (XEN)   Memory Model Features: 10201105 2000 0124 02102211
> (XEN)  ISA Features: 02101110 13112111 21232041 2131 10011142 
> (XEN) Set SYS_FLAGS to ffe0004c (0020004c)
> (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz
> (XEN) GICv2 initialization:
> (XEN) gic_dist_addr=2c001000
> (XEN) gic_cpu_addr=2c002000
> (XEN) gic_hyp_addr=2c004000
> (XEN) gic_vcpu_addr=2c006000
> (XEN) gic_maintenance_irq=25
> (XEN) GICv2: 128 lines, 8 cpus, secure (IID 3902043b).
> (XEN) Using scheduler: SMP Credit Scheduler (credit)
> (XEN) Allo

Re: [Xen-devel] Data Abort while in booting when using latest version on arm32 fastmodels

2016-07-12 Thread Wonseok Ko
Thank you for your help, Julien

I found the memory overlapping problem between Kernel and Device Tree in
bootwrapper.
The problem came from INITRD_OFFSET and PHYS_OFFSET macro(0x00d0)
I fixed these offsets from 0x00d0 to 0x00e0 and then I avoided the
memory overlapping problem:

(XEN) MODULE[0]: 80e0230c - 80e04731 Device Tree
(XEN) MODULE[1]: 80a0 - 80d904b8 Kernel
console=hvc0 earlyprintk=xen debug mem=2048M root=/dev/mmcblk0 rw ip=dhcp


However, I've got another error as below:

(XEN) Checking for initrd in /chosen
(XEN) RAM: 8000 - 
(XEN)
(XEN) MODULE[0]: 80e0230c - 80e04731 Device Tree
(XEN) MODULE[1]: 80a0 - 80d904b8 Kernel
console=hvc0 earlyprintk=xen debug mem=2048M root=/dev/mmcblk0 rw ip=dhcp

(XEN)
(XEN) Command line: earlyprintk console=ttyAMA0
(XEN) Placing Xen at 0xffe0-0x0001
(XEN) Update BOOTMOD_XEN from 8020-802fd781 =>
ffe0-ffefd781
(XEN) Xen heap: fa00-fe00 (16384 pages)
(XEN) Dom heap: 507904 pages
(XEN) Domain heap initialised
(XEN) Platform: VERSATILE EXPRESS
(XEN) Bad console= option 'ttyAMA0'
 Xen 4.8-unstable
(XEN) Xen version 4.8-unstable (wonseok@) (arm-linux-gnueabihf-gcc
(crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03)
4.7.3 20130226 (prerelease)) debug=y Tue Jul 12 19:59:29 KST 2016
(XEN) Latest ChangeSet: Thu Jun 30 14:01:02 2016 +0200 git:bb4f41b-dirty
(XEN) Processor: 412fc0f0: "ARM Limited", variant: 0x2, part 0xc0f, rev 0x0
(XEN) 32-bit Execution:
(XEN)   Processor Features: 1131:00011011
(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN) Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 
(XEN)   Memory Model Features: 10201105 2000 0124 02102211
(XEN)  ISA Features: 02101110 13112111 21232041 2131 10011142 
(XEN) Set SYS_FLAGS to ffe0004c (0020004c)
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz
(XEN) GICv2 initialization:
(XEN) gic_dist_addr=2c001000
(XEN) gic_cpu_addr=2c002000
(XEN) gic_hyp_addr=2c004000
(XEN) gic_vcpu_addr=2c006000
(XEN) gic_maintenance_irq=25
(XEN) GICv2: 128 lines, 8 cpus, secure (IID 3902043b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 64 KiB.
(XEN) VFP implementer 0x41 architecture 4 part 0x30 variant 0xf rev 0x0
(XEN) Bringing up CPU1
- CPU 0001 booting -
- Xen starting in Hyp mode -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
- CPU 0003 booting -
- Xen starting in Hyp mode -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) CPU 3 booted.
(XEN) Bringing up CPU4
- CPU 0100 booting -
- Xen starting in Hyp mode -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) CPU 4 booted.
(XEN) Bringing up CPU5
- CPU 0101 booting -
- Xen starting in Hyp mode -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) CPU 5 booted.
(XEN) Bringing up CPU6
- CPU 0102 booting -
- Xen starting in Hyp mode -
- Setting up control registers -
- Turning on paging -
- Ready -
(XEN) CPU 6 booted.
(XEN) Bringing up CPU7
(XEN) CPU7 never came online
(XEN) Failed to bring up CPU 7 (error -5)
(XEN) Brought up 7 CPUs
(XEN) P2M: 40-bit IPA
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80003558
(XEN) I/O virtualisation disabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 80a0
(XEN) Allocating 1:1 mappings totalling 128MB for dom0:
(XEN) BANK[0] 0x008800-0x009000 (128MB)
(XEN) Grant table range: 0x00ffe0-0x00ffe5d000
(XEN) Loading zImage from 80a0 to
8fc0-8ff904b8
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading dom0 DTB to 0x8fa0-0x8fa0220e
(XEN) Scrubbing Free RAM on 1 nodes using 7 CPUs
(XEN) ...done.
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input
to Xen)
(XEN) Freed 268kB init memory.
(XEN) traps.c:2506:d0v0 HSR=0x9045 pc=0x80341924 gva=0xefffe000
gpa=0x00f7ffe000

Could you please explain the reason why the above fault?

Thanks,
Wonseok



Thanks,
Wonseok.

2016-07-12 19:09 GMT+09:00 Julien Grall :

>
>
> On 12/07/16 06:20, Wonseok Ko wrote:
>
>> Hi, All
>>
>
> Hello,
>
> I founded the previous post to solve the problem as the same as mine,
>> the patch was applied in latest version, but I've got the data abort.
>> previous post:
>> https://lists.xen.org/archives/htm

[Xen-devel] Data Abort while in booting when using latest version on arm32 fastmodels

2016-07-11 Thread Wonseok Ko
Hi, All

I founded the previous post to solve the problem as the same as mine, the
patch was applied in latest version, but I've got the data abort.
previous post:
https://lists.xen.org/archives/html/xen-devel/2013-09/msg00606.html and I
referred to the wiki page:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/FastModels

I build the latest version of Xen with command as below:
# make distclean; XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf-
debug=y CONFIG_EARLY_PRINTK=fastmodel ./configure
# make xen XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- debug=y
CONFIG_EARLY_PRINTK=fastmodel -j 8

My fastmodels command as below:

FVP_VE_Cortex-A15x4-A7x4 -a coretile.cluster0.*=./linux-system-semi.axf \

 -a coretile.cluster1.*=./linux-system-semi.axf \

 -C motherboard.smsc_91c111.enabled=1 -C
motherboard.hostbridge.userNetworking=1 \

 -C
coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3 \

 -C coretile.cluster0.cpu0.semihosting-cmd_line=" \

--kernel ../xen/xen/xen \

--module ../linux/arch/arm/boot/zImage \

--dtb rtsm_ve-cortex_a15x4_a7x4.dtb \

-- earlyprintk console=ttyAMA0 mem=2048M
root=/dev/nfs nfsroot=192.168.0.8:/srv/nfsroot/ rw ip=dhcp"

Does anybody help me to fix it? or If I did something wrong, please let me
know.

here is log:

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

- UART enabled -

- CPU  booting -

- Xen starting in Hyp mode -

- Zero BSS -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) Checking for initrd in /chosen

(XEN) RAM: 8000 - 

(XEN)

(XEN) MODULE[0]: 80d0230c - 80d0473d Device Tree

(XEN) MODULE[1]: 80a0 - 80d904b8 Kernel
console=ttyAMA0

(XEN)

(XEN)

(XEN) Command line: earlyprintk console=ttyAMA0 mem=2048M root=/dev/nfs
nfsroot=192.168.0.8:/srv/nfsroot/ rw ip=dhcp

(XEN) Placing Xen at 0xffe0-0x0001

(XEN) Update BOOTMOD_XEN from 8020-802fd781 =>
ffe0-ffefd781

(XEN) Xen heap: fa00-fe00 (16384 pages)

(XEN) Dom heap: 507904 pages

(XEN) Domain heap initialised

(XEN) Platform: VERSATILE EXPRESS

(XEN) Bad console= option 'ttyAMA0'

 Xen 4.8-unstable

(XEN) Xen version 4.8-unstable (wonseok@) (arm-linux-gnueabihf-gcc
(crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03)
4.7.3 20130226 (prerelease)) debug=y Tue Jul 12 13:29:41 KST 2016

(XEN) Latest ChangeSet: Thu Jun 30 14:01:02 2016 +0200 git:bb4f41b-dirty

(XEN) Processor: 412fc0f0: "ARM Limited", variant: 0x2, part 0xc0f, rev 0x0

(XEN) 32-bit Execution:

(XEN)   Processor Features: 1131:00011011

(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle

(XEN) Extensions: GenericTimer Security

(XEN)   Debug Features: 02010555

(XEN)   Auxiliary Features: 

(XEN)   Memory Model Features: 10201105 2000 0124 02102211

(XEN)  ISA Features: 02101110 13112111 21232041 2131 10011142 

(XEN) Set SYS_FLAGS to ffe0004c (0020004c)

(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz

(XEN) GICv2 initialization:

(XEN) gic_dist_addr=2c001000

(XEN) gic_cpu_addr=2c002000

(XEN) gic_hyp_addr=2c004000

(XEN) gic_vcpu_addr=2c006000

(XEN) gic_maintenance_irq=25

(XEN) GICv2: 128 lines, 8 cpus, secure (IID 3902043b).

(XEN) Using scheduler: SMP Credit Scheduler (credit)

(XEN) Allocated console ring of 64 KiB.

(XEN) VFP implementer 0x41 architecture 4 part 0x30 variant 0xf rev 0x0

(XEN) Bringing up CPU1

- CPU 0001 booting -

- Xen starting in Hyp mode -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) CPU 2 booted.

(XEN) Bringing up CPU3

- CPU 0003 booting -

- Xen starting in Hyp mode -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) CPU 3 booted.

(XEN) Bringing up CPU4

- CPU 0100 booting -

- Xen starting in Hyp mode -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) CPU 4 booted.

(XEN) Bringing up CPU5

- CPU 0101 booting -

- Xen starting in Hyp mode -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) CPU 5 booted.

(XEN) Bringing up CPU6

- CPU 0102 booting -

- Xen starting in Hyp mode -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) CPU 6 booted.

(XEN) Bringing up CPU7

- CPU 0103 booting -

- Xen starting in Hyp mode -

- Setting up control registers -

- Turning on paging -

- Ready -

(XEN) CPU 7 booted.

(XEN) Brought up 8 CPUs

(XEN) P2M: 40-bit IPA

(XEN) P2M: 3 levels with order-1 root, VTCR 0x80003558

(XEN) I/O virtualisation disabled

(

Re: [Xen-devel] [sh_eth.c] Problem in dma_map_single()

2016-05-23 Thread Wonseok Ko
Hi, Konrad


It's not same. I am attaching a macro as below.

#define SET_NETDEV_DEV(net, pdev)   ((net)->dev.parent = (pdev))

So that's why I was setting the dma mask to ndev.


Thanks,

Wonseok Ko


Thanks,
Wonseok.

2016-05-18 6:10 GMT+09:00 Konrad Rzeszutek Wilk :

> On Fri, Apr 15, 2016 at 12:39:42PM +0900, Wonseok Ko wrote:
> > ​Hi Konrad,​
> >
> > Finally, I can use ethernet :D. It was my mistake. I thought the
> > SET_NETDEV_DEV() makes ndev == pdev->dev, but it's not true.
> >
> > So I changed the dma configuration from:
> >
> > dma_coerce_mask_and_coherent(*&pdev->dev*, DMA_BIT_MASK(32));
> > SET_NETDEV_DEV(ndev, &pdev->dev);
> >
> >
> > to:
> >
> > dma_coerce_mask_and_coherent(*&ndev->dev*, DMA_BIT_MASK(32));
> > SET_NETDEV_DEV(ndev, &pdev->dev);
> >
> >
> > and then sh_eth works.
> >
> > However I wanted to set dma_mask in pdev, I just thought about the
> original
> > data have a mask bit.
> > Do you know how do I set dma_mask in pdev?
>
> That is some weird propogation. Is the pdev->dev the same as ndev->dev?
>
> > Thank you for your help!
> >
> > Thanks,
> > Wonseok.
> >
> >
> > Thanks,
> > Wonseok.
> >
> > 2016-04-14 22:52 GMT+09:00 Konrad Rzeszutek Wilk  >:
> >
> > > On Wed, Apr 13, 2016 at 02:18:09PM +0900, Wonseok Ko wrote:
> > > > Hi Konrad,
> > > >
> > > > In dma_capable(), it checks that mask, size and address of device.
> > > >
> > > > Currently, it dosen't pass to first condition code as below:
> > > >
> > > > if (!dev->dma_mask)
> > > >
> > > > return 0;
> > > >
> > > > It shows the device doesn't have dma_mask bit. So I tried to set the
> > > > dma_mask bit in sh_eth.c
> > > >
> > > > My approaches:
> > > > 1. I tried to set a mask bit(dev->dma_mask) to use
> > > > dma_coerce_mask_and_coherent()
> > > > in sh_eth_drv_probe(), but it doesn't work.
> > >
> > > Are there any errors? What does dma_mask end up being?
> > > > 2. forced set dev->dma_mask without kernel api. I passed to
> dma_capable()
> > > > but driver cannot work.
> > >
> > > Aha, what did you set it to? Do you have a diff?
> > > >
> > > > sh_eth driver want to get valid DMA descriptor to set DMA descriptor
> > > > address for Rx and Tx.
> > >
> > > Right, which it would plug in its driver registers so the card
> > > can pick it up.
> > > > I tried to set the some bits(such as dma_mask) to get valid dma
> address
> > > > forcibly, in this configuration sh_eth cannot work.
> > >
> > > Uh, not sure I understand. Or are you repeating what you mentioned
> > > earlier?
> > > >
> > > > My question is if I want to get valid dma address with xen
> swiotlb(suchas
> > > > map_page, set_dma_mask and so on)?
> > >
> > > Well it all should work just fine - perhaps if you provide some
> > > diff's and such I can help you along?
> > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Wonseok.
> > > >
> > > > 2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk <
> konrad.w...@oracle.com
> > > >:
> > > >
> > > > > On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm trying to enable ethernet driver in Domain0 for R-Car H2,
> but it
> > > > > > doesn't work. The root cause of the problem is that driver cannot
> > > satisfy
> > > > > > the condition of dma_capable(). I found the same problem in the
> > > mailing
> > > > >
> > > > > So what can be done about making it dma_capable() ?
> > > > >
> > > > > > list, but the problem is still remaining I guess. previous mail:
> (
> > > > > >
> http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> > > > > >
> > > > > > Does anyone give me advise?
> > > > > >
> > > > > > My environment as below:
> > > > > > - dom0 linux version: 4.3
> > > > > > - xen version: 4.6
> commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > Wonseok.
> > > > >
> > > > > > ___
> > > > > > Xen-devel mailing list
> > > > > > Xen-devel@lists.xen.org
> > > > > > http://lists.xen.org/xen-devel
> > > > >
> > > > >
> > >
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [sh_eth.c] Problem in dma_map_single()

2016-04-14 Thread Wonseok Ko
​Hi Konrad,​

Finally, I can use ethernet :D. It was my mistake. I thought the
SET_NETDEV_DEV() makes ndev == pdev->dev, but it's not true.

So I changed the dma configuration from:

dma_coerce_mask_and_coherent(*&pdev->dev*, DMA_BIT_MASK(32));
SET_NETDEV_DEV(ndev, &pdev->dev);


to:

dma_coerce_mask_and_coherent(*&ndev->dev*, DMA_BIT_MASK(32));
SET_NETDEV_DEV(ndev, &pdev->dev);


and then sh_eth works.

However I wanted to set dma_mask in pdev, I just thought about the original
data have a mask bit.
Do you know how do I set dma_mask in pdev?

Thank you for your help!

Thanks,
Wonseok.


Thanks,
Wonseok.

2016-04-14 22:52 GMT+09:00 Konrad Rzeszutek Wilk :

> On Wed, Apr 13, 2016 at 02:18:09PM +0900, Wonseok Ko wrote:
> > Hi Konrad,
> >
> > In dma_capable(), it checks that mask, size and address of device.
> >
> > Currently, it dosen't pass to first condition code as below:
> >
> > if (!dev->dma_mask)
> >
> > return 0;
> >
> > It shows the device doesn't have dma_mask bit. So I tried to set the
> > dma_mask bit in sh_eth.c
> >
> > My approaches:
> > 1. I tried to set a mask bit(dev->dma_mask) to use
> > dma_coerce_mask_and_coherent()
> > in sh_eth_drv_probe(), but it doesn't work.
>
> Are there any errors? What does dma_mask end up being?
> > 2. forced set dev->dma_mask without kernel api. I passed to dma_capable()
> > but driver cannot work.
>
> Aha, what did you set it to? Do you have a diff?
> >
> > sh_eth driver want to get valid DMA descriptor to set DMA descriptor
> > address for Rx and Tx.
>
> Right, which it would plug in its driver registers so the card
> can pick it up.
> > I tried to set the some bits(such as dma_mask) to get valid dma address
> > forcibly, in this configuration sh_eth cannot work.
>
> Uh, not sure I understand. Or are you repeating what you mentioned
> earlier?
> >
> > My question is if I want to get valid dma address with xen swiotlb(suchas
> > map_page, set_dma_mask and so on)?
>
> Well it all should work just fine - perhaps if you provide some
> diff's and such I can help you along?
>
> >
> >
> >
> >
> > Thanks,
> > Wonseok.
> >
> > 2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk  >:
> >
> > > On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > > > Hi,
> > > >
> > > > I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> > > > doesn't work. The root cause of the problem is that driver cannot
> satisfy
> > > > the condition of dma_capable(). I found the same problem in the
> mailing
> > >
> > > So what can be done about making it dma_capable() ?
> > >
> > > > list, but the problem is still remaining I guess. previous mail: (
> > > > http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> > > >
> > > > Does anyone give me advise?
> > > >
> > > > My environment as below:
> > > > - dom0 linux version: 4.3
> > > > - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> > > >
> > > >
> > > > Thanks,
> > > > Wonseok.
> > >
> > > > ___
> > > > Xen-devel mailing list
> > > > Xen-devel@lists.xen.org
> > > > http://lists.xen.org/xen-devel
> > >
> > >
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [sh_eth.c] Problem in dma_map_single()

2016-04-14 Thread Wonseok Ko
Hi Konrad,
Did you read the reply? How do I fix it?
Thanks,Wonseok
Sent from Outlook Mobile




On Tue, Apr 12, 2016 at 10:10 AM -0700, "Konrad Rzeszutek Wilk" 
 wrote:










On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> Hi,
> 
> I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> doesn't work. The root cause of the problem is that driver cannot satisfy
> the condition of dma_capable(). I found the same problem in the mailing

So what can be done about making it dma_capable() ?

> list, but the problem is still remaining I guess. previous mail: (
> http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> 
> Does anyone give me advise?
> 
> My environment as below:
> - dom0 linux version: 4.3
> - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> 
> 
> Thanks,
> Wonseok.

> ___
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel






___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [sh_eth.c] Problem in dma_map_single()

2016-04-12 Thread Wonseok Ko
Hi Konrad,

In dma_capable(), it checks that mask, size and address of device.

Currently, it dosen't pass to first condition code as below:

if (!dev->dma_mask)

return 0;

It shows the device doesn't have dma_mask bit. So I tried to set the
dma_mask bit in sh_eth.c

My approaches:
1. I tried to set a mask bit(dev->dma_mask) to use
dma_coerce_mask_and_coherent()
in sh_eth_drv_probe(), but it doesn't work.
2. forced set dev->dma_mask without kernel api. I passed to dma_capable()
but driver cannot work.

sh_eth driver want to get valid DMA descriptor to set DMA descriptor
address for Rx and Tx.
I tried to set the some bits(such as dma_mask) to get valid dma address
forcibly, in this configuration sh_eth cannot work.

My question is if I want to get valid dma address with xen swiotlb(suchas
map_page, set_dma_mask and so on)?




Thanks,
Wonseok.

2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk :

> On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > Hi,
> >
> > I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> > doesn't work. The root cause of the problem is that driver cannot satisfy
> > the condition of dma_capable(). I found the same problem in the mailing
>
> So what can be done about making it dma_capable() ?
>
> > list, but the problem is still remaining I guess. previous mail: (
> > http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> >
> > Does anyone give me advise?
> >
> > My environment as below:
> > - dom0 linux version: 4.3
> > - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> >
> >
> > Thanks,
> > Wonseok.
>
> > ___
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] [sh_eth.c] Problem in dma_map_single()

2016-04-12 Thread Wonseok Ko
Hi,

I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
doesn't work. The root cause of the problem is that driver cannot satisfy
the condition of dma_capable(). I found the same problem in the mailing
list, but the problem is still remaining I guess. previous mail: (
http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)

Does anyone give me advise?

My environment as below:
- dom0 linux version: 4.3
- xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)


Thanks,
Wonseok.
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel