Máté Kukri has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43133 )
Change subject: baytrail RFC: native replacement for refcode.elf ......................................................................
baytrail RFC: native replacement for refcode.elf
- This is a reverse engineered re-implementation of refcode.elf on Bay Trail - What should be done with all the magic numbers? - Is the ModPhy table considered data and can remain in a header or is it considered a blob and should be placed elsewhere? - What is the "coreboot style" of doing all the MMIO access?
Change-Id: I91977c509022b0078804dc151d27296260e24bc4 --- A src/soc/intel/baytrail/include/soc/modphy.h M src/soc/intel/baytrail/refcode.c 2 files changed, 785 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/43133/1
diff --git a/src/soc/intel/baytrail/include/soc/modphy.h b/src/soc/intel/baytrail/include/soc/modphy.h new file mode 100644 index 0000000..30df97a --- /dev/null +++ b/src/soc/intel/baytrail/include/soc/modphy.h @@ -0,0 +1,575 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _MODPHY_H_ +#define _MODPHY_H_ + +static u32 baytrail_modphy_table[] = { + 0x000000a6, 0x0000804c, 0x0000ffff, 0xebeb0000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000806c, 0x0000ffff, 0xebeb0000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080ec, 0x0000ffff, 0xebeb0000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002208, 0xfffffff3, 0x00000008, 0x00000000, 0x00000001, + 0x000000a3, 0x00002408, 0xfffffff3, 0x00000008, 0x00000000, 0x00000001, + 0x000000a3, 0x00002238, 0xfffffff8, 0x00000006, 0x00000000, 0x00000001, + 0x000000a3, 0x00002438, 0xfffffff8, 0x00000006, 0x00000000, 0x00000001, + 0x000000a3, 0x0000800c, 0xffffff00, 0x0000001e, 0x00000000, 0x00000001, + 0x000000a3, 0x0000802c, 0xffffff00, 0x0000001e, 0x00000000, 0x00000001, + 0x000000a3, 0x0000808c, 0xffffff00, 0x0000001e, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0x0000ffff, 0x22220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000806c, 0x0000ffff, 0x22220000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080ec, 0x0000ffff, 0x22220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000810c, 0x3fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e0, 0xffff00ff, 0x00005000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002254, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xffffdfff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000290, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000490, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000690, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000890, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080a4, 0xffff0000, 0x0000f487, 0x00000000, 0x00000001, + 0x000000a6, 0x00000314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000714, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000914, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00008094, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008034, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008094, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008034, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008014, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e8, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008068, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e8, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008068, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008048, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e8, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008068, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e8, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008068, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008048, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e8, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008068, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e8, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008068, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008048, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000803c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000809c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000801c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000803c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000809c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008060, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e0, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008040, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008060, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e0, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008100, 0xfffffffc, 0x00000003, 0x00000000, 0x00000001, + 0x000000a6, 0x0000804c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000806c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080ec, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000806c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080ec, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000804c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000806c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080ec, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000806c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080ec, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002300, 0xfffffff0, 0x00000009, 0x00000000, 0x00000001, + 0x000000a3, 0x00002500, 0xfffffff0, 0x00000009, 0x00000000, 0x00000001, + 0x000000a6, 0x00000314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000714, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000914, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00002254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000654, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000854, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000654, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000854, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xffffdfff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080c0, 0xffffdfff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xffffdfff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080c0, 0xffffdfff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00002444, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002444, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002318, 0x0000ffff, 0x45140000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002300, 0x80ffffff, 0x02000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002304, 0xff80ffff, 0x00020000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000231c, 0xffffff00, 0x0000000d, 0x00000000, 0x00000001, + 0x000000a3, 0x00002518, 0x0000ffff, 0x47140000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002500, 0x80ffffff, 0x04000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002504, 0xff80ffff, 0x00040000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000251c, 0xffffff00, 0x0000000d, 0x00000000, 0x00000001, + 0x00000043, 0x00007f04, 0xffff0000, 0x00004700, 0x00000006, 0x00000007, + 0x00000043, 0x00004100, 0xfff00000, 0x00049209, 0x00000006, 0x00000007, + 0x00000043, 0x00004200, 0xfff00000, 0x00049209, 0x00000006, 0x00000007, + 0x00000043, 0x00004300, 0xfff00000, 0x00049209, 0x00000006, 0x00000007, + 0x00000043, 0x00004400, 0xfff00000, 0x00049209, 0x00000006, 0x00000007, + 0x00000043, 0x00004500, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x00000043, 0x00004600, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x00000043, 0x00004700, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x00000043, 0x00004800, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x000000a3, 0x00008100, 0xfffffcff, 0x00000300, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0x0000ffff, 0x85850000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002290, 0x00ffffff, 0x00600000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002490, 0x00ffffff, 0x00600000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000230c, 0xff00ffff, 0x00020000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000250c, 0xff00ffff, 0x00020000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080d0, 0xffffff0f, 0x00000050, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0xffff00ff, 0x0000a000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0xffff00ff, 0x0000a000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0xffff00ff, 0x0000a000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0xffff00ff, 0x0000a000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000290, 0xffff00ff, 0x00005500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000290, 0xff00ffff, 0x003b0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000490, 0xffff00ff, 0x00005500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000490, 0xff00ffff, 0x003b0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000690, 0xffff00ff, 0x00005500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000690, 0xff00ffff, 0x003b0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000890, 0xffff00ff, 0x00005500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000890, 0xff00ffff, 0x003b0000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000030c, 0xffffff00, 0x0000009c, 0x00000000, 0x00000001, + 0x000000a6, 0x0000030c, 0xffff00ff, 0x00004b00, 0x00000000, 0x00000001, + 0x000000a6, 0x00000318, 0xff00ffff, 0x009c0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000318, 0x00ffffff, 0x4b000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000050c, 0xffffff00, 0x0000009c, 0x00000000, 0x00000001, + 0x000000a6, 0x0000050c, 0xffff00ff, 0x00004b00, 0x00000000, 0x00000001, + 0x000000a6, 0x00000518, 0xff00ffff, 0x009c0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000518, 0x00ffffff, 0x4b000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000070c, 0xffffff00, 0x0000009c, 0x00000000, 0x00000001, + 0x000000a6, 0x0000070c, 0xffff00ff, 0x00004b00, 0x00000000, 0x00000001, + 0x000000a6, 0x00000718, 0xff00ffff, 0x009c0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000718, 0x00ffffff, 0x4b000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000090c, 0xffffff00, 0x0000009c, 0x00000000, 0x00000001, + 0x000000a6, 0x0000090c, 0xffff00ff, 0x00004b00, 0x00000000, 0x00000001, + 0x000000a6, 0x00000918, 0xff00ffff, 0x009c0000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000918, 0x00ffffff, 0x4b000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffff7, 0x00000008, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffff7, 0x00000008, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffff7, 0x00000008, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffff7, 0x00000008, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffffb, 0x00000004, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffffb, 0x00000004, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffffb, 0x00000004, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffffb, 0x00000004, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffffd, 0x00000002, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffffd, 0x00000002, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffffd, 0x00000002, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffffd, 0x00000002, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff9ff, 0x00000200, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff9ff, 0x00000200, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff9ff, 0x00000200, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff9ff, 0x00000200, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff9ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff9ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff9ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff9ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff9ff, 0x00000600, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0x00ffffff, 0x95000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff9ff, 0x00000600, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0x00ffffff, 0x95000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff9ff, 0x00000600, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0x00ffffff, 0x95000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff9ff, 0x00000600, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0x00ffffff, 0x95000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffff7, 0x00000008, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffff7, 0x00000008, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffffb, 0x00000004, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffffb, 0x00000004, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffffd, 0x00000002, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffffd, 0x00000002, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffff9ff, 0x00000200, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffff9ff, 0x00000200, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffff9ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffff9ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffff9ff, 0x00000600, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0x00ffffff, 0x95000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a3, 0x00002244, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffff9ff, 0x00000600, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0x00ffffff, 0x95000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffeff, 0x00000100, 0x00000000, 0x00000001, + 0x000000a3, 0x00002444, 0xfffffeff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000804c, 0x0000ffff, 0xebeb0000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000806c, 0x0000ffff, 0xebeb0000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080ec, 0x0000ffff, 0xebeb0000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002208, 0xfffffff3, 0x00000008, 0x00000000, 0x00000001, + 0x000000a3, 0x00002408, 0xfffffff3, 0x00000008, 0x00000000, 0x00000001, + 0x000000a3, 0x00002238, 0xfffffff8, 0x00000006, 0x00000000, 0x00000001, + 0x000000a3, 0x00002438, 0xfffffff8, 0x00000006, 0x00000000, 0x00000001, + 0x000000a3, 0x0000800c, 0xffffff00, 0x0000001e, 0x00000000, 0x00000001, + 0x000000a3, 0x0000802c, 0xffffff00, 0x0000001e, 0x00000000, 0x00000001, + 0x000000a3, 0x0000808c, 0xffffff00, 0x0000001e, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0x0000ffff, 0x22220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000806c, 0x0000ffff, 0x22220000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080ec, 0x0000ffff, 0x22220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000810c, 0x3fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e0, 0xffff00ff, 0x00005000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002254, 0xffff00ff, 0x00008000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xffffdfff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0xffff00ff, 0x00009800, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0xff00ffff, 0x00800000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xf3ffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xcfffffff, 0x30000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xcfffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xf3ffffff, 0x0c000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000288, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000488, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000688, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000888, 0x00ffffff, 0x55000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xffffff00, 0x00000046, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xffff00ff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000028c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000048c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000068c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000088c, 0xff00ffff, 0x00780000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000290, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000490, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000690, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000890, 0x00ffffff, 0xc0000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000294, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000494, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000694, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000894, 0x7fffffff, 0x80000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080a4, 0xffff0000, 0x0000f487, 0x00000000, 0x00000001, + 0x000000a6, 0x00000314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000714, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000914, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00008094, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008034, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008014, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008094, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008034, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008014, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e8, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008068, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008048, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e8, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008068, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008048, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e8, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008068, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008048, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e8, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008068, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008048, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e8, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008068, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008048, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e8, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008068, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008048, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000801c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000803c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000809c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000801c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000803c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000809c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008040, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008060, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080e0, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008040, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008060, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080e0, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00008100, 0xfffffffc, 0x00000003, 0x00000000, 0x00000001, + 0x000000a6, 0x0000804c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000806c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080ec, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000806c, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080ec, 0x00ffffff, 0x43000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000804c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000806c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080ec, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000804c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000806c, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080ec, 0xff00ffff, 0x00220000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002300, 0xfffffff0, 0x00000009, 0x00000000, 0x00000001, + 0x000000a3, 0x00002500, 0xfffffff0, 0x00000009, 0x00000000, 0x00000001, + 0x000000a6, 0x00000314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000714, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00000914, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002314, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a3, 0x00002514, 0xfffffff8, 0x00000007, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xfffff3ff, 0x00000c00, 0x00000000, 0x00000001, + 0x000000a3, 0x000080c0, 0xfffff3ff, 0x00000c00, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00002254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000654, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00000854, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0xffff00ff, 0x00009500, 0x00000000, 0x00000001, + 0x000000a6, 0x00000254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000654, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000854, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000654, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00000854, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002254, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002454, 0xff00ffff, 0x00950000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xffffdfff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080c0, 0xffffdfff, 0x00002000, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xfffff3ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a3, 0x000080c0, 0xfffff3ff, 0x00000400, 0x00000000, 0x00000001, + 0x000000a6, 0x000080c0, 0xffffdfff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x000080c0, 0xffffdfff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00002444, 0xfffff7ff, 0x00000800, 0x00000000, 0x00000001, + 0x000000a6, 0x00000244, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000444, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000644, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00000844, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002244, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00002444, 0xfffff7ff, 0x00000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002318, 0x0000ffff, 0x45140000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002300, 0x80ffffff, 0x02000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002304, 0xff80ffff, 0x00020000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000231c, 0xffffff00, 0x0000000d, 0x00000000, 0x00000001, + 0x000000a3, 0x00002518, 0x0000ffff, 0x47140000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002500, 0x80ffffff, 0x04000000, 0x00000000, 0x00000001, + 0x000000a3, 0x00002504, 0xff80ffff, 0x00040000, 0x00000000, 0x00000001, + 0x000000a3, 0x0000251c, 0xffffff00, 0x0000000d, 0x00000000, 0x00000001, + 0x00000043, 0x00007f04, 0xffff0000, 0x00004700, 0x00000006, 0x00000007, + 0x00000043, 0x00004100, 0xfff00000, 0x0004fa01, 0x00000006, 0x00000007, + 0x00000043, 0x00004200, 0xfff00000, 0x0004ea01, 0x00000006, 0x00000007, + 0x00000043, 0x00004300, 0xfff00000, 0x00049209, 0x00000006, 0x00000007, + 0x00000043, 0x00004400, 0xfff00000, 0x00049209, 0x00000006, 0x00000007, + 0x00000043, 0x00004122, 0x00000000, 0x00004011, 0x00000006, 0x00000007, + 0x00000043, 0x00004222, 0x00000000, 0x06004015, 0x00000006, 0x00000007, + 0x00000043, 0x00004500, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x00000043, 0x00004600, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x00000043, 0x00004700, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x00000043, 0x00004800, 0xffff7fff, 0x00000000, 0x00000006, 0x00000007, + 0x000000a6, 0x00008014, 0xf8ffffff, 0x05000000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008048, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008048, 0xffe0ffff, 0x00100000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008048, 0xffffff0f, 0x00000000, 0x00000000, 0x00000001, + 0x000000a6, 0x0000801c, 0xff3fffff, 0x00c00000, 0x00000000, 0x00000001, + 0x000000a6, 0x00008040, 0xefffffff, 0x00000000, 0x00000000, 0x00000001, +}; + +#define BAYTRAIL_MODPHY_ENTRY_LEN 6 + +#define BAYTRAIL_MODPHY_REVB_OFFSET 0 +#define BAYTRAIL_MODPHY_REVB_ENTRIES 331 + +#define BAYTRAIL_MODPHY_REVA_OFFSET 1986 +#define BAYTRAIL_MODPHY_REVA_ENTRIES 218 + +#define BAYTRAIL_MODPHY_REVB_OFFSET2 3294 +#define BAYTRAIL_MODPHY_REVB_ENTRIES2 6 + +#endif diff --git a/src/soc/intel/baytrail/refcode.c b/src/soc/intel/baytrail/refcode.c index 297ed9c..e99a9be 100644 --- a/src/soc/intel/baytrail/refcode.c +++ b/src/soc/intel/baytrail/refcode.c @@ -1,15 +1,18 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <acpi/acpi.h> -#include <cbmem.h> #include <console/console.h> #include <console/streams.h> #include <cpu/x86/tsc.h> +#include <soc/ramstage.h> +#include <soc/modphy.h> + +#if 0 + +#include <acpi/acpi.h> +#include <cbmem.h> #include <program_loading.h> #include <rmodule.h> #include <stage_cache.h> - -#include <soc/ramstage.h> #include <soc/efi_wrapper.h>
static void ABI_X86 send_to_console(unsigned char b) @@ -81,3 +84,206 @@ return; } } + +#endif + +static u8 mmio_read_8(u32 addr) +{ + return *(u8 *) addr; +} + +static u32 mmio_read_32(u32 addr) +{ + return *(u32 *) addr; +} + +static void mmio_write_32(u32 addr, u32 val) +{ + *(u32 *) addr = val; +} + +static void mmio_or_32(u32 addr, u32 val) +{ + u32 tmp; + + tmp = mmio_read_32(addr); + mmio_write_32(addr, tmp | val); +} + +static void mmio_and_32(u32 addr, u32 val) +{ + u32 tmp; + + tmp = mmio_read_32(addr); + mmio_write_32(addr, tmp & val); +} + +static void mmio_andor_32(u32 addr, u32 val1, u32 val2) +{ + u32 tmp; + + tmp = mmio_read_32(addr); + mmio_write_32(addr, (tmp & val1) | val2); +} + +static u8 soc_stepping_table[] = + { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6 }; + +#define SOC_STEPPING_UNKNOWN 7 + +static int get_soc_stepping(void) +{ + u8 idx; + + idx = mmio_read_8(0xE00F8008) - 1; + return idx < ARRAY_SIZE(soc_stepping_table) ? + soc_stepping_table[idx] : SOC_STEPPING_UNKNOWN; +} + +static void program_modphy_table(u32 *table, u32 entries) +{ + u32 tmp; + + for (; entries; --entries, table += BAYTRAIL_MODPHY_ENTRY_LEN) { + mmio_write_32(0xE00000D8, table[1] & 0xffffff00); + mmio_write_32(0xE00000D0, 0xf0 + | ((table[1] & 0xff) << 8) + | ((table[0] & 0xff) << 16) + | ((table[4] & 0xff) << 24)); + tmp = mmio_read_32(0xE00000D4); + mmio_write_32(0xE00000D8, table[1] & 0xffffff00); + mmio_write_32(0xE00000D4, (tmp & table[2]) | table[3]); + mmio_write_32(0xE00000D0, 0xf0 + | ((table[1] & 0xff) << 8) + | ((table[0] & 0xff) << 16) + | ((table[5] & 0xff) << 24)); + } +} + +static inline u64 rdtsc64(void) +{ + struct tsc_struct tscval; + + tscval = rdtsc(); + return (u64) tscval.hi << 32 | (u64) tscval.lo; +} + +static void delay_usecs(u64 usecs) +{ + u64 needed_ticks, start_ticks; + + needed_ticks = usecs * tsc_freq_mhz(); + start_ticks = rdtsc64(); + while (start_ticks - rdtsc64() < needed_ticks) + ; +} + +static void do_magic_writes(void) +{ + mmio_or_32(0xFED0C698, 1); + mmio_or_32(0xFED0C698, 4); + mmio_and_32(0xFED0C698, 0xFFFFFFFD); + mmio_and_32(0xFED0C690, 0xFFFFFFF8); + delay_usecs(100); + mmio_and_32(0xFED0C698, 0xFFFFFFFE); + delay_usecs(100); + mmio_write_32(0xFED0C830, 0x78480); + delay_usecs(40); + mmio_write_32(0xFED0C830, 0x78080); + mmio_or_32(0xFED0C698, 1); + delay_usecs(100); + mmio_or_32(0xFED0C698, 2); + mmio_and_32(0xFED0C698, 0xFFFFFFFB); + mmio_andor_32(0xFED0C690, 0xFFFFFFF8, 1); +} + +static void do_magic_writes2(void) +{ + u32 tmp; + + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D0, 0x10030BF0); + tmp = mmio_read_32(0x0E00000D4); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, (tmp & 0xC0D0D0D0) | 0x1F2F2F2F); + + mmio_write_32(0xE00000D0, 0x11030BF0); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D0, 0x100021F0); + tmp = mmio_read_32(0xE00000D4); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, tmp | 0x80000100); + + mmio_write_32(0xE00000D0, 0x110021F0); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D0, 0x100060F0); + tmp = mmio_read_32(0xE00000D4); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, tmp | 0x7FFFFFFF); + + mmio_write_32(0xE00000D0, 0x110060F0); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D0, 0x100841F0); + tmp = mmio_read_32(0xE00000D4); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, tmp | 0x7FFFFFFF); + + mmio_write_32(0xE00000D0, 0x110841F0); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, 0x70008); + mmio_write_32(0xE00000D0, 0x110843F0); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D0, 0x100203F0); + tmp = mmio_read_32(0xE00000D4); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, tmp | 0x110430); + + mmio_write_32(0xE00000D0, 0x110203F0); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D0, 0x110204F0); + tmp = mmio_read_32(0xE00000D4); + mmio_write_32(0xE00000D8, 0); + mmio_write_32(0xE00000D4, tmp | 0x40010); + mmio_write_32(0xE00000D0, 0x110204F0); +} + +/* + * Replacment for refcode.elf + */ +void baytrail_run_reference_code(void) +{ + int stepping, pollcnt; + u32 addr, val; + + printk(BIOS_DEBUG, "refcode entry\n"); + + stepping = get_soc_stepping(); + if (stepping > 1) { + printk(BIOS_DEBUG, "SOC B0 and later ModPhy Table programming\n"); + program_modphy_table( + baytrail_modphy_table + BAYTRAIL_MODPHY_REVB_OFFSET2, + BAYTRAIL_MODPHY_REVB_ENTRIES2); + program_modphy_table( + baytrail_modphy_table + BAYTRAIL_MODPHY_REVB_OFFSET, + BAYTRAIL_MODPHY_REVB_ENTRIES); + } else { + printk(BIOS_DEBUG, "SOC A0/A1 ModPhy Table programming\n"); + program_modphy_table( + baytrail_modphy_table + BAYTRAIL_MODPHY_REVA_OFFSET, + BAYTRAIL_MODPHY_REVA_ENTRIES); + } + + addr = (mmio_read_32(0xE00F8044) & 0xFFFFFE00) + 0xB0; + mmio_or_32(addr, 8); + for (pollcnt = 0; pollcnt < 10; ++pollcnt) { + val = mmio_read_32(addr); + printk(BIOS_DEBUG, "Polling bit3 of R_PCH_PMC_MTPMC1 = %x\n", val); + if (!(val & 8)) + break; + } + + do_magic_writes(); + do_magic_writes2(); + + printk(BIOS_DEBUG, "refcode exit\n"); +}