lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4945482509cad0bf3e8cd93c1fb21bac2e0c7f2.camel@codeconstruct.com.au>
Date: Wed, 19 Feb 2025 11:34:31 +1030
From: Andrew Jeffery <andrew@...econstruct.com.au>
To: Kevin Chen <kevin_chen@...eedtech.com>, "joel@....id.au"
 <joel@....id.au>,  Z-ChiaWei Wang <chiawei_wang@...eedtech.com>,
 "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>, 
 "linux-arm-kernel@...ts.infradead.org"
 <linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
 <linux-kernel@...r.kernel.org>, Mo Elbadry <elbadrym@...gle.com>
Cc: "tomer.maimon" <tomer.maimon@...oton.com>, Krzysztof Kozlowski
	 <krzk@...nel.org>, "lee@...nel.org" <lee@...nel.org>, "robh@...nel.org"
	 <robh@...nel.org>, "krzk+dt@...nel.org" <krzk+dt@...nel.org>, 
	"conor+dt@...nel.org"
	 <conor+dt@...nel.org>
Subject: Re: [PATCH v1 3/3] soc: aspeed: lpc-pcc: Add PCC controller support

On Tue, 2025-02-18 at 11:11 +0000, Kevin Chen wrote:
> > On Mon, 2025-02-17 at 13:00 +0100, Krzysztof Kozlowski wrote:
> > > On 17/02/2025 12:48, Kevin Chen wrote:
> > > > +
> > > > +       pcc->mdev.parent = dev;
> > > > +       pcc->mdev.minor = MISC_DYNAMIC_MINOR;
> > > > +       pcc->mdev.name = devm_kasprintf(dev, GFP_KERNEL,
> > > > "%s%d",
> > > > DEVICE_NAME,
> > > > 
> > +                                       pcc->mdev_id);
> > > > +       pcc->mdev.fops = &pcc_fops;
> > > > +       rc = misc_register(&pcc->mdev);
> > > > +       if (rc) {
> > > > +               dev_err(dev, "Couldn't register misc
> > > > device\n");
> > > > +               goto err_free_kfifo;
> > > > +       }
> > > 
> > > You cannot expose user-space interfaces from SoC drivers. Use
> > > appropriate subsystem for this with proper ABI documentation.
> > > 
> > > See:
> > > https://lore.kernel.org/all/bc5118f2-8982-46ff-bc75-d0c71475e909@app.f
> > > astmail.com/
> > > and more discussions on LKML
> > 
> > Further, drivers/misc/aspeed-lpc-snoop.c already exists:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
> > 9f4f9ae81d0affc182f54dd00285ddb90e0b3ae1
> > 
> > Kevin: Did you consider reworking it?
> Andrew: No, I do not rework it but add the post code capture driver
> using the SNOOP registers. As a result, I add some code in
> aspeed_a2600_15 to check the SNOOP enable bit. PCC driver probe abort
> if snoop is enabled.

Hmm, I think OpenBMC's history regarding POST code support caused some
confusion on my part. For whatever reason, the snoop device was used as
a source of POST codes despite the existence of the dedicated POST code
hardware since at least the AST2400, but...

> PCC is used for port I/O byte snooping over eSPI.

... it seems that they're largely interchangeable, just with different
hardware features (PCC has DMA)? My impression is that the snoop device
could also be used over eSPI?

> 
> 
> > 
> > Nuvoton have a similar capability in their NPCM BMC SoC(s) with the
> > "BPC"
> > ("BIOS POST Code" controller). There should be some consensus on
> > the binding
> > and userspace interface.

This is still the case.

Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ