All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Delevoryas <peter@pjd.dev>
To: Peter Delevoryas <peter@pjd.dev>
Cc: peter@pjd.dev, peter.maydell@linaro.org, andrew@aj.id.au,
	joel@jms.id.au, qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 0/2] hw/gpio/aspeed: Don't let guests modify input pins
Date: Thu, 7 Jul 2022 00:26:47 -0700	[thread overview]
Message-ID: <YsaKtyJXbEWw4x3X@r37> (raw)
In-Reply-To: <20220707071731.34047-1-peter@pjd.dev>

On Thu, Jul 07, 2022 at 12:17:29AM -0700, Peter Delevoryas wrote:
> The fby35 OpenBMC sysvinit scripts check various GPIO pins at start and
> decide where to start IPMB daemons for each slot in the sled (4 slots max).
> It only starts an IPMB daemon if the slot GPIO pins indicate that it's
> present and powered on.
> 
> I've been simulating some input pins by setting their value in the machine
> reset function. I think a proper solution would be to add input pins to the
> Aspeed GPIO code and create devices that force the pins high or low
> appropriately, but for now setting the QOM property seemed fine.
> 
> But, I noticed that while the values were set initially, something in the
> boot process resets all the values I set to "low". I imagine something in
> userspace or the driver is blanket writing zero to the data registers. I
> think the Aspeed GPIO controller probably shouldn't be changing the value of
> input pins in this case.
> 
> To fix this, we could just make sure that aspeed_gpio_update() never sets
> the value of an input pin. However, that would also prevent my code in
> fby35_reset from initializing the input pins to some special value. So, to
> support the QOM property setup use-case, I added a "force" parameter. Kinda
> hacky, but it was the simplest thing I could think of.
> 
> Thanks,
> Peter

My gitconfig was messed up, I was using the maintainers.pl script in my
send-email.ccCmd, but that doesn't work for the cover letter.  So, it just sent
the cover letter to me. I didn't notice it in test emailing cause I usually just
test sending to myself. Sorry about this. Hopefully I should finally have
my email configuration fixed at this point...I hope.

Peter

> 
> Peter Delevoryas (2):
>   hw/gpio/aspeed: Don't let guests modify input pins
>   aspeed: Add fby35-bmc slot GPIO's
> 
>  hw/arm/aspeed.c       | 14 +++++++++++++-
>  hw/gpio/aspeed_gpio.c | 22 ++++++++++++----------
>  2 files changed, 25 insertions(+), 11 deletions(-)
> 
> -- 
> 2.36.1
> 

  parent reply	other threads:[~2022-07-07  7:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220707071731.34047-1-peter@pjd.dev>
2022-07-07  7:17 ` [PATCH 1/2] hw/gpio/aspeed: Don't let guests modify input pins Peter Delevoryas
2022-07-07  8:20   ` Joel Stanley
2022-07-07 17:50     ` Peter Delevoryas
2022-07-11 12:25     ` Andrew Jeffery
2022-07-07  8:56   ` Cédric Le Goater
2022-07-07 17:53     ` Peter Delevoryas
2022-07-07 19:04       ` Peter Delevoryas
2022-07-11  8:13         ` Cédric Le Goater
2022-07-11 13:26         ` Andrew Jeffery
2022-07-12  1:57           ` Peter Delevoryas
2022-07-18  1:07             ` Andrew Jeffery
2022-07-07  7:17 ` [PATCH 2/2] aspeed: Add fby35-bmc slot GPIO's Peter Delevoryas
2022-07-07  7:26 ` Peter Delevoryas [this message]
2022-07-07  7:20 [PATCH 0/2] hw/gpio/aspeed: Don't let guests modify input pins Peter Delevoryas

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=YsaKtyJXbEWw4x3X@r37 \
    --to=peter@pjd.dev \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.