uuu
uuu (Universal Update Utility), mfgtools 3.0
Toggle main menu visibility
Loading...
Searching...
No Matches
rominfo.h
Go to the documentation of this file.
1
/*
2
* Copyright 2018 NXP.
3
*
4
* Redistribution and use in source and binary forms, with or without modification,
5
* are permitted provided that the following conditions are met:
6
*
7
* Redistributions of source code must retain the above copyright notice, this
8
* list of conditions and the following disclaimer.
9
*
10
* Redistributions in binary form must reproduce the above copyright notice, this
11
* list of conditions and the following disclaimer in the documentation and/or
12
* other materials provided with the distribution.
13
*
14
* Neither the name of the NXP Semiconductor nor the names of its
15
* contributors may be used to endorse or promote products derived from this
16
* software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
* POSSIBILITY OF SUCH DAMAGE.
29
*
30
*/
31
32
#pragma once
33
34
#include <cstdint>
35
#include <memory>
36
#include <string>
37
38
class
ConfigItem
;
39
class
FileBuffer
;
40
class
DataBuffer
;
41
42
constexpr
uint32_t
ROM_INFO_HID
= 0x1;
43
constexpr
uint32_t
ROM_INFO_HID_MX23
= 0x2;
44
constexpr
uint32_t
ROM_INFO_HID_MX50
= 0x4;
45
constexpr
uint32_t
ROM_INFO_HID_MX6
= 0x8;
46
constexpr
uint32_t
ROM_INFO_HID_SKIP_DCD
= 0x10;
47
constexpr
uint32_t
ROM_INFO_HID_MX8_MULTI_IMAGE
= 0x20;
48
constexpr
uint32_t
ROM_INFO_HID_MX8_STREAM
= 0x40;
49
constexpr
uint32_t
ROM_INFO_HID_UID_STRING
= 0x80;
50
// Omitted value: 0x100
51
// Omitted value: 0x200
52
constexpr
uint32_t
ROM_INFO_HID_NO_CMD
= 0x400;
53
constexpr
uint32_t
ROM_INFO_SPL_JUMP
= 0x800;
54
constexpr
uint32_t
ROM_INFO_HID_EP1
= 0x1000;
55
constexpr
uint32_t
ROM_INFO_HID_PACK_SIZE_1020
= 0x2000;
56
constexpr
uint32_t
ROM_INFO_HID_SDP_NO_MAX_PER_TRANS
= 0x4000;
57
constexpr
uint32_t
ROM_INFO_AUTO_SCAN_UBOOT_POS
= 0x8000;
58
constexpr
uint32_t
ROM_INFO_HID_ROMAPI
= 0x10000;
59
constexpr
uint32_t
ROM_INFO_NEED_BAREBOX_FULL_IMAGE
= 0x20000;
60
61
struct
ROM_INFO
62
{
63
const
char
*
m_name
;
64
uint32_t
free_addr
;
65
uint32_t
flags
;
66
int
serial_idx
;
67
};
68
69
const
ROM_INFO
*
search_rom_info
(
const
std::string &s);
70
const
ROM_INFO
*
search_rom_info
(
const
ConfigItem
*item);
71
72
size_t
GetContainerActualSize
(std::shared_ptr<DataBuffer> p,
size_t
offset,
bool
bROMAPI=
false
,
bool
skipspl=
false
);
73
size_t
GetFlashHeaderSize
(std::shared_ptr<DataBuffer> p,
size_t
offset = 0);
74
ConfigItem
Definition
config.h:39
DataBuffer
Definition
buffer.h:111
FileBuffer
Definition
buffer.h:164
GetFlashHeaderSize
size_t GetFlashHeaderSize(shared_ptr< DataBuffer > p, size_t offset)
Definition
rominfo.cpp:215
search_rom_info
const ROM_INFO * search_rom_info(const std::string &s)
Definition
rominfo.cpp:62
GetContainerActualSize
size_t GetContainerActualSize(shared_ptr< DataBuffer > p, size_t offset, bool bROMAPI, bool skipspl)
Definition
rominfo.cpp:131
ROM_INFO_AUTO_SCAN_UBOOT_POS
constexpr uint32_t ROM_INFO_AUTO_SCAN_UBOOT_POS
Definition
rominfo.h:57
ROM_INFO_HID_PACK_SIZE_1020
constexpr uint32_t ROM_INFO_HID_PACK_SIZE_1020
Definition
rominfo.h:55
ROM_INFO_HID_SKIP_DCD
constexpr uint32_t ROM_INFO_HID_SKIP_DCD
Definition
rominfo.h:46
ROM_INFO_HID_MX23
constexpr uint32_t ROM_INFO_HID_MX23
Definition
rominfo.h:43
ROM_INFO_HID_ROMAPI
constexpr uint32_t ROM_INFO_HID_ROMAPI
Definition
rominfo.h:58
ROM_INFO_HID_SDP_NO_MAX_PER_TRANS
constexpr uint32_t ROM_INFO_HID_SDP_NO_MAX_PER_TRANS
Definition
rominfo.h:56
ROM_INFO_HID_MX8_MULTI_IMAGE
constexpr uint32_t ROM_INFO_HID_MX8_MULTI_IMAGE
Definition
rominfo.h:47
ROM_INFO_HID
constexpr uint32_t ROM_INFO_HID
Definition
rominfo.h:42
ROM_INFO_NEED_BAREBOX_FULL_IMAGE
constexpr uint32_t ROM_INFO_NEED_BAREBOX_FULL_IMAGE
Definition
rominfo.h:59
ROM_INFO_HID_NO_CMD
constexpr uint32_t ROM_INFO_HID_NO_CMD
Definition
rominfo.h:52
ROM_INFO_SPL_JUMP
constexpr uint32_t ROM_INFO_SPL_JUMP
Definition
rominfo.h:53
ROM_INFO_HID_MX8_STREAM
constexpr uint32_t ROM_INFO_HID_MX8_STREAM
Definition
rominfo.h:48
ROM_INFO_HID_MX50
constexpr uint32_t ROM_INFO_HID_MX50
Definition
rominfo.h:44
ROM_INFO_HID_MX6
constexpr uint32_t ROM_INFO_HID_MX6
Definition
rominfo.h:45
ROM_INFO_HID_EP1
constexpr uint32_t ROM_INFO_HID_EP1
Definition
rominfo.h:54
ROM_INFO_HID_UID_STRING
constexpr uint32_t ROM_INFO_HID_UID_STRING
Definition
rominfo.h:49
ROM_INFO
Definition
rominfo.h:62
ROM_INFO::flags
uint32_t flags
Definition
rominfo.h:65
ROM_INFO::m_name
const char * m_name
Definition
rominfo.h:63
ROM_INFO::serial_idx
int serial_idx
Definition
rominfo.h:66
ROM_INFO::free_addr
uint32_t free_addr
Definition
rominfo.h:64
libuuu
rominfo.h
Generated by
1.18.0