pmu/fuc: don't use movw directly anymore
PATCH 1/1 pmu/fuc: don't use movw directly anymore
fixes compilation issues with recent envytools, because movw was removed from fuc5, because it doesn't exist there anymore. The current code is most likely broken for fuc5 hardware as well and might have triggered all kinds of random memory reclocking fails.
Changes in fuc3 binaries are tue do opcode optimizations using shorter opcodes when possible.
--- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 746 +++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 802 ++++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 1006 +++++++++++++------------- drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc | 30 +- 4 files changed, 1292 insertions(+), 1292 deletions(-)
drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h +373 -373
@@ -46,8 +46,8 @@ static uint32_t gf100_pmu_data[] = {0x00000000 ,0x00000000 ,0x584d454d , -0x00000756 , -0x00000748 , +0x00000754 , +0x00000746 ,0x00000000 ,0x00000000 , 0x00000000,
@@ -68,8 +68,8 @@ static uint32_t gf100_pmu_data[] = {0x00000000 ,0x00000000 ,0x46524550 , -0x0000075a ,0x00000758 , +0x00000756 ,0x00000000 ,0x00000000 , 0x00000000,
@@ -90,8 +90,8 @@ static uint32_t gf100_pmu_data[] = {0x00000000 ,0x00000000 ,0x5f433249 , -0x00000b8a , -0x00000a2d , +0x00000b88 , +0x00000a2b ,0x00000000 ,0x00000000 , 0x00000000,
@@ -112,8 +112,8 @@ static uint32_t gf100_pmu_data[] = {0x00000000 ,0x00000000 ,0x54534554 , -0x00000bb3 , -0x00000b8c , +0x00000bb1 , +0x00000b8a ,0x00000000 ,0x00000000 , 0x00000000,
@@ -134,8 +134,8 @@ static uint32_t gf100_pmu_data[] = {0x00000000 ,0x00000000 ,0x454c4449 , -0x00000bbf ,0x00000bbd , +0x00000bbb ,0x00000000 ,0x00000000 , 0x00000000,
@@ -236,19 +236,19 @@ static uint32_t gf100_pmu_data[] = {0x000005d3 ,0x00000003 ,0x00000002 , -0x0000069d , +0x0000069b ,0x00040004 ,0x00000000 , -0x000006b9 , +0x000006b7 ,0x00010005 ,0x00000000 , -0x000006d6 , +0x000006d4 ,0x00010006 ,0x00000000 ,0x0000065b ,0x00000007 ,0x00000000 , -0x000006e1 , +0x000006df ,/* 0x03c4: memx_func_tail */ /* 0x03c4: memx_ts_start */ 0x00000000,
@@ -1372,432 +1372,432 @@ static uint32_t gf100_pmu_code[] = {/* 0x065b: memx_func_wait_vblank */ 0x9800f840 ,0x66b00016 , -0x130bf400 , +0x120bf400 ,0xf40166b0 ,0x0ef4060b ,/* 0x066d: memx_func_wait_vblank_head1 */ -0x2077f12e , -0x070ef400 , -/* 0x0674: memx_func_wait_vblank_head0 */ -0x000877f1 , -/* 0x0678: memx_func_wait_vblank_0 */ -0x07c467f1 , -0xcf0664b6 , -0x67fd0066 , -0xf31bf404 , -/* 0x0688: memx_func_wait_vblank_1 */ -0x07c467f1 , -0xcf0664b6 , -0x67fd0066 , -0xf30bf404 , -/* 0x0698: memx_func_wait_vblank_fini */ -0xf80410b6 , -/* 0x069d: memx_func_wr32 */ -0x00169800 , -0xb6011598 , -0x60f90810 , -0xd0fc50f9 , -0x21f4e0fc , -0x0242b640 , -0xf8e91bf4 , -/* 0x06b9: memx_func_wait */ -0x2c87f000 , -0xcf0684b6 , -0x1e980088 , -0x011d9800 , -0x98021c98 , -0x10b6031b , -0xa321f410 , -/* 0x06d6: memx_func_delay */ -0x1e9800f8 , -0x0410b600 , -0xf87e21f4 , -/* 0x06e1: memx_func_train */ -/* 0x06e3: memx_exec */ -0xf900f800 , -0xb9d0f9e0 , -0xb2b902c1 , -/* 0x06ed: memx_exec_next */ -0x00139802 , -0xe70410b6 , -0xe701f034 , -0xb601e033 , -0x30f00132 , -0xde35980c , -0x12b855f9 , -0xe41ef406 , -0x98f10b98 , -0xcbbbf20c , -0xc4b7f102 , -0x06b4b607 , -0xfc00bbcf , -0xf5e0fcd0 , -0xf8033621 , -/* 0x0729: memx_info */ -0x01c67000 , -/* 0x072f: memx_info_data */ -0xf10e0bf4 , -0xf103ccc7 , -0xf40800b7 , -/* 0x073a: memx_info_train */ -0xc7f10b0e , -0xb7f10bcc , -/* 0x0742: memx_info_send */ -0x21f50100 , -0x00f80336 , -/* 0x0748: memx_recv */ -0xf401d6b0 , -0xd6b0980b , -0xd80bf400 , -/* 0x0756: memx_init */ -0x00f800f8 , -/* 0x0758: perf_recv */ -/* 0x075a: perf_init */ +0x2077f02c , +/* 0x0673: memx_func_wait_vblank_head0 */ +0xf0060ef4 , +/* 0x0676: memx_func_wait_vblank_0 */ +0x67f10877 , +0x64b607c4 , +0x0066cf06 , +0xf40467fd , +/* 0x0686: memx_func_wait_vblank_1 */ +0x67f1f31b , +0x64b607c4 , +0x0066cf06 , +0xf40467fd , +/* 0x0696: memx_func_wait_vblank_fini */ +0x10b6f30b , +/* 0x069b: memx_func_wr32 */ +0x9800f804 , +0x15980016 , +0x0810b601 , +0x50f960f9 , +0xe0fcd0fc , +0xb64021f4 , +0x1bf40242 , +/* 0x06b7: memx_func_wait */ +0xf000f8e9 , +0x84b62c87 , +0x0088cf06 , +0x98001e98 , +0x1c98011d , +0x031b9802 , +0xf41010b6 , +0x00f8a321 , +/* 0x06d4: memx_func_delay */ +0xb6001e98 , +0x21f40410 , +/* 0x06df: memx_func_train */ +0xf800f87e , +/* 0x06e1: memx_exec */ +0xf9e0f900 , +0x02c1b9d0 , +/* 0x06eb: memx_exec_next */ +0x9802b2b9 , +0x10b60013 , +0xf034e704 , +0xe033e701 , +0x0132b601 , +0x980c30f0 , +0x55f9de35 , +0xf40612b8 , +0x0b98e41e , +0xf20c98f1 , +0xf102cbbb , +0xb607c4b7 , +0xbbcf06b4 , +0xfcd0fc00 , +0x3621f5e0 , +/* 0x0727: memx_info */ +0x7000f803 , +0x0bf401c6 , +/* 0x072d: memx_info_data */ +0xccc7f10e , +0x00b7f103 , +0x0b0ef408 , +/* 0x0738: memx_info_train */ +0x0bccc7f1 , +0x0100b7f1 , +/* 0x0740: memx_info_send */ +0x033621f5 , +/* 0x0746: memx_recv */ +0xd6b000f8 , +0x980bf401 , +0xf400d6b0 , +0x00f8d80b , +/* 0x0754: memx_init */ +/* 0x0756: perf_recv */ 0x00f800f8 , -/* 0x075c: i2c_drive_scl */ -0xf40036b0 , -0x07f1110b , -0x04b607e0 , -0x0001d006 , -0x00f804bd , -/* 0x0770: i2c_drive_scl_lo */ -0x07e407f1 , -0xd00604b6 , -0x04bd0001 , -/* 0x077e: i2c_drive_sda */ +/* 0x0758: perf_init */ +/* 0x075a: i2c_drive_scl */ 0x36b000f8 ,0x110bf400 ,0x07e007f1 ,0xd00604b6 , -0x04bd0002 , -/* 0x0792: i2c_drive_sda_lo */ +0x04bd0001 , +/* 0x076e: i2c_drive_scl_lo */ 0x07f100f8 ,0x04b607e4 , +0x0001d006 , +0x00f804bd , +/* 0x077c: i2c_drive_sda */ +0xf40036b0 , +0x07f1110b , +0x04b607e0 ,0x0002d006 ,0x00f804bd , -/* 0x07a0: i2c_sense_scl */ -0xf10132f4 , -0xb607c437 , -0x33cf0634 , -0x0431fd00 , -0xf4060bf4 , -/* 0x07b6: i2c_sense_scl_done */ -0x00f80131 , -/* 0x07b8: i2c_sense_sda */ -0xf10132f4 , -0xb607c437 , -0x33cf0634 , -0x0432fd00 , -0xf4060bf4 , -/* 0x07ce: i2c_sense_sda_done */ -0x00f80131 , -/* 0x07d0: i2c_raise_scl */ -0x47f140f9 , -0x37f00898 , -0x5c21f501 , -/* 0x07dd: i2c_raise_scl_wait */ -0xe8e7f107 , -0x7e21f403 , -0x07a021f5 , -0xb60901f4 , -0x1bf40142 , -/* 0x07f1: i2c_raise_scl_done */ -0xf840fcef , -/* 0x07f5: i2c_start */ -0xa021f500 , -0x0d11f407 , -0x07b821f5 , -0xf40611f4 , -/* 0x0806: i2c_start_rep */ -0x37f0300e , -0x5c21f500 , -0x0137f007 , -0x077e21f5 , -0xb60076bb , -0x50f90465 , -0xbb046594 , -0x50bd0256 , -0xfc0475fd , -0xd021f550 , -0x0464b607 , -/* 0x0833: i2c_start_send */ -0xf01f11f4 , +/* 0x0790: i2c_drive_sda_lo */ +0x07e407f1 , +0xd00604b6 , +0x04bd0002 , +/* 0x079e: i2c_sense_scl */ +0x32f400f8 , +0xc437f101 , +0x0634b607 , +0xfd0033cf , +0x0bf40431 , +0x0131f406 , +/* 0x07b4: i2c_sense_scl_done */ +/* 0x07b6: i2c_sense_sda */ +0x32f400f8 , +0xc437f101 , +0x0634b607 , +0xfd0033cf , +0x0bf40432 , +0x0131f406 , +/* 0x07cc: i2c_sense_sda_done */ +/* 0x07ce: i2c_raise_scl */ +0x40f900f8 , +0x089847f1 , +0xf50137f0 , +/* 0x07db: i2c_raise_scl_wait */ +0xf1075a21 , +0xf403e8e7 , +0x21f57e21 , +0x01f4079e , +0x0142b609 , +/* 0x07ef: i2c_raise_scl_done */ +0xfcef1bf4 , +/* 0x07f3: i2c_start */ +0xf500f840 , +0xf4079e21 , +0x21f50d11 , +0x11f407b6 , +0x300ef406 , +/* 0x0804: i2c_start_rep */ +0xf50037f0 , +0xf0075a21 , +0x21f50137 , +0x76bb077c , +0x0465b600 , +0x659450f9 , +0x0256bb04 , +0x75fd50bd , +0xf550fc04 , +0xb607ce21 , +0x11f40464 , +/* 0x0831: i2c_start_send */ +0x0037f01f , +0x077c21f5 , +0x1388e7f1 , +0xf07e21f4 ,0x21f50037 , -0xe7f1077e , +0xe7f1075a ,0x21f41388 , -0x0037f07e , -0x075c21f5 , -0x1388e7f1 , -/* 0x084f: i2c_start_out */ -0xf87e21f4 , -/* 0x0851: i2c_stop */ -0x0037f000 , -0x075c21f5 , -0xf50037f0 , -0xf1077e21 , -0xf403e8e7 , -0x37f07e21 , -0x5c21f501 , -0x88e7f107 , -0x7e21f413 , +/* 0x084d: i2c_start_out */ +/* 0x084f: i2c_stop */ +0xf000f87e , +0x21f50037 , +0x37f0075a , +0x7c21f500 , +0xe8e7f107 , +0x7e21f403 ,0xf50137f0 , -0xf1077e21 , +0xf1075a21 ,0xf41388e7 , -0x00f87e21 , -/* 0x0884: i2c_bitw */ -0x077e21f5 , -0x03e8e7f1 , -0xbb7e21f4 , -0x65b60076 , -0x9450f904 , -0x56bb0465 , -0xfd50bd02 , -0x50fc0475 , -0x07d021f5 , -0xf40464b6 , -0xe7f11811 , -0x21f41388 , -0x0037f07e , -0x075c21f5 , -0x1388e7f1 , -/* 0x08c3: i2c_bitw_out */ -0xf87e21f4 , -/* 0x08c5: i2c_bitr */ -0x0137f000 , -0x077e21f5 , -0x03e8e7f1 , -0xbb7e21f4 , -0x65b60076 , -0x9450f904 , -0x56bb0465 , -0xfd50bd02 , -0x50fc0475 , -0x07d021f5 , -0xf40464b6 , -0x21f51b11 , -0x37f007b8 , -0x5c21f500 , +0x37f07e21 , +0x7c21f501 ,0x88e7f107 ,0x7e21f413 , -0xf4013cf0 , -/* 0x090a: i2c_bitr_done */ -0x00f80131 , -/* 0x090c: i2c_get_byte */ -0xf00057f0 , -/* 0x0912: i2c_get_byte_next */ -0x54b60847 , -0x0076bb01 , +/* 0x0882: i2c_bitw */ +0x21f500f8 , +0xe7f1077c , +0x21f403e8 , +0x0076bb7e ,0xf90465b6 ,0x04659450 ,0xbd0256bb ,0x0475fd50 ,0x21f550fc , -0x64b608c5 , -0x2b11f404 , -0xb60553fd , -0x1bf40142 , -0x0137f0d8 , -0xb60076bb , -0x50f90465 , -0xbb046594 , -0x50bd0256 , -0xfc0475fd , -0x8421f550 , -0x0464b608 , -/* 0x095c: i2c_get_byte_done */ -/* 0x095e: i2c_put_byte */ -0x47f000f8 , -/* 0x0961: i2c_put_byte_next */ -0x0142b608 , -0xbb3854ff , +0x64b607ce , +0x1811f404 , +0x1388e7f1 , +0xf07e21f4 , +0x21f50037 , +0xe7f1075a , +0x21f41388 , +/* 0x08c1: i2c_bitw_out */ +/* 0x08c3: i2c_bitr */ +0xf000f87e , +0x21f50137 , +0xe7f1077c , +0x21f403e8 , +0x0076bb7e , +0xf90465b6 , +0x04659450 , +0xbd0256bb , +0x0475fd50 , +0x21f550fc , +0x64b607ce , +0x1b11f404 , +0x07b621f5 , +0xf50037f0 , +0xf1075a21 , +0xf41388e7 , +0x3cf07e21 , +0x0131f401 , +/* 0x0908: i2c_bitr_done */ +/* 0x090a: i2c_get_byte */ +0x57f000f8 , +0x0847f000 , +/* 0x0910: i2c_get_byte_next */ +0xbb0154b6 ,0x65b60076 ,0x9450f904 ,0x56bb0465 ,0xfd50bd02 ,0x50fc0475 , -0x088421f5 , +0x08c321f5 ,0xf40464b6 , -0x46b03411 , -0xd81bf400 , -0xb60076bb , -0x50f90465 , -0xbb046594 , -0x50bd0256 , -0xfc0475fd , -0xc521f550 , -0x0464b608 , -0xbb0f11f4 , -0x36b00076 , -0x061bf401 , -/* 0x09b7: i2c_put_byte_done */ -0xf80132f4 , -/* 0x09b9: i2c_addr */ -0x0076bb00 , +0x53fd2b11 , +0x0142b605 , +0xf0d81bf4 , +0x76bb0137 , +0x0465b600 , +0x659450f9 , +0x0256bb04 , +0x75fd50bd , +0xf550fc04 , +0xb6088221 , +/* 0x095a: i2c_get_byte_done */ +0x00f80464 , +/* 0x095c: i2c_put_byte */ +/* 0x095f: i2c_put_byte_next */ +0xb60847f0 , +0x54ff0142 , +0x0076bb38 ,0xf90465b6 ,0x04659450 ,0xbd0256bb ,0x0475fd50 ,0x21f550fc , -0x64b607f5 , -0x2911f404 , -0x012ec3e7 , -0xfd0134b6 , -0x76bb0553 , +0x64b60882 , +0x3411f404 , +0xf40046b0 , +0x76bbd81b ,0x0465b600 ,0x659450f9 ,0x0256bb04 ,0x75fd50bd ,0xf550fc04 , -0xb6095e21 , -/* 0x09fe: i2c_addr_done */ -0x00f80464 , -/* 0x0a00: i2c_acquire_addr */ -0xb6f8cec7 , -0xe0b702e4 , -0xee980d1c , -/* 0x0a0f: i2c_acquire */ -0xf500f800 , -0xf40a0021 , -0xd9f00421 , -0x4021f403 , -/* 0x0a1e: i2c_release */ -0x21f500f8 , -0x21f40a00 , -0x03daf004 , -0xf84021f4 , -/* 0x0a2d: i2c_recv */ -0x0132f400 , -0xb6f8c1c7 , -0x16b00214 , -0x3a1ff528 , -0xf413a001 , -0x0032980c , -0x0ccc13a0 , -0xf4003198 , -0xd0f90231 , -0xd0f9e0f9 , -0x000067f1 , -0x100063f1 , -0xbb016792 , +0xb608c321 , +0x11f40464 , +0x0076bb0f , +0xf40136b0 , +0x32f4061b , +/* 0x09b5: i2c_put_byte_done */ +/* 0x09b7: i2c_addr */ +0xbb00f801 ,0x65b60076 ,0x9450f904 ,0x56bb0465 ,0xfd50bd02 ,0x50fc0475 , -0x0a0f21f5 , -0xfc0464b6 , -0x00d6b0d0 , -0x00b31bf5 , -0xbb0057f0 , -0x65b60076 , -0x9450f904 , -0x56bb0465 , -0xfd50bd02 , -0x50fc0475 , -0x09b921f5 , -0xf50464b6 , -0xc700d011 , -0x76bbe0c5 , -0x0465b600 , -0x659450f9 , -0x0256bb04 , -0x75fd50bd , -0xf550fc04 , -0xb6095e21 , -0x11f50464 , -0x57f000ad , +0x07f321f5 , +0xf40464b6 , +0xc3e72911 , +0x34b6012e , +0x0553fd01 , +0xb60076bb , +0x50f90465 , +0xbb046594 , +0x50bd0256 , +0xfc0475fd , +0x5c21f550 , +0x0464b609 , +/* 0x09fc: i2c_addr_done */ +/* 0x09fe: i2c_acquire_addr */ +0xcec700f8 , +0x02e4b6f8 , +0x0d1ce0b7 , +0xf800ee98 , +/* 0x0a0d: i2c_acquire */ +0xfe21f500 , +0x0421f409 , +0xf403d9f0 , +0x00f84021 , +/* 0x0a1c: i2c_release */ +0x09fe21f5 , +0xf00421f4 , +0x21f403da , +/* 0x0a2b: i2c_recv */ +0xf400f840 , +0xc1c70132 , +0x0214b6f8 , +0xf52816b0 , +0xa0013a1f , +0x980cf413 , +0x13a00032 , +0x31980ccc , +0x0231f400 , +0xe0f9d0f9 , +0x67f1d0f9 , +0x63f10000 , +0x67921000 ,0x0076bb01 ,0xf90465b6 ,0x04659450 ,0xbd0256bb ,0x0475fd50 ,0x21f550fc , -0x64b609b9 , -0x8a11f504 , +0x64b60a0d , +0xb0d0fc04 , +0x1bf500d6 , +0x57f000b3 ,0x0076bb00 ,0xf90465b6 ,0x04659450 ,0xbd0256bb ,0x0475fd50 ,0x21f550fc , -0x64b6090c , -0x6a11f404 , -0xbbe05bcb , +0x64b609b7 , +0xd011f504 , +0xe0c5c700 , +0xb60076bb , +0x50f90465 , +0xbb046594 , +0x50bd0256 , +0xfc0475fd , +0x5c21f550 , +0x0464b609 , +0x00ad11f5 , +0xbb0157f0 ,0x65b60076 ,0x9450f904 ,0x56bb0465 ,0xfd50bd02 ,0x50fc0475 , -0x085121f5 , -0xb90464b6 , -0x74bd025b , -/* 0x0b33: i2c_recv_not_rd08 */ -0xb0430ef4 , -0x1bf401d6 , -0x0057f03d , -0x09b921f5 , -0xc73311f4 , -0x21f5e0c5 , -0x11f4095e , -0x0057f029 , -0x09b921f5 , -0xc71f11f4 , -0x21f5e0b5 , -0x11f4095e , -0x5121f515 , -0xc774bd08 , -0x1bf408c5 , -0x0232f409 , -/* 0x0b73: i2c_recv_not_wr08 */ -/* 0x0b73: i2c_recv_done */ -0xc7030ef4 , -0x21f5f8ce , -0xe0fc0a1e , -0x12f4d0fc , -0x027cb90a , -0x033621f5 , -/* 0x0b88: i2c_recv_exit */ -/* 0x0b8a: i2c_init */ -0x00f800f8 , -/* 0x0b8c: test_recv */ -0x05d817f1 , +0x09b721f5 , +0xf50464b6 , +0xbb008a11 , +0x65b60076 , +0x9450f904 , +0x56bb0465 , +0xfd50bd02 , +0x50fc0475 , +0x090a21f5 , +0xf40464b6 , +0x5bcb6a11 , +0x0076bbe0 , +0xf90465b6 , +0x04659450 , +0xbd0256bb , +0x0475fd50 , +0x21f550fc , +0x64b6084f , +0x025bb904 , +0x0ef474bd , +/* 0x0b31: i2c_recv_not_rd08 */ +0x01d6b043 , +0xf03d1bf4 , +0x21f50057 , +0x11f409b7 , +0xe0c5c733 , +0x095c21f5 , +0xf02911f4 , +0x21f50057 , +0x11f409b7 , +0xe0b5c71f , +0x095c21f5 , +0xf51511f4 , +0xbd084f21 , +0x08c5c774 , +0xf4091bf4 , +0x0ef40232 , +/* 0x0b71: i2c_recv_not_wr08 */ +/* 0x0b71: i2c_recv_done */ +0xf8cec703 , +0x0a1c21f5 , +0xd0fce0fc , +0xb90a12f4 , +0x21f5027c , +/* 0x0b86: i2c_recv_exit */ +0x00f80336 , +/* 0x0b88: i2c_init */ +/* 0x0b8a: test_recv */ +0x17f100f8 , +0x14b605d8 , +0x0011cf06 , +0xf10110b6 , +0xb605d807 , +0x01d00604 , +0xf104bd00 , +0xf1d900e7 , +0xf5134fe3 , +0xf8025621 , +/* 0x0bb1: test_init */ +0x00e7f100 , +0x5621f508 , +/* 0x0bbb: idle_recv */ +0xf800f802 , +/* 0x0bbd: idle */ +0x0031f400 , +0x05d417f1 ,0xcf0614b6 ,0x10b60011 , -0xd807f101 , +0xd407f101 ,0x0604b605 ,0xbd0001d0 , -0x00e7f104 , -0x4fe3f1d9 , -0x5621f513 , -/* 0x0bb3: test_init */ -0xf100f802 , -0xf50800e7 , -0xf8025621 , -/* 0x0bbd: idle_recv */ -/* 0x0bbf: idle */ -0xf400f800 , -0x17f10031 , -0x14b605d4 , -0x0011cf06 , -0xf10110b6 , -0xb605d407 , -0x01d00604 , -/* 0x0bdb: idle_loop */ -0xf004bd00 , -0x32f45817 , -/* 0x0be1: idle_proc */ -/* 0x0be1: idle_proc_exec */ -0xb910f902 , -0x21f5021e , -0x10fc033f , -0xf40911f4 , -0x0ef40231 , -/* 0x0bf5: idle_proc_next */ -0x5810b6ef , -0xf4061fb8 , -0x02f4e61b , -0x0028f4dd , -0x00bb0ef4 , +/* 0x0bd9: idle_loop */ +0x5817f004 , +/* 0x0bdf: idle_proc */ +/* 0x0bdf: idle_proc_exec */ +0xf90232f4 , +0x021eb910 , +0x033f21f5 , +0x11f410fc , +0x0231f409 , +/* 0x0bf3: idle_proc_next */ +0xb6ef0ef4 , +0x1fb85810 , +0xe61bf406 , +0xf4dd02f4 , +0x0ef40028 , +0x000000bb ,0x00000000 ,0x00000000 , 0x00000000,
drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h +401 -401
917 lines not on this page · raw message
drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h +503 -503
1,125 lines not on this page · raw message
drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc +15 -15
@@ -82,15 +82,15 @@ memx_train_tail: // $r0 - zero memx_func_enter: #if NVKM_PPWR_CHIPSET == GT215 - movw $r8 0x1610 + mov $r8 0x1610 nv_rd32($r7, $r8) imm32($r6, 0xfffffffc) and $r7 $r6 - movw $r6 0x2 + mov $r6 0x2 or $r7 $r6 nv_wr32($r8, $r7) #else - movw $r6 0x001620 + mov $r6 0x001620 imm32($r7, ~0x00000aa2); nv_rd32($r8, $r6) and $r8 $r7
@@ -101,7 +101,7 @@ memx_func_enter: and $r8 $r7 nv_wr32($r6, $r8) - movw $r6 0x0026f0 + mov $r6 0x0026f0 nv_rd32($r8, $r6) and $r8 $r7 nv_wr32($r6, $r8)
@@ -136,19 +136,19 @@ memx_func_leave: bra nz #memx_func_leave_wait #if NVKM_PPWR_CHIPSET == GT215 - movw $r8 0x1610 + mov $r8 0x1610 nv_rd32($r7, $r8) imm32($r6, 0xffffffcc) and $r7 $r6 nv_wr32($r8, $r7) #else - movw $r6 0x0026f0 + mov $r6 0x0026f0 imm32($r7, 0x00000001) nv_rd32($r8, $r6) or $r8 $r7 nv_wr32($r6, $r8) - movw $r6 0x001620 + mov $r6 0x001620 nv_rd32($r8, $r6) or $r8 $r7 nv_wr32($r6, $r8)
@@ -177,11 +177,11 @@ memx_func_wait_vblank: bra #memx_func_wait_vblank_fini memx_func_wait_vblank_head1: - movw $r7 0x20 + mov $r7 0x20 bra #memx_func_wait_vblank_0 memx_func_wait_vblank_head0: - movw $r7 0x8 + mov $r7 0x8 memx_func_wait_vblank_0: nv_iord($r6, NV_PPWR_INPUT)
@@ -273,13 +273,13 @@ memx_func_train: // $r5 - outer loop counter // $r6 - inner loop counter // $r7 - entry counter (#memx_train_head + $r7) - movw $r5 0x3 - movw $r7 0x0 + mov $r5 0x3 + mov $r7 0x0 // Read random memory to wake up... things imm32($r9, 0x700000) nv_rd32($r8,$r9) - movw $r14 0x2710 + mov $r14 0x2710 call(nsec) memx_func_train_loop_outer:
@@ -289,9 +289,9 @@ memx_func_train: nv_wr32($r9, $r8) push $r5 - movw $r6 0x0 + mov $r6 0x0 memx_func_train_loop_inner: - movw $r8 0x1111 + mov $r8 0x1111 mulu $r9 $r6 $r8 shl b32 $r8 $r9 0x10 or $r8 $r9
@@ -315,7 +315,7 @@ memx_func_train: // $r5 - inner inner loop counter // $r9 - result - movw $r5 0 + mov $r5 0 imm32($r9, 0x8300ffff)
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.14.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Part of the diff is not shown here. View the raw message.
A message that is not in the archive (sent off-list or not yet received): 20171101165131.7222-1-kherbst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 7 lines · Karol Herbst
fixes compilation issues with recent envytools, because movw was removed from fuc5, because it doesn't exist there anymore. The current code is most likely broken for fuc5 hardware as well and might have triggered all kinds of random memory reclocking fails.
Changes in fuc3 binaries are tue do opcode optimizations using shorter opcodes when possible.
Might I suggest the following wording for the commit:
---------------8<----------------
Fixes failure to compile with recent envyas as a result of the 'movw' alias being removed for v5.
A bit of history:
v3 only has a 16-bit sign-extended immediate mov op. In order to set the high bits, there's a separate 'sethi' op. envyas validates that the value passed to mov(imm) is between -0x8000 and 0x7fff. In order to simplify macros that load both the low and high word, a 'movw' alias was added which takes an unsigned 16-bit immediate. However the actual hardware op still sign extends.
v5 has a full 32-bit immediate mov op. The v3 16-bit immediate mov op is gone (loads 0 into the dst reg). However due to a bug in envyas, the movw alias still existed, and selected the no-longer-present v3 16-bit immediate mov op. As a result usage of movw on v5 is the same as mov with a 0x0 argument.
The proper fix throughout is to only ever use the 'movw' alias in combination with 'sethi'. Anything else should get the sign-extended validation to ensure that the intended value ends up in the destination register.
Changes in fuc3 binaries is the result of a different encoding being selected for a mov with an 8-bit value. ---------------8<----------------
Quoted 9 lines
Signed-off-by Karol Herbst <[email protected]>--- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 746 +++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 802 ++++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 1006 +++++++++++++------------- drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc | 30 +- 4 files changed, 1292 insertions(+), 1292 deletions(-)
[...]
Quoted 110 lines
drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc +15
-16@@ -82,15 +82,15 @@ memx_train_tail: // $r0 - zero memx_func_enter: #if NVKM_PPWR_CHIPSET == GT215 - movw $r8 0x1610 + mov $r8 0x1610 nv_rd32($r7, $r8) imm32($r6, 0xfffffffc) and $r7 $r6 - movw $r6 0x2 + mov $r6 0x2 or $r7 $r6 nv_wr32($r8, $r7) #else - movw $r6 0x001620 + mov $r6 0x001620 imm32($r7, ~0x00000aa2); nv_rd32($r8, $r6) and $r8 $r7@@ -101,7 +101,7 @@ memx_func_enter: and $r8 $r7 nv_wr32($r6, $r8) - movw $r6 0x0026f0 + mov $r6 0x0026f0 nv_rd32($r8, $r6) and $r8 $r7 nv_wr32($r6, $r8)@@ -136,19 +136,19 @@ memx_func_leave: bra nz #memx_func_leave_wait #if NVKM_PPWR_CHIPSET == GT215 - movw $r8 0x1610 + mov $r8 0x1610 nv_rd32($r7, $r8) imm32($r6, 0xffffffcc) and $r7 $r6 nv_wr32($r8, $r7) #else - movw $r6 0x0026f0 + mov $r6 0x0026f0 imm32($r7, 0x00000001) nv_rd32($r8, $r6) or $r8 $r7 nv_wr32($r6, $r8) - movw $r6 0x001620 + mov $r6 0x001620 nv_rd32($r8, $r6) or $r8 $r7 nv_wr32($r6, $r8)@@ -177,11 +177,11 @@ memx_func_wait_vblank: bra #memx_func_wait_vblank_fini memx_func_wait_vblank_head1: - movw $r7 0x20 + mov $r7 0x20 bra #memx_func_wait_vblank_0 memx_func_wait_vblank_head0: - movw $r7 0x8 + mov $r7 0x8 memx_func_wait_vblank_0: nv_iord($r6, NV_PPWR_INPUT)@@ -273,13 +273,13 @@ memx_func_train: // $r5 - outer loop counter // $r6 - inner loop counter // $r7 - entry counter (#memx_train_head + $r7) - movw $r5 0x3 - movw $r7 0x0 + mov $r5 0x3 + mov $r7 0x0 // Read random memory to wake up... things imm32($r9, 0x700000) nv_rd32($r8,$r9) - movw $r14 0x2710 + mov $r14 0x2710 call(nsec) memx_func_train_loop_outer:@@ -289,9 +289,9 @@ memx_func_train: nv_wr32($r9, $r8) push $r5 - movw $r6 0x0 + mov $r6 0x0 memx_func_train_loop_inner: - movw $r8 0x1111 + mov $r8 0x1111 mulu $r9 $r6 $r8 shl b32 $r8 $r9 0x10 or $r8 $r9@@ -315,7 +315,7 @@ memx_func_train: // $r5 - inner inner loop counter // $r9 - result - movw $r5 0 + mov $r5 0 imm32($r9, 0x8300ffff) memx_func_train_loop_4x: imm32($r10, 0x100080) --2.14.2
Quoted 4 lines
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): CAKb7UvhkvpVCmcjS2wq_H8az8JSNecvVVAtMZH9x71Hpu6Xezg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 30 lines · Ilia Mirkin
Quoted 7 lines · Karol Herbst
fixes compilation issues with recent envytools, because movw was removed from fuc5, because it doesn't exist there anymore. The current code is most likely broken for fuc5 hardware as well and might have triggered all kinds of random memory reclocking fails.
Changes in fuc3 binaries are tue do opcode optimizations using shorter opcodes when possible.
Might I suggest the following wording for the commit:
---------------8<----------------
Fixes failure to compile with recent envyas as a result of the 'movw' alias being removed for v5.A bit of history:
v3 only has a 16-bit sign-extended immediate mov op. In order to set the high bits, there's a separate 'sethi' op. envyas validates that the value passed to mov(imm) is between -0x8000 and
0x7fff. In order to simplify macros that load both the low and high word, a 'movw' alias was added which takes an unsigned 16-bit immediate. However the actual hardware op still sign extends.v5 has a full 32-bit immediate mov op. The v3 16-bit immediate mov op is gone (loads 0 into the dst reg). However due to a bug in envyas, the movw alias still existed, and selected the no-longer-present v3 16-bit immediate mov op. As a result usage of movw on v5 is the same as mov with a
0x0argument.
Quoted 9 lines
The proper fix throughout is to only ever use the 'movw' alias in combination with 'sethi'. Anything else should get the sign-extended validation to ensure that the intended value ends up in the destination register.
Changes in fuc3 binaries is the result of a different encoding being selected for a mov with an 8-bit value. ---------------8<----------------
yeah, that sounds perfect. Thanks!
Quoted 126 lines
Quoted 6 lines
Signed-off-by Karol Herbst <[email protected]>--- drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 746 +++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 802++++++++++----------
Quoted 1 line
drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 1006+++++++++++++-------------
Quoted 3 lines
drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc | 30 +- 4 files changed, 1292 insertions(+), 1292 deletions(-)[...]
Review
Quoted 1 line
(quoted diff) +0
-0b/drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc
Quoted 109 lines
index
ec03f9a4..1663bf94100644drm/nouveau/nvkm/subdev/pmu/fuc/memx.fuc +15
-16@@ -82,15 +82,15 @@ memx_train_tail: // $r0 - zero memx_func_enter: #if NVKM_PPWR_CHIPSET == GT215 - movw $r8 0x1610 + mov $r8 0x1610 nv_rd32($r7, $r8) imm32($r6, 0xfffffffc) and $r7 $r6 - movw $r6 0x2 + mov $r6 0x2 or $r7 $r6 nv_wr32($r8, $r7) #else - movw $r6 0x001620 + mov $r6 0x001620 imm32($r7, ~0x00000aa2); nv_rd32($r8, $r6) and $r8 $r7@@ -101,7 +101,7 @@ memx_func_enter: and $r8 $r7 nv_wr32($r6, $r8) - movw $r6 0x0026f0 + mov $r6 0x0026f0 nv_rd32($r8, $r6) and $r8 $r7 nv_wr32($r6, $r8)@@ -136,19 +136,19 @@ memx_func_leave: bra nz #memx_func_leave_wait #if NVKM_PPWR_CHIPSET == GT215 - movw $r8 0x1610 + mov $r8 0x1610 nv_rd32($r7, $r8) imm32($r6, 0xffffffcc) and $r7 $r6 nv_wr32($r8, $r7) #else - movw $r6 0x0026f0 + mov $r6 0x0026f0 imm32($r7, 0x00000001) nv_rd32($r8, $r6) or $r8 $r7 nv_wr32($r6, $r8) - movw $r6 0x001620 + mov $r6 0x001620 nv_rd32($r8, $r6) or $r8 $r7 nv_wr32($r6, $r8)@@ -177,11 +177,11 @@ memx_func_wait_vblank: bra #memx_func_wait_vblank_fini memx_func_wait_vblank_head1: - movw $r7 0x20 + mov $r7 0x20 bra #memx_func_wait_vblank_0 memx_func_wait_vblank_head0: - movw $r7 0x8 + mov $r7 0x8 memx_func_wait_vblank_0: nv_iord($r6, NV_PPWR_INPUT)@@ -273,13 +273,13 @@ memx_func_train: // $r5 - outer loop counter // $r6 - inner loop counter // $r7 - entry counter (#memx_train_head + $r7) - movw $r5 0x3 - movw $r7 0x0 + mov $r5 0x3 + mov $r7 0x0 // Read random memory to wake up... things imm32($r9, 0x700000) nv_rd32($r8,$r9) - movw $r14 0x2710 + mov $r14 0x2710 call(nsec) memx_func_train_loop_outer:@@ -289,9 +289,9 @@ memx_func_train: nv_wr32($r9, $r8) push $r5 - movw $r6 0x0 + mov $r6 0x0 memx_func_train_loop_inner: - movw $r8 0x1111 + mov $r8 0x1111 mulu $r9 $r6 $r8 shl b32 $r8 $r9 0x10 or $r8 $r9@@ -315,7 +315,7 @@ memx_func_train: // $r5 - inner inner loop counter // $r9 - result - movw $r5 0 + mov $r5 0 imm32($r9, 0x8300ffff) memx_func_train_loop_4x: imm32($r10, 0x100080) --2.14.2
Quoted 9 lines
Quoted 4 lines
_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau