[flashrom] Re: Refactor arguments parser - GSOC project thread

2022-06-09 Thread Chinmay Lonkar
Hi there!

I've made a doc in which I have provided the description of all the
sub-arguments for programmers
along with their short description,
Currently all of the arguments a treated at string but I've proposed data
types of respective arguments
in which they should be used to make code more efficient, readable, and
reliable.

Here is the link
<https://docs.google.com/document/d/1C3Gc-LUatkTQbzjYQAlE-qkpVauih6GHJD-9y-XMwTw/edit?usp=sharing>
for
the doc, the data in the doc may be modified if required.
I hope this document will be helpful for Flashrom users.

Regards,
Chinmay Lonkar

On Fri, May 27, 2022 at 9:20 PM Chinmay Lonkar 
wrote:

> Hello,
>
> Today I had a meeting with my mentors Felix and Anastasia.
> The project plan has been broken into phases.
> I'll work on the first phase, which will entail creating an
> alternative to extract_programmer_param() that will parse the
> programmer's sub-arguments according to the data type in which they
> have to be utilized in the code.
>
> So, I'll be reading through the code and working out a solution for
> this task, as well as analyzing all of the other parameters that the
> programmers utilize.
>
> Regards,
> Chinmay Lonkar
>
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] Refactor arguments parser - GSOC project thread

2022-05-27 Thread Chinmay Lonkar
Hello,

Today I had a meeting with my mentors Felix and Anastasia.
The project plan has been broken into phases.
I'll work on the first phase, which will entail creating an
alternative to extract_programmer_param() that will parse the
programmer's sub-arguments according to the data type in which they
have to be utilized in the code.

So, I'll be reading through the code and working out a solution for
this task, as well as analyzing all of the other parameters that the
programmers utilize.

Regards,
Chinmay Lonkar
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] Re: Welcome our 2022 students!

2022-05-21 Thread Chinmay Lonkar
Hello, there!
I'm grateful to have been chosen as a GSoC contributor at Flashrom,
working with you folks will be a fantastic experience, and I'm looking
forward to the project.
I'm looking forward to meeting you on June 2nd!

Regards,
Chinmay Lonkar

On Sat, May 21, 2022 at 5:14 PM Nico Huber  wrote:
>
> Hi folks,
>
> On 21.05.22 12:52, Anastasia Klimchuk wrote:
> > I am very proud because I have great news: we have 3 students joining
> > the flashrom community to do projects!
>
> that's awesome news! Congratulations to everyone, including our diligent
> admin team!
>
> Nico
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] Re: [PATCH] Add voltage data for chips

2022-05-11 Thread Chinmay Lonkar
Hi Thomas,

I have submitted the patch on Gerrit, kindly review.

Regards,
Chinmay Lonkar

On Wed, May 11, 2022 at 11:28 PM Thomas Heijligen  wrote:
>
> Hi Chinmay,
>
> Thanks for adding voltage informations to those chips.
> Can you plese upload the patch to Gerrit. https://review.coreboot.org
>
> There are usefull HOWTOs in the flashrom wiki and coreboot doc.
> https://www.flashrom.org/Development_Guidelines#Sending_a_patch
> https://doc.coreboot.org/tutorial/part2.html
>
> Thanks
> -- Thomas
>
> On Wed, 2022-05-11 at 23:17 +0530, Chinmay Lonkar wrote:
> > From: ChinmayLonkar 
> >
> > This patch adds voltage data for following chips:
> > * Intel 28F002BC/BL/BV/BX-T
> > * Intel 28F004B5/BE/BV/BX-B
> > * Intel 28F004B5/BE/BV/BX-T
> > * Intel 28F008S3/S5/SC
> > * Intel 28F400BV/BX/CE/CV-B
> > * Intel 28F400BV/BX/CE/CV-T
> > * Micron/Numonyx/ST M25P40-old
> > * SyncMOS/MoselVitelic {F,S,V}29C51002T
> > * Winbond W29C010(M)/W29C011A/W29EE011/W29EE012
> > * Winbond W29C010(M)/W29C011A/W29EE011/W29EE012-old
> >
> > Change-Id: I42bc546e03a899086c034c026231955088a7d400
> > Signed-off-by: Chinmay Lonkar 
> > ---
> >  flashchips.c | 11 +++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/flashchips.c b/flashchips.c
> > index d155b24..f9cb0cd 100644
> > --- a/flashchips.c
> > +++ b/flashchips.c
> > @@ -8112,6 +8112,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_82802ab,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500},
> > },
> >
> > {
> > @@ -8139,6 +8140,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_82802ab,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500},
> > },
> >
> > {
> > @@ -8166,6 +8168,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_82802ab,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500},
> > },
> >
> > {
> > @@ -8189,6 +8192,7 @@ const struct flashchip flashchips[] = {
> > .unlock = unlock_28f004s5,
> > .write  = write_82802ab,
> > .read   = read_memmapped,
> > +   .voltage= {2700, 3300},
> > },
> >
> > {
> > @@ -8217,6 +8221,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_82802ab,
> > .read   = read_memmapped,
> > +   .voltage= {2700, 3600},
> > },
> >
> > {
> > @@ -8245,6 +8250,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_82802ab,
> > .read   = read_memmapped,
> > +   .voltage= {2700, 3600},
> > },
> >
> > {
> > @@ -10521,6 +10527,7 @@ const struct flashchip flashchips[] = {
> > .unlock = spi_disable_blockprotect_bp3_srwd,
> > .write  = spi_chip_write_256,
> > .read   = spi_chip_read,
> > +   .voltage= {2300, 3600},
> > },
> >
> > {
> > @@ -16884,6 +16891,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_jedec_1,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500}
> > },
> >
> > {
> > @@ -16910,6 +16918,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_jedec_1,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500}
> > },
> >
> > {
> > @@ -18607,6 +18616,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_jedec,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500},
> > },
> >
> > {
> > @@ -18630,6 +18640,7 @@ const struct flashchip flashchips[] = {
> > },
> > .write  = write_jedec,
> > .read   = read_memmapped,
> > +   .voltage= {4500, 5500},
> > },
> >
> > {
>
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] [PATCH] Add voltage data for chips

2022-05-11 Thread Chinmay Lonkar
From: ChinmayLonkar 

This patch adds voltage data for following chips:
* Intel 28F002BC/BL/BV/BX-T
* Intel 28F004B5/BE/BV/BX-B
* Intel 28F004B5/BE/BV/BX-T
* Intel 28F008S3/S5/SC
* Intel 28F400BV/BX/CE/CV-B
* Intel 28F400BV/BX/CE/CV-T
* Micron/Numonyx/ST M25P40-old
* SyncMOS/MoselVitelic {F,S,V}29C51002T
* Winbond W29C010(M)/W29C011A/W29EE011/W29EE012
* Winbond W29C010(M)/W29C011A/W29EE011/W29EE012-old

Change-Id: I42bc546e03a899086c034c026231955088a7d400
Signed-off-by: Chinmay Lonkar 
---
 flashchips.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/flashchips.c b/flashchips.c
index d155b24..f9cb0cd 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -8112,6 +8112,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_82802ab,
.read   = read_memmapped,
+   .voltage= {4500, 5500},
},
 
{
@@ -8139,6 +8140,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_82802ab,
.read   = read_memmapped,
+   .voltage= {4500, 5500},
},
 
{
@@ -8166,6 +8168,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_82802ab,
.read   = read_memmapped,
+   .voltage= {4500, 5500},
},
 
{
@@ -8189,6 +8192,7 @@ const struct flashchip flashchips[] = {
.unlock = unlock_28f004s5,
.write  = write_82802ab,
.read   = read_memmapped,
+   .voltage= {2700, 3300},
},
 
{
@@ -8217,6 +8221,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_82802ab,
.read   = read_memmapped,
+   .voltage= {2700, 3600},
},
 
{
@@ -8245,6 +8250,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_82802ab,
.read   = read_memmapped,
+   .voltage= {2700, 3600},
},
 
{
@@ -10521,6 +10527,7 @@ const struct flashchip flashchips[] = {
.unlock = spi_disable_blockprotect_bp3_srwd,
.write  = spi_chip_write_256,
.read   = spi_chip_read,
+   .voltage= {2300, 3600},
},
 
{
@@ -16884,6 +16891,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_jedec_1,
.read   = read_memmapped,
+   .voltage= {4500, 5500}
},
 
{
@@ -16910,6 +16918,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_jedec_1,
.read   = read_memmapped,
+   .voltage= {4500, 5500}
},
 
{
@@ -18607,6 +18616,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_jedec,
.read   = read_memmapped,
+   .voltage= {4500, 5500},
},
 
{
@@ -18630,6 +18640,7 @@ const struct flashchip flashchips[] = {
},
.write  = write_jedec,
.read   = read_memmapped,
+   .voltage= {4500, 5500},
},
 
{
-- 
2.25.1

___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] Re: Flashrom sp_stream_buffer_op() API issue

2022-05-07 Thread Chinmay Lonkar
Thanks, I'll check it out.

On Sat, 7 May 2022, 17:51 Aarya Chaumal,  wrote:

> Hi Chinmay,
>
> Actually calling memcpy with NULL as parameters can lead to undefined
> behavior, so scan-build is showing that warning.
> There is already a patch regarding the same on Gerrit:
> https://review.coreboot.org/c/flashrom/+/62726
>
> Aarya.
>
> On Sat, May 7, 2022 at 5:01 PM Chinmay Lonkar 
> wrote:
>
>> Hi,
>> I'm trying to fix the build errors of flashrom and came across an API
>> error
>> "Argument with 'nonnull' attribute passed null" which occurred in
>> memcpy() function called inside sp_stream_buffer_op() in file serprog.c.
>>
>> We are passing the third argument of sp_stream_buffer_op() as NULL which
>> gets passed on to the second argument of memcpy() and it expects that
>> argument to be nonnull.
>>
>> Can anybody please provide me with the info and docs for knowing exactly
>> what sp_stream_buffer_op() function does?
>>
>> Also, should we report an error when the third argument passed in the
>> sp_stream_buffer_op() is NULL?
>>
>> Thank You!
>>
>> Regards,
>> Chinmay Lonkar
>> ___
>> flashrom mailing list -- flashrom@flashrom.org
>> To unsubscribe send an email to flashrom-le...@flashrom.org
>>
>
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] Flashrom sp_stream_buffer_op() API issue

2022-05-07 Thread Chinmay Lonkar
Hi,
I'm trying to fix the build errors of flashrom and came across an API error
"Argument with 'nonnull' attribute passed null" which occurred in memcpy()
function called inside sp_stream_buffer_op() in file serprog.c.

We are passing the third argument of sp_stream_buffer_op() as NULL which
gets passed on to the second argument of memcpy() and it expects that
argument to be nonnull.

Can anybody please provide me with the info and docs for knowing exactly
what sp_stream_buffer_op() function does?

Also, should we report an error when the third argument passed in the
sp_stream_buffer_op() is NULL?

Thank You!

Regards,
Chinmay Lonkar
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org