<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firmware/google, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-10-15T18:32:26Z</updated>
<entry>
<title>gsmi: Add GSMI commands to log S0ix info</title>
<updated>2018-10-15T18:32:26Z</updated>
<author>
<name>Furquan Shaikh</name>
<email>furquan@chromium.org</email>
</author>
<published>2018-10-12T16:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8942b2d5094b01e4509f0118a7940bb07350e128'/>
<id>urn:sha1:8942b2d5094b01e4509f0118a7940bb07350e128</id>
<content type='text'>
Add new GSMI commands (GSMI_CMD_LOG_S0IX_SUSPEND = 0xa,
GSMI_CMD_LOG_S0IX_RESUME = 0xb) that allow firmware to log any
information during S0ix suspend/resume paths.

Traditional ACPI suspend S3 involves BIOS both during the suspend and
the resume paths. However, modern suspend type like S0ix does not
involve firmware on either of the paths. This command gives the
firmware an opportunity to log any required information about the
suspend and resume operations e.g. wake sources.

Additionally, this change adds a module parameter to allow platforms
to specifically enable S0ix logging if required. This prevents any
other platforms from unnecessarily making a GSMI call which could have
any side-effects.

Tested by verifying that wake sources are correctly logged in eventlog.

Signed-off-by: Furquan Shaikh &lt;furquan@chromium.org&gt;
Reviewed-by: Aaron Durbin &lt;adurbin@chromium.org&gt;
Reviewed-by: Rajat Jain &lt;rajatja@chromium.org&gt;
Signed-off-by: Furquan Shaikh &lt;furquan@google.com&gt;
Tested-by: Furquan Shaikh &lt;furquan@chromium.org&gt;
Reviewed-by: Aaron Durbin &lt;adurbin@chromium.org&gt;
[zwisler: update changelog for upstream]
Signed-off-by: Ross Zwisler &lt;zwisler@google.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gsmi: Remove autoselected dependency on EFI and EFI_VARS</title>
<updated>2018-10-15T18:32:26Z</updated>
<author>
<name>Duncan Laurie</name>
<email>dlaurie@chromium.org</email>
</author>
<published>2018-10-12T16:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d31655ba89575a2d1559a345642338eecd49c96d'/>
<id>urn:sha1:d31655ba89575a2d1559a345642338eecd49c96d</id>
<content type='text'>
Instead of selecting EFI and EFI_VARS automatically when GSMI is
enabled let that portion of the driver be conditionally compiled
if EFI and EFI_VARS are enabled.

This allows the rest of the driver (specifically event log) to
be used if EFI_VARS is not enabled.

To test:
1) verify that EFI_VARS is not automatically selected when
CONFIG_GOOGLE_GSMI is enabled
2) verify that the kernel boots on Link and that GSMI event log
is still available and functional
3) specifically boot the kernel on Alex to ensure it does not
try to load efivars and that gsmi also does not load because it
is not in the supported DMI table

Signed-off-by: Duncan Laurie &lt;dlaurie@chromium.org&gt;
Reviewed-by: Olof Johansson &lt;olofj@chromium.org&gt;
Signed-off-by: Benson Leung &lt;bleung@chromium.org&gt;
Signed-off-by: Ben Zhang &lt;benzh@chromium.org&gt;
Signed-off-by: Filipe Brandenburger &lt;filbranden@chromium.org&gt;
Signed-off-by: Furquan Shaikh &lt;furquan@google.com&gt;
Tested-by: Furquan Shaikh &lt;furquan@chromium.org&gt;
Reviewed-by: Aaron Durbin &lt;adurbin@chromium.org&gt;
[zwisler: update changelog for upstream]
Signed-off-by: Ross Zwisler &lt;zwisler@google.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gsmi: Add coreboot to list of matching BIOS vendors</title>
<updated>2018-10-15T18:32:26Z</updated>
<author>
<name>Duncan Laurie</name>
<email>dlaurie@chromium.org</email>
</author>
<published>2018-10-12T16:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=255d7447cf92821ded63079ffe4019d9f0fa0a6c'/>
<id>urn:sha1:255d7447cf92821ded63079ffe4019d9f0fa0a6c</id>
<content type='text'>
In order to use this coreboot needs board support for:
CONFIG_ELOG=y
CONFIG_ELOG_GSMI=y

And the kernel driver needs enabled:
CONFIG_GOOGLE_GSMI=y

To test, verify that clean shutdown event is added to the log:

&gt; mosys eventlog list | grep 'Clean Shutdown'
11 | 2012-06-25 09:49:24 | Kernl Event | Clean Shutdown

Signed-off-by: Duncan Laurie &lt;dlaurie@chromium.org&gt;
Reviewed-by: Vadim Bendebury &lt;vbendeb@chromium.org&gt;
Reviewed-by: Stefan Reinauer &lt;reinauer@chromium.org&gt;
Signed-off-by: Furquan Shaikh &lt;furquan@google.com&gt;
Tested-by: Furquan Shaikh &lt;furquan@chromium.org&gt;
Reviewed-by: Aaron Durbin &lt;adurbin@chromium.org&gt;
Reviewed-by: Justin TerAvest &lt;teravest@chromium.org&gt;
[zwisler: update changelog for upstream]
Signed-off-by: Ross Zwisler &lt;zwisler@google.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gsmi: Fix bug in append_to_eventlog sysfs handler</title>
<updated>2018-10-15T18:32:26Z</updated>
<author>
<name>Duncan Laurie</name>
<email>dlaurie@chromium.org</email>
</author>
<published>2018-10-12T16:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=655603de68469adaff16842ac17a5aec9c9ce89b'/>
<id>urn:sha1:655603de68469adaff16842ac17a5aec9c9ce89b</id>
<content type='text'>
The sysfs handler should return the number of bytes consumed, which in the
case of a successful write is the entire buffer.  Also fix a bug where
param.data_len was being set to (count - (2 * sizeof(u32))) instead of just
(count - sizeof(u32)).  The latter is correct because we skip over the
leading u32 which is our param.type, but we were also incorrectly
subtracting sizeof(u32) on the line where we were actually setting
param.data_len:

	param.data_len = count - sizeof(u32);

This meant that for our example event.kernel_software_watchdog with total
length 10 bytes, param.data_len was just 2 prior to this change.

To test, successfully append an event to the log with gsmi sysfs.
This sample event is for a "Kernel Software Watchdog"

&gt; xxd -g 1 event.kernel_software_watchdog
0000000: 01 00 00 00 ad de 06 00 00 00

&gt; cat event.kernel_software_watchdog &gt; /sys/firmware/gsmi/append_to_eventlog

&gt; mosys eventlog list | tail -1
14 | 2012-06-25 10:14:14 | Kernl Event | Software Watchdog

Signed-off-by: Duncan Laurie &lt;dlaurie@chromium.org&gt;
Reviewed-by: Vadim Bendebury &lt;vbendeb@chromium.org&gt;
Reviewed-by: Stefan Reinauer &lt;reinauer@chromium.org&gt;
Signed-off-by: Furquan Shaikh &lt;furquan@google.com&gt;
Tested-by: Furquan Shaikh &lt;furquan@chromium.org&gt;
Reviewed-by: Aaron Durbin &lt;adurbin@chromium.org&gt;
Reviewed-by: Justin TerAvest &lt;teravest@chromium.org&gt;
[zwisler: updated changelog for 2nd bug fix and upstream]
Signed-off-by: Ross Zwisler &lt;zwisler@google.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: vpd: fix spelling mistake "partion" -&gt; "partition"</title>
<updated>2018-09-25T18:20:58Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-09-11T16:58:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7153d9afdbd52805f99c28f51e81ee65f5dabbf8'/>
<id>urn:sha1:7153d9afdbd52805f99c28f51e81ee65f5dabbf8</id>
<content type='text'>
Trivial fix to spelling mistake in comment

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: coreboot: Only populate devices in coreboot_table_init()</title>
<updated>2018-09-14T13:37:23Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-08-15T20:37:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7adb05bb813d1ba4863c8914eead6139d3d5f8ff'/>
<id>urn:sha1:7adb05bb813d1ba4863c8914eead6139d3d5f8ff</id>
<content type='text'>
This function checks the header for sanity, registers a bus, and
populates devices for each coreboot table entry. Let's just populate
devices here and pull the other bits up into the caller so that this
function can be repurposed for pure device creation and registration.

Cc: Wei-Ning Huang &lt;wnhuang@chromium.org&gt;
Cc: Julius Werner &lt;jwerner@chromium.org&gt;
Cc: Brian Norris &lt;briannorris@chromium.org&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Suggested-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: coreboot: Remap RAM with memremap() instead of ioremap()</title>
<updated>2018-09-14T13:37:23Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-08-15T20:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7d9b5f0120eea9f0f58c2ed2b98d2fc86389af3'/>
<id>urn:sha1:a7d9b5f0120eea9f0f58c2ed2b98d2fc86389af3</id>
<content type='text'>
This is all system memory, so we shouldn't be mapping this all with
ioremap() as these aren't I/O regions. Instead, they're memory regions
so we should use memremap(). Pick MEMREMAP_WB so we can map memory from
RAM directly if that's possible, otherwise it falls back to
ioremap_cache() like is being done here already. This also nicely
silences the sparse warnings in this code and reduces the need to copy
anything around anymore.

Cc: Wei-Ning Huang &lt;wnhuang@chromium.org&gt;
Cc: Julius Werner &lt;jwerner@chromium.org&gt;
Cc: Brian Norris &lt;briannorris@chromium.org&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: coreboot: Collapse platform drivers into bus core</title>
<updated>2018-09-14T13:37:23Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-08-15T20:37:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a28aad66da8bd19b249670d003bb9a698bdda397'/>
<id>urn:sha1:a28aad66da8bd19b249670d003bb9a698bdda397</id>
<content type='text'>
The DT based and ACPI based platform drivers here do the same thing; map
some memory and hand it over to the coreboot bus to populate devices.
The only major difference is that the DT based driver doesn't map the
coreboot table header to figure out how large of a region to map for the
whole coreboot table and it uses of_iomap() instead of ioremap_cache().
A cached or non-cached mapping shouldn't matter here and mapping some
smaller region first before mapping the whole table is just more work
but should be OK. In the end, we can remove two files and combine the
code all in one place making it easier to reason about things.

We leave the old Kconfigs in place for a little while longer but make
them hidden and select the previously hidden config option. This way
users can upgrade without having to know to reselect this config in the
future. Later on we can remove the old hidden configs.

Cc: Wei-Ning Huang &lt;wnhuang@chromium.org&gt;
Cc: Julius Werner &lt;jwerner@chromium.org&gt;
Cc: Brian Norris &lt;briannorris@chromium.org&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: coreboot: Make bus registration symmetric</title>
<updated>2018-09-14T13:37:23Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-08-15T20:37:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b81e3140e4128921f25119a2b5ae0049f8373d1a'/>
<id>urn:sha1:b81e3140e4128921f25119a2b5ae0049f8373d1a</id>
<content type='text'>
The bus is registered in module_init() but is unregistered when the
platform driver remove() function calls coreboot_table_exit(). That
isn't symmetric and it causes the bus to appear on systems that compile
this code in, even when there isn't any coreboot firmware on the device.
Let's move the registration to the coreboot_table_init() function so
that it matches the exit path.

Cc: Wei-Ning Huang &lt;wnhuang@chromium.org&gt;
Cc: Julius Werner &lt;jwerner@chromium.org&gt;
Cc: Brian Norris &lt;briannorris@chromium.org&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: coreboot: Unmap ioregion after device population</title>
<updated>2018-09-14T13:37:23Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2018-08-15T20:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=20edec388277b62ddfddb8b2b376a937a2cd6d1b'/>
<id>urn:sha1:20edec388277b62ddfddb8b2b376a937a2cd6d1b</id>
<content type='text'>
Both callers of coreboot_table_init() ioremap the pointer that comes in
but they don't unmap the memory on failure. Both of them also fail probe
immediately with the return value of coreboot_table_init(), leaking a
mapping when it fails. The mapping isn't necessary at all after devices
are populated either, so we can just drop the mapping here when we exit
the function. Let's do that to simplify the code a bit and plug the leak.

Cc: Wei-Ning Huang &lt;wnhuang@chromium.org&gt;
Cc: Julius Werner &lt;jwerner@chromium.org&gt;
Cc: Brian Norris &lt;briannorris@chromium.org&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Fixes: 570d30c2823f ("firmware: coreboot: Expose the coreboot table as a bus")
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
