test/py: use default load address for tftp
PATCH 1/1 test/py: use default load address for tftp
On x86_64 the size of the file u-boot loaded by the tftp test has grown in size such that when loading the file to 0x200000 it overwrites a memory area reserved for PCI.
If no load address is specified for tftp do not use the ram base address (or if zero 0x200000) but the default address.
---
Currently there is a bug in net/tftp.c introduced by commit a156c47e39ad ("tftp: prevent overwriting reserved memory") which does not allow loading to the second DRAM bank. Simon Goldschmidt is working to fix it.
Due to this bug with the proposed patch we see a Travis CI error for vexpress_ca15_tc2_defconfig and vexpress_ca9x4_defconfig.
--- test/py/tests/test_net.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
test/py/tests/test_net.py +5 -4
@@ -145,11 +145,12 @@ def test_net_tftpboot(u_boot_console): pytest.skip('No TFTP readable file to read') addr = f.get('addr', None) - if not addr: - addr = u_boot_utils.find_ram_base(u_boot_console) fn = f['fn'] - output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn)) + if not addr: + output = u_boot_console.run_command('tftpboot %s' % (fn)) + else: + output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn)) expected_text = 'Bytes transferred = ' sz = f.get('size', None) if sz:
@@ -163,7 +164,7 @@ def test_net_tftpboot(u_boot_console): if u_boot_console.config.buildconfig.get('config_cmd_crc32', 'n') != 'y': return - output = u_boot_console.run_command('crc32 %x $filesize' % addr) + output = u_boot_console.run_command('crc32 $fileaddr $filesize') assert expected_crc in output @pytest.mark.buildconfigspec('cmd_nfs')
Signature · 1 line
2.20.1
PATCH 1/1 test/py: use default load address for tftp
Quoted 4 lines · Heinrich Schuchardt
On
x86_64the size of the file u-boot loaded by the tftp test has grown in size such that when loading the file to0x200000it overwrites a memory area reserved for PCI.
Quoted 8 lines
If no load address is specified for tftp do not use the ram base address (or if zero
0x200000) but the default address.Signed-off-by Heinrich Schuchardt <[email protected]>---
Currently there is a bug innet/tftp.cintroduced by commita156c47e39ad("tftp: prevent overwriting reserved memory") which does not allow loading to the second DRAM bank. Simon Goldschmidt is working to fix it.
Yes, a real bug and good job sorting it out.
Quoted 2 lines
Due to this bug with the proposed patch we see a Travis CI error for
vexpress_ca15_tc2_defconfigandvexpress_ca9x4_defconfig.
It's breaking with whatever additional changes you're testing. Please just put this change in your WIP branch until Simon has fixed the problem you've found. Alternatively, fork uboot-test-hooks and make your WIP trees use that fork which specifies a different address to use for tftp? Or am I missing something else? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190126/c982505e/attachment.sig>
PATCH 1/1 test/py: use default load address for tftp
Quoted 16 lines · Tom Rini
Quoted 4 lines · Heinrich Schuchardt
On
x86_64the size of the file u-boot loaded by the tftp test has grown in size such that when loading the file to0x200000it overwrites a memory area reserved for PCI.Quoted 8 lines
If no load address is specified for tftp do not use the ram base address (or if zero
0x200000) but the default adI dress.Signed-off-by Heinrich Schuchardt <[email protected]>---
Currently there is a bug innet/tftp.cintroduced by commita156c47e39ad("tftp: prevent overwriting reserved memory") which does not allow loading to the second DRAM bank. Simon Goldschmidt is working to fix it.Yes, a real bug and good job sorting it out.
Quoted 9 lines
Quoted 2 lines
Due to this bug with the proposed patch we see a Travis CI error for
vexpress_ca15_tc2_defconfigandvexpress_ca9x4_defconfig.It's breaking with whatever additional changes you're testing. Please just put this change in your WIP branch until Simon has fixed the problem you've found. Alternatively, fork uboot-test-hooks and make your WIP trees use that fork which specifies a different address to use for tftp? Or am I missing something else? Thanks!
I can well understand that you do not want to see this this patch merged before Simon Goldschimidt's patch.
Maybe I should have also added a reference to this patch:
x86: #define CONFIG_LOADADDR 0x1100000
https://lists.denx.de/pipermail/u-boot/2019-January/356108.html
All three corrections are needed to let the efi-next patch queue
(https://github.com/agraf/u-boot/commits/efi-next) pass Travis CI testing.
Best regards
Heinrich
PATCH 1/1 test/py: use default load address for tftp
In reply to Heinrich SchuchardtQuoted 6 lines · Heinrich Schuchardt
On
x86_64the size of the file u-boot loaded by the tftp test has grown in size such that when loading the file to0x200000it overwrites a memory area reserved for PCI.If no load address is specified for tftp do not use the ram base address (or if zero
0x200000) but the default address.
I assume that default is $loadaddr? If so, then this patch seems fine.
PATCH 1/1 test/py: use default load address for tftp
Quoted 10 lines · Stephen Warren
Quoted 6 lines · Heinrich Schuchardt
On
x86_64the size of the file u-boot loaded by the tftp test has grown in size such that when loading the file to0x200000it overwrites a memory area reserved for PCI.If no load address is specified for tftp do not use the ram base address (or if zero
0x200000) but the default address.I assume that default is $loadaddr? If so, then this patch seems fine.
Thanks for reviewing.
Yes, the address tftp filename uses is environment variable loadaddr.
This is specified in cmd/net.c, function netboot_common():
188 /* pre-set load_addr */
189 s = env_get("loadaddr");
Best regards
Heinrich Schuchardt
PATCH 1/1 test/py: use default load address for tftp
In reply to Heinrich SchuchardtQuoted 8 lines · Heinrich Schuchardt
On
x86_64the size of the file u-boot loaded by the tftp test has grown in size such that when loading the file to0x200000it overwrites a memory area reserved for PCI.If no load address is specified for tftp do not use the ram base address (or if zero
0x200000) but the default address.Signed-off-by Heinrich Schuchardt <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190212/3141a6e0/attachment.sig>