Liam Girdwood | 05ef434 | 2018-02-13 20:29:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, Intel Corporation. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it |
| 5 | * under the terms and conditions of the GNU General Public License, |
| 6 | * version 2, as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope it will be useful, but WITHOUT |
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 11 | * more details. |
| 12 | */ |
| 13 | |
| 14 | #ifndef __CSE_H__ |
| 15 | #define __CSE_H__ |
| 16 | |
| 17 | #include <stdint.h> |
| 18 | |
| 19 | struct image; |
| 20 | |
| 21 | #define CSE_HEADER_MAKER 0x44504324 /* "DPC$" */ |
| 22 | |
| 23 | struct CsePartitionDirHeader { |
| 24 | uint32_t header_marker; |
| 25 | uint32_t nb_entries; |
| 26 | uint8_t header_version; |
| 27 | uint8_t entry_version; |
| 28 | uint8_t header_length; |
| 29 | uint8_t checksum; |
| 30 | uint8_t partition_name[4]; |
| 31 | } __attribute__((packed)); |
| 32 | |
| 33 | struct CsePartitionDirEntry { |
| 34 | uint8_t entry_name[12]; |
| 35 | uint32_t offset; |
| 36 | uint32_t length; |
| 37 | uint32_t reserved; |
| 38 | } __attribute__((packed)); |
| 39 | |
| 40 | void ri_cse_create(struct image *image); |
| 41 | |
| 42 | #endif |