Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Issue 6690023: CHROMIUMOS: chromeos_acpi: Introduce ability to handle buffers. (Closed)

Created:
9 years, 9 months ago by vb
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org, vb+kernel_google.com, Olof Johansson, sleffler+cc_chromium.org, msb+croskernel_chromium.org
Visibility:
Public.

Description

Introduce the ability to handle ACPI buffers. ChromeOS needs to be able to receive assorted information from the BIOS. Passing it in an opaque buffer structure seems an obvious choice. This change adds the ability to handle ACPI buffers in chromeos_acpi driver. It turned out that chromeos_acpi can not be converted into a removable module anymore, which made debugging difficult (full kernel recompilation needed, if something goes wrong - the machine is hosed, etc.) This change restores the option of building chromeos_acpi as a module, maintaining status quo (it is built in by default). chromeos_acpi_exit() is copied from the original implementation. chromeos_acpi driver is architectured such that ACPI object values are represented as strings. This addition converts converts the binary buffer contents into a multiline string (16 bytes representes in %.2.x format in each) line. Change-Id: I8db12454e48db5dddb56a11836ad2d8fd8b6d7bf Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>; BUG=chromium-os:13069, chromium-os:13091 TEST=manual For two cases, when chromeos_acpi is configured as a module and not: - build system image, modify it for test - install it on an target with BIOS supplying a chromeos ACPI buffer object - restart the machine - observe the contents of the VDAT object: localhost tmp # cat /sys/devices/platform/chromeos_acpi/VDAT 11 22 33 44 f7 1f 1c 40 96 57 74 41 cc dd ee ff In case it is configured as a module: - observe that chromeos_acpi can be removed/reinstalled: localhost tmp # rmmod chromeos_acpi localhost tmp # modprobe chromeos_acpi localhost tmp # rmmod chromeos_acpi localhost tmp # modprobe chromeos_acpi - temporarily modify the module to print 5 bytes per string - try installing the changed module and examine VDAT again: localhost tmp # cat /sys/devices/platform/chromeos_acpi/VDAT 11 22 33 44 f7 1f 1c 40 96 57 74 41 cc dd ee ff Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=9e2f48b

Patch Set 1 : Enable Chromeos ACPI buffer handling. #

Total comments: 28

Patch Set 2 : Address review comments. #

Patch Set 3 : Address review comments and presubmit warning. #

Total comments: 1

Patch Set 4 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -20 lines) Patch
M drivers/platform/x86/Kconfig View 1 1 chunk +2 lines, -2 lines 0 comments Download
M drivers/platform/x86/chromeos.c View 1 2 chunks +11 lines, -1 line 0 comments Download
M drivers/platform/x86/chromeos_acpi.c View 1 2 8 chunks +99 lines, -17 lines 0 comments Download
M include/linux/chromeos_platform.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
vb
9 years, 9 months ago (2011-03-14 20:58:59 UTC) #1
Randall Spangler
http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/chromeos_acpi.c File drivers/platform/x86/chromeos_acpi.c (right): http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/chromeos_acpi.c#newcode402 drivers/platform/x86/chromeos_acpi.c:402: /* one newline per line, all rounded up, plust ...
9 years, 9 months ago (2011-03-14 21:22:28 UTC) #2
Olof Johansson
Hi, comments below. http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/Kconfig File drivers/platform/x86/Kconfig (right): http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/Kconfig#newcode465 drivers/platform/x86/Kconfig:465: default y New config options should ...
9 years, 9 months ago (2011-03-14 21:24:32 UTC) #3
vb
Guys, I am about to retest it, please have another look. http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/Kconfig File drivers/platform/x86/Kconfig (right): ...
9 years, 9 months ago (2011-03-14 22:00:04 UTC) #4
Olof Johansson
http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/chromeos_acpi.c File drivers/platform/x86/chromeos_acpi.c (right): http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/chromeos_acpi.c#newcode333 drivers/platform/x86/chromeos_acpi.c:333: #ifdef CONFIG_CHROMEOS On 2011/03/14 22:00:04, vb wrote: > On ...
9 years, 9 months ago (2011-03-14 22:28:46 UTC) #5
vb
PLA http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/chromeos_acpi.c File drivers/platform/x86/chromeos_acpi.c (right): http://codereview.chromium.org/6690023/diff/4001/drivers/platform/x86/chromeos_acpi.c#newcode333 drivers/platform/x86/chromeos_acpi.c:333: #ifdef CONFIG_CHROMEOS On 2011/03/14 22:28:47, Olof Johansson wrote: ...
9 years, 9 months ago (2011-03-14 22:55:25 UTC) #6
Randall Spangler
LGTM
9 years, 9 months ago (2011-03-15 01:28:27 UTC) #7
Olof Johansson
9 years, 9 months ago (2011-03-15 17:05:09 UTC) #8
One nit left, please fix that before pushing but otherwise LGTM.

http://codereview.chromium.org/6690023/diff/9006/include/linux/chromeos_platf...
File include/linux/chromeos_platform.h (right):

http://codereview.chromium.org/6690023/diff/9006/include/linux/chromeos_platf...
include/linux/chromeos_platform.h:26: #include <linux/errno.h>
All includes should be done at the top of the file, please move this up.

Powered by Google App Engine
This is Rietveld 408576698