[Qemu-devel] [PATCH V2 2/2] Fix lan9118 buffer length handling

2014-01-07 Thread Roy Franz
smitted than were submitted to the hardware in the command. This resulted in extra bytes being inserted into the middle of multi-buffer packets when the non-final buffers had non-32bit aligned ending addresses. Signed-off-by: Roy Franz --- hw/net/lan9118.c |2 +- 1 file changed, 1 insertion(+

[Qemu-devel] [PATCH V2 0/2] net: Fix lan9118 multi-buffer transmit

2014-01-07 Thread Roy Franz
tinues to work on QEMU as well. Since the Linux driver was unaffected by these bugs I am inferring that it is using a single buffer for each packet. Changes since V1: * use extract32() instead of shift/mask for CMD A field extraction * compute number of valid bytes in word at beginning of block R

[Qemu-devel] [PATCH V2 1/2] Fix lan9118 TX "CMD A" handling

2014-01-07 Thread Roy Franz
h more than one segment. Each segment of the packet has its own CMD A command, with its own buffer size and start offset. Also update extraction of fields from the CMD A word to use extract32(). Signed-off-by: Roy Franz --- hw/net/lan9118.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [Qemu-devel] [PATCH 2/2] net: Fix lan9118 buffer length handling

2014-01-01 Thread Roy Franz
On Fri, Dec 27, 2013 at 5:25 PM, Peter Crosthwaite wrote: > On Sat, Dec 21, 2013 at 4:26 AM, Roy Franz wrote: >> The 9118 ethernet controller supports transmission of multi-buffer packets >> with arbitrary byte alignment of the start and end bytes. All writes to >> the pa

[Qemu-devel] [PATCH 2/2] net: Fix lan9118 buffer length handling

2013-12-20 Thread Roy Franz
smitted than were submitted to the hardware in the command. This resulted in extra bytes being inserted into the middle of multi-buffer packets when the non-final buffers had non-32bit aligned ending addresses. Signed-off-by: Roy Franz --- hw/net/lan9118.c |3 +-- 1 file changed, 1 insertion(

[Qemu-devel] [PATCH 0/2] net: Fix lan9118 multi-buffer transmit

2013-12-20 Thread Roy Franz
tinues to work on QEMU as well. Since the Linux driver was unaffected by these bugs I am inferring that it is using a single buffer for each packet. Roy Franz (2): Fix lan9118 TX "CMD A" handling Fix lan9118 buffer length handling hw/net/lan9118.c |7 +++ 1 fi

[Qemu-devel] [PATCH 1/2] net: Fix lan9118 TX "CMD A" handling

2013-12-20 Thread Roy Franz
h more than one segment. Each segment of the packet has its own CMD A command, with its own buffer size and start offset. Signed-off-by: Roy Franz --- hw/net/lan9118.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 2315f99..c5d6f1

Re: [Qemu-devel] [PATCH V5 5/7] Add max device width parameter for NOR devices

2013-12-12 Thread Roy Franz
On Thu, Dec 12, 2013 at 9:37 AM, Peter Maydell wrote: > On 12 December 2013 17:26, Peter Maydell wrote: >> On 5 December 2013 21:35, Roy Franz wrote: >>> For handling CFI and device ID reads, we need to not only know the >>> width that a NOR flash device is configure

[Qemu-devel] [PATCH V5 4/7] Set proper device-width for vexpress flash

2013-12-05 Thread Roy Franz
Create vexpress specific pflash registration function which properly configures the device-width of 16 bits (2 bytes) for the NOR flash on the vexpress platform. This change is required for buffered flash writes to work properly. Signed-off-by: Roy Franz --- hw/arm/vexpress.c | 44

[Qemu-devel] [PATCH V5 3/7] return status for each NOR flash device

2013-12-05 Thread Roy Franz
: Roy Franz --- hw/block/pflash_cfi01.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index a458ad6..82a2519 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -193,9 +193,20 @@ static

[Qemu-devel] [PATCH V5 6/7] Fix CFI query responses for NOR flash

2013-12-05 Thread Roy Franz
earlier patch in this series so this is the only board currently affected. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c | 103 ++- 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c

[Qemu-devel] [PATCH V5 0/7] block, arm: Fix buffered flash writes on VExpress

2013-12-05 Thread Roy Franz
VExpress specific flash init routine rather than passing long argument list. * Fix typo in comment. Changes from v1: * Add device-width property and use this to mask write length instead of devices mas write length * Update vexpress init code to set device-width to proper value. Roy

[Qemu-devel] [PATCH V5 5/7] Add max device width parameter for NOR devices

2013-12-05 Thread Roy Franz
also support x8 mode. When configured for x8 operation these devices respond to CFI and device ID requests differently than native x8 NOR parts. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c |9 + 1 file changed, 9 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block

[Qemu-devel] [PATCH V5 1/7] rename pflash_t member width to bank_width

2013-12-05 Thread Roy Franz
Rename the 'width' member of the pflash_t structure in preparation for adding a bank_width member. Signed-off-by: Roy Franz Reviewed-by: Peter Maydell --- hw/block/pflash_cfi01.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/block/pflash

[Qemu-devel] [PATCH V5 7/7] Fix NOR flash device ID reading

2013-12-05 Thread Roy Franz
e, as the existing definition was 'wrong' in order to return the expected results with the broken device ID code. Signed-off-by: Roy Franz --- hw/arm/vexpress.c |6 +-- hw/block/pflash_cfi01.c | 107 ++- 2 files changed, 90 in

[Qemu-devel] [PATCH V5 2/7] Add device-width property to pflash_cfi01

2013-12-05 Thread Roy Franz
rface with 2 16 bit devices on it. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index a0d7a16..a458ad6 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cf

Re: [Qemu-devel] [PATCH 2/4 v5] block: Add device-width property to pflash_cfi01

2013-12-03 Thread Roy Franz
On Tue, Dec 3, 2013 at 12:27 PM, Peter Maydell wrote: > On 3 December 2013 20:12, Roy Franz wrote: >> On Thu, Nov 28, 2013 at 11:03 AM, Peter Maydell >> wrote: >>> Other than this and the status (which you deal with in >>> the other patch) the accesses I wonder

Re: [Qemu-devel] [PATCH 2/4 v5] block: Add device-width property to pflash_cfi01

2013-12-03 Thread Roy Franz
On Thu, Nov 28, 2013 at 11:03 AM, Peter Maydell wrote: > On 22 October 2013 17:35, Roy Franz wrote: >> The width of the devices that make up the flash interface >> is required to mask certain commands, in particular the >> write length for buffered writes. This length wi

Re: [Qemu-devel] [PATCH 3/4 v4] block: return status for each device

2013-12-02 Thread Roy Franz
On Thu, Nov 28, 2013 at 11:10 AM, Peter Maydell wrote: > On 22 October 2013 17:35, Roy Franz wrote: >> Now that we know how wide each flash device that makes up the bank is, >> return status for each device in the bank. Leave existing code >> that treats 32 bit wide banks

Re: [Qemu-devel] [PATCH 0/4 v4] block, arm: Fix buffered flash writes on VExpress

2013-11-19 Thread Roy Franz
widths are > 2, it repeats the status assuming 16 bit device width, which preserves the current behavior for 32 bit wide banks. The existing behavior will be preserved for all platforms that don't set different device and bank widths. Thanks, Roy On Tue, Oct 22, 2013 at 9:35 AM, Roy Fran

[Qemu-devel] [PATCH 4/4 v4] block: Set proper device-width for vexpress flash

2013-10-22 Thread Roy Franz
Create vexpress specific pflash registration function which properly configures the device-width of 16 bits (2 bytes) for the NOR flash on the vexpress platform. This change is required for buffered flash writes to work properly. Signed-off-by: Roy Franz --- hw/arm/vexpress.c | 43

[Qemu-devel] [PATCH 3/4 v4] block: return status for each device

2013-10-22 Thread Roy Franz
: Roy Franz --- hw/block/pflash_cfi01.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index cda8289..aa2cbbc 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -191,9 +191,21 @@ static

[Qemu-devel] [PATCH 0/4 v4] block, arm: Fix buffered flash writes on VExpress

2013-10-22 Thread Roy Franz
han passing long argument list. * Fix typo in comment. Changes from v1: * Add device-width property and use this to mask write length instead of devices mas write length * Update vexpress init code to set device-width to proper value. Roy Franz (4): rename pflash_t member width to bank_width

[Qemu-devel] [PATCH 1/4 v4] block: rename pflash_t member width to bank_width

2013-10-22 Thread Roy Franz
Rename the 'width' member of the pflash_t structuer in preparation for adding a bank_width member. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi

[Qemu-devel] [PATCH 2/4 v5] block: Add device-width property to pflash_cfi01

2013-10-22 Thread Roy Franz
rface with 2 16 bit devices on it. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c |5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index d5e366d..cda8289 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -72,6

[Qemu-devel] [PATCH 0/2 v3] block, arm: Fix buffered flash writes on VExpress

2013-10-19 Thread Roy Franz
set device-width to proper value. Roy Franz (2): Add device-width property to pflash_cfi01 Set proper device-width for vexpress flash hw/arm/vexpress.c | 43 +-- hw/block/pflash_cfi01.c | 21 + 2 files changed, 46

[Qemu-devel] [PATCH 1/2 v3] block: Add device-width property to pflash_cfi01

2013-10-19 Thread Roy Franz
rface with 2 16 bit devices on it. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 018a967..cda8289 100644 --- a/hw/block/pflash_cfi01.c +++

[Qemu-devel] [PATCH 2/2 v3] block, arm: Set proper device-width for vexpress flash

2013-10-19 Thread Roy Franz
Create vexpress specific pflash registration function which properly configures the device-width of 16 bits (2 bytes) for the NOR flash on the vexpress platform. This change is required for buffered flash writes to work properly. Signed-off-by: Roy Franz --- hw/arm/vexpress.c | 43

Re: [Qemu-devel] [PATCH v1 4/4] target-arm: Add CP15 VBAR support

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 7:05 AM, Peter Maydell wrote: > On 17 October 2013 11:38, Peter Maydell wrote: >> On 10 July 2013 05:23, wrote: >>> From: Nathan Rossi >>> >>> Added Vector Base Address remapping on ARM v7. >> >> Apologies for this dropping off my radar for so long. >> I've had a bit of

[Qemu-devel] [PATCH 2/2 v2] Set proper device-width for vexpress flash

2013-10-18 Thread Roy Franz
Create vexpress specific pflash registration function which properly configures the device-width of 16 bits (2 bytes) for the NOR flash on the vexpress platform. This change is required for buffered flash writes to work properly. Signed-off-by: Roy Franz --- hw/arm/vexpress.c | 38

[Qemu-devel] [PATCH 0/2 v2] block, arm: Fix buffered flash writes on VExpress

2013-10-18 Thread Roy Franz
this to mask write length instead of devices mas write length * Update vexpress init code to set device-width to proper value. Roy Franz (2): Add device-width property to pflash_cfi01 Set proper device-width for vexpress flash hw/arm/vexpress.c | 38

[Qemu-devel] [PATCH 1/2 v2] Add device-width property to pflash_cfi01

2013-10-18 Thread Roy Franz
rface with 2 16 bit devices on it. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 018a967..cda8289 100644 --- a/hw/block/pflash_cfi01.c +++

[Qemu-devel] [PATCH] Make -kernel command line option optional

2013-10-18 Thread Roy Franz
From: Grant Likely The kernel parameter is not used when booting using firmware such as UEFI. The firmware image is supplied with the -pflash parameter, and the -kernel parameter should not be required since the kernel will be loaded by the firmware. Signed-off-by: Roy Franz Signed-off-by

Re: [Qemu-devel] [PATCH] block: mask NOR flash buffered write length

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 7:11 AM, Peter Maydell wrote: > On 18 October 2013 15:05, Roy Franz wrote: >> On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell >> wrote: >>> Yes, you should make the default for the device-width property >>> be to be the same as the

Re: [Qemu-devel] [PATCH] block: mask NOR flash buffered write length

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 7:01 AM, Peter Maydell wrote: > On 18 October 2013 14:54, Roy Franz wrote: >> On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell >> wrote: >>> Probably instead of a single "width" property we should have two, >>> similar to the de

Re: [Qemu-devel] [PATCH] block: mask NOR flash buffered write length

2013-10-18 Thread Roy Franz
On Fri, Oct 18, 2013 at 6:36 AM, Peter Maydell wrote: > On 18 October 2013 12:38, Stefan Hajnoczi wrote: >> On Thu, Oct 17, 2013 at 07:30:02PM -0700, Roy Franz wrote: >>> For buffered writes, mask the length with the maximum supported >>> length. This is required for

[Qemu-devel] [PATCH] block: mask NOR flash buffered write length

2013-10-17 Thread Roy Franz
without this mask the two lengths are interpreted as a single 32 bit value that is very large. Signed-off-by: Roy Franz --- hw/block/pflash_cfi01.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 018a967..a364cca 100644 --- a/hw