blob: 50aabed66e85f83fd2bc60db02732f678082e746 [file] [log] [blame]
Lee Leahy77ff0b12015-05-05 15:07:29 -07001/*
Lee Leahyacb9c0b2015-07-02 11:55:18 -07002 * UEFI PEI wrapper
Lee Leahy77ff0b12015-05-05 15:07:29 -07003 *
Lee Leahy32471722015-04-20 15:20:28 -07004 * Copyright (C) 2014 Google Inc.
Lee Leahy77ff0b12015-05-05 15:07:29 -07005 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Google Inc. nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC BE LIABLE FOR ANY DIRECT,
21 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Lee Leahy32471722015-04-20 15:20:28 -070025 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lee Leahy77ff0b12015-05-05 15:07:29 -070027 */
28
Lee Leahy32471722015-04-20 15:20:28 -070029#ifndef _PEI_DATA_H_
30#define _PEI_DATA_H_
Lee Leahy77ff0b12015-05-05 15:07:29 -070031
Lee Leahy32471722015-04-20 15:20:28 -070032#include <types.h>
Lee Leahy77ff0b12015-05-05 15:07:29 -070033
Lee Leahy32471722015-04-20 15:20:28 -070034#define PEI_VERSION 22
Lee Leahy77ff0b12015-05-05 15:07:29 -070035
Lee Leahy32471722015-04-20 15:20:28 -070036#define ABI_X86 __attribute__((regparm(0)))
37
38typedef void ABI_X86(*tx_byte_func)(unsigned char byte);
39
40struct pei_data {
41 /* Chip settings */
42 void *spd_data_ch0;
43 void *spd_data_ch1;
44 uint8_t spd_ch0_config;
45 uint8_t spd_ch1_config;
46
47 /* System state information */
48 int boot_mode;
49
50 /* Fast boot and S3 resume MRC data */
51 int saved_data_size;
52 const void *saved_data;
53 int disable_saved_data;
54
55 /* New save data from MRC */
56 int data_to_save_size;
57 void *data_to_save;
Lee Leahy77ff0b12015-05-05 15:07:29 -070058};
59
Lee Leahy32471722015-04-20 15:20:28 -070060typedef struct pei_data PEI_DATA;
Lee Leahy77ff0b12015-05-05 15:07:29 -070061
Lee Leahy32471722015-04-20 15:20:28 -070062#endif /* _PEI_DATA_H_ */