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

Issue 2320003: A script for accessing reboot info in CMOS. (Closed)

Created:
10 years, 7 months ago by vb
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org
Base URL:
ssh://git@chromiumos-git/chromeos
Visibility:
Public.

Description

This is a script which allows accessing a certain byte in CMOS. See script Doc string for details of operation. This script is being added in a new directory which will host various userland utilities used to communicate with the firmware. Tested on a development machine using mock ACPI and NVRAM files and on ST8 equipped with the BIOS implementing the ChromeOS ACPI device. Below is the development machine run: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv (utils $) for de in 0 1; do > for tr in 0 1; do > for re in 0 1; do > echo; > echo "re=$re de=$de tr=$tr" > ./reboot_mode.py --nvram_file=/tmp/nvram --acpi_file=/tmp/acpi_file --de=$de --tr=$tr --re=$re > ./reboot_mode.py --acpi_file=/tmp/acpi_file --nvram_file=/tmp/nvram --de=$de --tr=$tr --re=$re > /usr/bin/od -Ax -t x1 -v /tmp/nvram | grep '^000060' | awk '{print $14}' > done > done > done re=0 de=0 tr=0 reboot_mode.py: no update required 00 re=1 de=0 tr=0 reboot_mode.py: no update required 80 re=0 de=0 tr=1 reboot_mode.py: no update required 20 re=1 de=0 tr=1 reboot_mode.py: no update required a0 re=0 de=1 tr=0 reboot_mode.py: no update required 40 re=1 de=1 tr=0 reboot_mode.py: no update required c0 re=0 de=1 tr=1 reboot_mode.py: no update required 60 re=1 de=1 tr=1 reboot_mode.py: no update required e0 (utils $) ./reboot_mode.py --acpi_file=/tmp/acpi_file --nvram_file=/tmp/nvram Current reboot mode settings: try_firmware_b : 1 recovery : 1 debug_reset : 1 (utils $) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Patch Set 1 #

Total comments: 17

Patch Set 2 : Changes based on review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -0 lines) Patch
A src/platform/utils/reboot_mode.py View 1 1 chunk +171 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
vb
10 years, 7 months ago (2010-05-28 00:48:06 UTC) #1
dhendrix
My python-fu is weak, but AFAICT the code looks okay. Let's see if nsanders can ...
10 years, 7 months ago (2010-05-28 02:56:46 UTC) #2
dhendrix
http://codereview.chromium.org/2320003/diff/1/2 File src/platform/utils/reboot_mode.py (right): http://codereview.chromium.org/2320003/diff/1/2#newcode50 src/platform/utils/reboot_mode.py:50: } It seems to my like these should be ...
10 years, 7 months ago (2010-05-28 03:21:40 UTC) #3
vb
Dave, thank you for your comments. Frankly, I don't think there is a problem reading ...
10 years, 7 months ago (2010-05-28 16:10:16 UTC) #4
Randall Spangler
http://codereview.chromium.org/2320003/diff/1/2 File src/platform/utils/reboot_mode.py (right): http://codereview.chromium.org/2320003/diff/1/2#newcode50 src/platform/utils/reboot_mode.py:50: } On 2010/05/28 03:21:40, dhendrix wrote: > It seems ...
10 years, 7 months ago (2010-05-28 16:45:59 UTC) #5
vb
guys, I addressed your comments and retested. Verified that in case byte offset exceeds the ...
10 years, 7 months ago (2010-05-28 18:24:11 UTC) #6
Randall Spangler
10 years, 7 months ago (2010-05-28 19:46:40 UTC) #7
lgtm

Powered by Google App Engine
This is Rietveld 408576698