From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH, v2] Add command to erase all flash memory regions
Date: Thu, 12 Jan 2017 16:23:00 -0000 [thread overview]
Message-ID: <b072908f-ad1f-1097-8340-26741583dc7d@redhat.com> (raw)
In-Reply-To: <b94a8bc0-7c84-c122-c19b-32ecd3d41a05@codesourcery.com>
On 01/11/2017 06:55 PM, Luis Machado wrote:
> On 01/10/2017 12:22 PM, Pedro Alves wrote:
>> I was wondering how this is supposed to work if the command
>> is interrupted w/ ctrl-c midway. If the command is interrupted before
>> sending the vFlashDone RSP command, then it seems to me that the stub
>> is doing to get confused, since it seems there's no RSP command to
>> mean "I'm starting a batch of flash operations from scratch, forget
>> any stale list of pending vFlashWrite/vFlashErase ops you may have.
>> Am I missing something that prevents that from happening?
>
> Yeah, that scenario can indeed happen if one interrupts the flash
> programming midway. It is a bit of an oversight in the design of this
> functionality i think.
>
> The target stub, as it is today, will not be too confused about this.
> The memory regions will be appended to a list and the stub will wait for
> the vFlashDone packet to commit the changes.
>
> The way the commit process is implemented will attempt to combine
> writes/deletions in a single operation. So, in the worst case, the stub
> will only execute these operations next time it sees vFlashDone.
>
> Not ideal, but it is how it works nowadays.
Hmm, indeed. Not as bad as I first though. Thanks.
--
Pedro Alves
prev parent reply other threads:[~2017-01-12 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 19:04 Luis Machado
2017-01-09 19:22 ` Eli Zaretskii
2017-01-09 19:59 ` Luis Machado
[not found] ` <7353f551-64f3-9d8a-8e74-f85dd93b40d4@ericsson.com>
2017-01-09 22:14 ` Luis Machado
2017-01-09 22:19 ` Luis Machado
2017-01-10 19:14 ` Pedro Alves
2017-01-10 18:23 ` Pedro Alves
2017-01-11 18:56 ` Luis Machado
2017-01-12 16:23 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b072908f-ad1f-1097-8340-26741583dc7d@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox