-
Notifications
You must be signed in to change notification settings - Fork 3
/
libbch_data.c
55 lines (51 loc) · 3.62 KB
/
libbch_data.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* lib/bch.c test data. A known page written with the SW library used
* to confirm the general algorithm we're doing to determine the value
* of prim_poly is correct. In this case we know:
* init_bch(m:13, t:8, 0)
* init_bch: prim_poly: 8219
*/
#include <stdint.h>
#include "misc.h"
const uint8_t data[ECCSIZE] = {
0x34, 0x04, 0xcc, 0x3e, 0xdb, 0xdf, 0x0d, 0x82, 0x3d, 0xb0, 0x4a, 0xbd, 0xee, 0x7a, 0xce, 0x3f,
0x0e, 0x60, 0x14, 0x8f, 0x28, 0x2a, 0xee, 0x61, 0xed, 0x18, 0xf7, 0xf4, 0x54, 0xe9, 0x1a, 0xe0,
0x3b, 0x70, 0x05, 0x3c, 0xb6, 0xa2, 0x56, 0x70, 0x8b, 0xaf, 0x0c, 0xc2, 0xf1, 0x69, 0x69, 0x42,
0xff, 0x53, 0x77, 0x2d, 0x9b, 0x54, 0x1d, 0xa4, 0xf0, 0x23, 0xcc, 0xaf, 0x5a, 0x7b, 0x91, 0x88,
0x89, 0x6c, 0xc4, 0x2d, 0xb9, 0xab, 0xf1, 0x3f, 0x47, 0x17, 0x8f, 0xca, 0x75, 0x9f, 0x01, 0xd6,
0xe5, 0x2d, 0x5e, 0xb9, 0x20, 0x6d, 0x6e, 0xff, 0x4d, 0x5a, 0xc3, 0x9c, 0x51, 0x50, 0x65, 0x09,
0x6a, 0x0b, 0xc4, 0x93, 0x6f, 0xbf, 0x25, 0x73, 0x18, 0x02, 0x46, 0x43, 0x19, 0x45, 0xa4, 0xe6,
0xfc, 0xa5, 0xed, 0xdc, 0x54, 0x46, 0x85, 0x58, 0xd0, 0x07, 0x61, 0x8b, 0x57, 0xb9, 0x3a, 0x33,
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, 0x88, 0x98, 0xdf, 0xff, 0xf2, 0xb1, 0x40, 0xe3, 0x05, 0xc8, 0x76, 0xb7
};
/*
* These are the ECC values from lib/bch.c masked with the values of
* the same algorithm run on an empty page (that has been masked with 0xff).
*/
const uint8_t ecc_data[ECCBYTES] = {
0xe5, 0xae, 0xde, 0x4, 0xd4, 0xa1, 0x3a, 0xc3, 0x82, 0xa9, 0x62,
0x9c, 0x12,
};