Files
OpenCellular/include/port80.h
Duncan Laurie 3b8b1bd586 port80: Track and export last post code in previous boot
- Add a special port80 event for LPC reset assertion and use that event
to store the previous post code.
- Add a new command to retrive the last saved post code so I can easily
query it at boot/resume and log unusual codes.

BUG=none
TEST=manual (with additional coreboot/mosys changes)

- interrupt boot process by issuing x86reset on EC console or
by using warm reset button on servo
- read event log with mosys on next boot

78 | 2012-08-13 09:24:04 | System boot | 262
79 | 2012-08-13 09:24:04 | Last post code in previous boot | 0x9e
80 | 2012-08-13 09:24:04 | System Reset

Change-Id: I7b9f10442b9c468d89fde4e75adb94b0c07c2c8d
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29995
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-08-13 14:58:38 -07:00

26 lines
611 B
C

/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Port 80 module for Chrome EC */
#ifndef __CROS_EC_PORT80_H
#define __CROS_EC_PORT80_H
#include "common.h"
enum port_80_event {
PORT_80_EVENT_RESUME = 0x1001, /* S3->S0 transition */
PORT_80_EVENT_RESET = 0x1002, /* RESET transition */
};
/**
* Store data from a LPC write to port 80, or a port_80_event code.
*
* @param data Data written to port 80.
*/
void port_80_write(int data);
#endif /* __CROS_EC_PORT80_H */