Re: [U-Boot] [STATUS] -rc3 is out
Hi Albert, On Fri, Dec 23, 2011 at 4:17 AM, Albert ARIBAUD wrote: > Le 23/12/2011 12:30, Wolfgang Denk a écrit : > >> Dear Albert ARIBAUD, >> >> In message<4ef452c7.1010...@aribaud.net> you wrote: >>> >>> >>> Tom Warren has requested a pull of u-boot-tegra/next into >>> u-boot-arm/master, which I assume is for inclusion into 2011.12. Once I >>> have checked that no major breakage is caused to the ARM boards, and if >>> you're ok with a last-day pull request, I'll send one out for >>> u-boot-arm/master around 14:00 GMT+1. >> >> >> That's OK with me, assuming these are only bug fixes and not new >> stuff. > > > (adding Tom) > > Hmm, there's both bug fixes and new stuff. :/ > > Tom, any possibility to quickly reorder the tegra commits in order to > separate bugfixes (in tegra/master) from new stuff (in tegra/next)? Bugfixes > could go in now. I think it is ok. Mainline does build and run for Tegra - the critical bug fix did go in ok thank you. Regards, Simon > > >> I have some last minute PPC bug fixes myself :-( >> >> >> Best regards, >> >> Wolfgang Denk >> > > > Amicalement, > -- > Albert. > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
Hi, On Fri, Dec 23, 2011 at 5:53 AM, Érico Porto wrote: > md 0 gives me in dmesg: > > > [11753.433067] u-boot[4277]: segfault at 0 ip 0805283e sp bfb809f0 > error 4 in u-boot[8048000+1a000] > > > On 12/23/11, Érico Porto wrote: >> Thanks! >> >> Tried to do some memory display commands but got instant segmentation >> fault, and tried to run it as root - but then some bad things >> happened, so now I know no one should run it as root. Good lesson to learn :-) There was a revert of the memory map code in cmd_mem.c about a month ago - if you track that down and un-revert it then md will work for you. The real fix is to devise some third meaning of a memory address (physical address, effective address, ...?) - I did post a suggestion to the list but no response and I haven't got back to it. Regards, Simon >> >> I wanted to tryout a memory test algorithm I developed, but it seem >> u-boot runs with no ram access. If I could findout the ram address >> where it is located, I think then the 8MB it says it has wouldn't give >> me segmentation fault... >> >> =>version >> >> U-Boot 2011.12-rc3 (Dec 23 2011 - 11:07:12) >> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 >> GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810 >> =>printenv >> baudrate=115200 >> stderr=serial >> stdin=serial >> stdout=serial >> >> Environment size: 66/8188 bytes >> =>bdinfo >> boot_params = 0x >> DRAM bank = 0x >> -> start = 0x >> -> size = 0x0800 >> FB base = 0x >> >> On 12/23/11, Graeme Russ wrote: >>> Hi Érico >>> >>> On 23/12/11 23:46, Érico Porto wrote: Hello, Does anyone know if exists somekind of simulator to run u-boot in test mode? >>> >>> Have a look at the sandbox 'board' - It allows U-Boot to be run as an >>> executable in Linux to test non hardware specific code >>> >>> do: >>> >>> make sandbox_config >>> make all >>> >>> Regards, >>> >>> Graeme >>> >> >> >> -- >> Érico V. Porto >> > > > -- > Érico V. Porto > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [STATUS] v2011.12 released, Merge Window is OPEN
Hello all, U-Boot v2011.12 has been released and is available from the git repository and the FTP server. ISSUES: - We still have not found a new network custodian yet. I have neither the competence nor the resources to help out much longer. - Remy Bohmer has signalled that he has no longer the resources to help as USB custodian. So we need two new custodians (net, USB), ASAP. Are there any volunteers? The Merge Window for the next release (v2012.03) is open until Mon Jan 16, 2012, 23:59:59 CEST = 24 days remaining. Release "v2012.03" is scheduled in 80 days — on March 12, 2012. A little statistics [1] - changes since release v2011.09: Processed 1530 csets from 146 developers 30 employers found A total of 136501 lines added, 116035 removed (delta 20466) This is an awful lot, nearly twice as many commits as the second place in the statistics (859 csets for v2010.12) of the last 4 years. Developers with the most changesets Wolfgang Denk 185 (12.1%) Marek Vasut167 (10.9%) Simon Glass 88 (5.8%) Anatolij Gustschin 62 (4.1%) Fabio Estevam 59 (3.9%) Kumar Gala 56 (3.7%) Heiko Schocher 50 (3.3%) Stefano Babic 49 (3.2%) Mike Frysinger 46 (3.0%) Joe Hershberger 31 (2.0%) ... Developers with the most changed lines Marek Vasut 43057 (19.8%) Mike Frysinger26703 (12.3%) Wolfgang Denk 16389 (7.5%) Joe Hershberger 6727 (3.1%) Macpaul Lin 6086 (2.8%) Sricharan 6010 (2.8%) Simon Glass 5273 (2.4%) Che-Liang Chiou 5047 (2.3%) Heiko Schocher4887 (2.2%) Jason Liu 4332 (2.0%) ... Developers with the most lines removed Mike Frysinger26037 (22.4%) Marek Vasut 20905 (18.0%) Wolfgang Denk 9360 (8.1%) Paul Gortmaker3123 (2.7%) stany MARCEL 1184 (1.0%) Stefan Roese 355 (0.3%) Chander Kashyap167 (0.1%) Yoshihiro Shimoda 132 (0.1%) Thomas Weber 113 (0.1%) Igor Grinberg 105 (0.1%) ... Developers with the most signoffs (total 456) Sandeep Paulraj131 (28.7%) Kumar Gala 83 (18.2%) Kim Phillips35 (7.7%) Anatolij Gustschin 20 (4.4%) Scott Wood 18 (3.9%) Tom Warren 14 (3.1%) Holger Brunck 13 (2.9%) Stefan Roese11 (2.4%) Kyungmin Park 11 (2.4%) Minkyu Kang 10 (2.2%) ... Developers with the most reviews (total 2) Guennadi Liakhovetski1 (50.0%) Anton Staaf 1 (50.0%) Developers with the most test credits (total 74) Simon Glass 13 (17.6%) Stefano Babic8 (10.8%) Tom Warren 6 (8.1%) Wolfgang Denk5 (6.8%) Steve Sakoman4 (5.4%) Heiko Schocher 4 (5.4%) Anatolij Gustschin 3 (4.1%) Macpaul Lin 3 (4.1%) Matthias Weisser 3 (4.1%) Thomas Chou 2 (2.7%) ... Developers who gave the most tested-by credits (total 74) Wolfgang Denk 10 (13.5%) Simon Glass 8 (10.8%) Stephen Warren 8 (10.8%) Marek Vasut 7 (9.5%) Tom Rini 5 (6.8%) Stefano Babic4 (5.4%) Anatolij Gustschin 3 (4.1%) Mike Frysinger 3 (4.1%) Philip Balister 3 (4.1%) Macpaul Lin 2 (2.7%) ... Developers with the most report credits (total 5) Mike Frysinger 1 (20.0%) Rockefeller 1 (20.0%) Shawn Bai1 (20.0%) Roland Kletzing 1 (20.0%) Michael Jones1 (20.0%) Developers who gave the most report credits (total 5) Wolfgang Denk1 (20.0%) Anatolij Gustschin 1 (20.0%) Igor Grinberg1 (20.0%) Kim Phillips 1 (20.0%) Aneesh V 1 (20.0%) Top changeset contributors by employer (Unknown) 508 (33.2%) DENX Software Engineering 377 (24.6%) Freescale 221 (14.4%) Google, Inc. 110 (7.2%) Texas Instruments 81 (5.3%) Analog Devices 46 (3.0%) Keymile 29 (1.9%) CompuLab24 (1.6%) Marvell 18 (1.2%) Graeme Russ 15 (1.0%) ... Top lines changed by employer (Unknown) 103478 (47.6%) Analog Devices27101 (12.5%) DENX Software Engineering 26873 (12.4%) Freescale 20836 (9.6%) Texas Instruments 10956 (5.0%) Google, Inc. 6176 (2.8%) Samsung 4641 (2.1%) Wind River3127 (1.4%) Boeing2303 (1.1%) Guntermann & Drunck 1683 (0.8%) ... Employers with
Re: [U-Boot] Pull request: u-boot-tegra/next
Hi Tom, Le 23/12/2011 00:17, Tom Warren a écrit : Alright, I hope I've gotten it right this time. I had already done a git fetch of the u-boot-arm master (see my very first sentence below), but regardless, I followed your 'always use commands' and I believe I've gotten a valid repo. It's pushed as both 'master' and 'next' to u-boot-tegra.git. Here's the pull request, please pull into arm master. Thanks. The following changes since commit e570fe8ef2734fddc15e086b7bc344e64c907e81: PXA: Kill last remnants of set_GPIO_mode function (2011-12-19 17:52:44 +0100) are available in the git repository at: git://git.denx.de/u-boot-tegra.git master Simon Glass (14): tegra2: Tidy UART selection tegra2: Add UARTB support tegra2: config: Enable SPI flash on Seaboard tegra2: Enable SPI environment on Seaboard tegra2: Implement SPI / UART GPIO switch tegra2: spi: Support SPI / UART switch tegra2: Plumb in SPI/UART switch code tegra: Fix build error in plutux, medcom tegra: Move cpu_init_cp15() to arch_cpu_init() tegra: Move clock_early_init() to arch_cpu_init() tegra: add clock_ll_start_uart() to enable UART prior to reloc tegra: Add a function mux feature tegra: Add support for UART init in cpu board.c tegra: Move boards over to use arch-level board UART function Thierry Reding (7): tegra2: Always build with USE_PRIVATE_LIBGCC=yes. tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000. tegra2: Move tegra2_mmc_init() prototype to public header. tegra2: Add common Avionic Design Tamonten support. tegra2: Add Avionic Design Plutux support. tegra2: Add Avionic Design Medcom support. tegra2: Optimize out-of-tree build for Ventana. Tom Warren (2): tegra2: spi: Add SPI driver for Tegra2 SOC arm: Tegra: Fix Harmony and Ventana builds in u-boot-tegra/master MAINTAINERS|5 + arch/arm/cpu/armv7/tegra2/Makefile |2 +- arch/arm/cpu/armv7/tegra2/board.c | 58 arch/arm/cpu/armv7/tegra2/clock.c | 14 + arch/arm/cpu/armv7/tegra2/config.mk|2 + arch/arm/cpu/armv7/tegra2/funcmux.c| 58 arch/arm/include/asm/arch-tegra2/board.h | 30 ++ arch/arm/include/asm/arch-tegra2/clock.h | 11 + arch/arm/include/asm/arch-tegra2/funcmux.h | 41 +++ arch/arm/include/asm/arch-tegra2/mmc.h | 27 ++ arch/arm/include/asm/arch-tegra2/tegra2.h |1 + arch/arm/include/asm/arch-tegra2/tegra2_spi.h | 76 ++ arch/arm/include/asm/arch-tegra2/uart-spi-switch.h | 46 board/avionic-design/common/tamonten.c | 116 board/avionic-design/common/tamonten.h | 32 +++ board/avionic-design/medcom/Makefile | 50 board/avionic-design/medcom/medcom.c | 45 board/avionic-design/plutux/Makefile | 50 board/avionic-design/plutux/plutux.c | 45 board/nvidia/common/Makefile | 47 board/nvidia/common/board.c| 73 + board/nvidia/common/board.h|2 +- board/nvidia/common/uart-spi-switch.c | 138 ++ board/nvidia/harmony/Makefile |1 - board/nvidia/harmony/harmony.c |2 +- board/nvidia/seaboard/Makefile |1 - board/nvidia/seaboard/seaboard.c |5 +- board/nvidia/ventana/Makefile |5 +- boards.cfg |2 + drivers/mmc/tegra2_mmc.h |2 - drivers/spi/Makefile |1 + drivers/spi/tegra2_spi.c | 279 include/configs/harmony.h |3 + include/configs/medcom.h | 64 + include/configs/plutux.h | 64 + include/configs/seaboard.h | 20 ++ include/configs/tegra2-common.h|5 +- include/configs/ventana.h |3 + 38 files changed, 1353 insertions(+), 73 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/funcmux.c create mode 100644 arch/arm/include/asm/arch-tegra2/board.h create mode 100644 arch/arm/include/asm/arch-tegra2/funcmux.h create mode 100644 arch/arm/include/asm/arch-tegra2/mmc.h create mode 100644 arch/arm/include/asm/arch-tegra2/tegra2_spi.h create mode 100644 arch/arm/include/asm/arch-tegra2/uart-spi-switch.h create mode 100644 board/avionic-design/common/tamonten.c create mode 100644 board/avionic-design/common/tamonten.h create mode 100644 board/avionic-design/medcom/Makefile
[U-Boot] [PATCH] USB: reevaluate iomux stdin on USB kbd detect
If CONSOLE_MUX is enabled, reevaluate console stdin when USB keyboard device is detected. Signed-off-by: Allen Martin --- common/usb_kbd.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index e94bb7e..577a1eb 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -493,6 +493,11 @@ int drv_usb_kbd_init(void) if (error) return error; +#ifdef CONFIG_CONSOLE_MUX + error = iomux_doenv(stdin, stdinname); + if (error) + return error; +#else /* Check if this is the standard input device. */ if (strcmp(stdinname, DEVNAME)) return 1; @@ -504,6 +509,7 @@ int drv_usb_kbd_init(void) error = console_assign(stdin, DEVNAME); if (error) return error; +#endif return 1; } -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] doc/mkimage.1: Fix -D/-f options formatting
Dear Horst Kronstorfer, In message <1324654820-24888-1-git-send-email-hkron...@frequentis.com> you wrote: > Signed-off-by: Horst Kronstorfer > --- > doc/mkimage.1 |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "(The Chief Programmer) personally defines the functional and performance specifications, designs the program, codes it, tests it, and writes its documentation... He needs great talent, ten years experience and considerable systems and applications knowledge, whether in applied mathematics, business data handling, or whatever." - Fred P. Brooks, _The Mythical Man Month_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] post/lib_powerpc/multi.c: fix stack overflow error
Dear Anatolij Gustschin, In message <20111223170640.18cfe56f@wker> you wrote: > > > The code and comment disagreed: the comment claimed that r6...r31 > > were copied, and consequently the arrays for "src" and "dst" were > > declared with 26 entries, but the actual code ("lmw r5,0(r3)" and > > "stmw r5,0(r4)") copied _27_ words (r5 through r31), which resulted > > in false "POST cpu Error at multi test" messages. > > Great! Thanks for fixing this bug! Thanks for testing and reporting it! > But I wonder why didn't we see it with U-Boot built using older > GCC versions. Yes, I was surprised,too, and suspected a compiler problem instead... > Since only 26 words will be compared after the test, the issue > only shows up if the destination buffer is placed at lower > addresses on the stack than the source buffer. In this case the > first word in the source buffer is overwritten. GCC 4.6.1 generated > code which changed the order of src[] and dst[] on the stack and > the hidden bug showed up. This matches my own analysis. Actually the code generated by gcc 4.5.1 and 4.6.1 looks _really_ different in a lot of places; it seems a lot has been changed in GCC again. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Few people do business well who do nothing else. -- Philip Earl of Chesterfield ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] post/lib_powerpc/multi.c: fix stack overflow error
Dear Wolfgang Denk, In message <1324639752-26856-3-git-send-email...@denx.de> you wrote: > The code and comment disagreed: the comment claimed that r6...r31 > were copied, and consequently the arrays for "src" and "dst" were > declared with 26 entries, but the actual code ("lmw r5,0(r3)" and > "stmw r5,0(r4)") copied _27_ words (r5 through r31), which resulted > in false "POST cpu Error at multi test" messages. > > Fix the comment and the array sizes. > > Signed-off-by: Wolfgang Denk > Cc: Anatolij Gustschin > Cc: Stefan Roese > Cc: Kumar Gala > Cc: Kim Phillips > Cc: Andy Fleming > --- > post/lib_powerpc/multi.c |8 > 1 files changed, 4 insertions(+), 4 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "Love is an ideal thing, marriage a real thing; a confusion of the real with the ideal never goes unpunished." - Goethe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] post/lib_powerpc/multi.c: code cleanup
Dear Wolfgang Denk, In message <1324639752-26856-2-git-send-email...@denx.de> you wrote: > Clean up and document the code: > > - get rid of unneeded code block > - add comment which code is generated > > Signed-off-by: Wolfgang Denk > Cc: Anatolij Gustschin > Cc: Stefan Roese > Cc: Kumar Gala > Cc: Kim Phillips > Cc: Andy Fleming > --- > post/lib_powerpc/multi.c | 27 --- > 1 files changed, 12 insertions(+), 15 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Q: What do you get when you cross an ethernet with an income statement? A: A local area networth. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] post/lib_powerpc/multi.c: make checkpatch clean
Dear Anatolij Gustschin, In message <20111223133952.5e09a8b4@wker> you wrote: > > Looks good. A minor commend below. ... > > -extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); > > +extern void cpu_post_exec_02(ulong * code, ulong op1, ulong op2); > > IIRC checkpatch complains like "foo * bar" should be "foo *bar", > There is surely no need to resubmit the patch, it could be changed > when applying. Otherwise You are right. Fixed this. Thanks for the review! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "Science makes godlike -- it is all over with priests and gods when man becomes scientific. Moral: science is the forbidden as such -- it alone is forbidden. Science is the *first* sin, the *original* sin. *This alone is morality.* ``Thou shalt not know'' -- the rest follows." - Friedrich Nietzsche ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] post/lib_powerpc/multi.c: make checkpatch clean
Dear Wolfgang Denk, In message <1324639752-26856-1-git-send-email...@denx.de> you wrote: > Signed-off-by: Wolfgang Denk > Cc: Anatolij Gustschin > Cc: Stefan Roese > Cc: Kumar Gala > Cc: Kim Phillips > Cc: Andy Fleming > > --- > post/lib_powerpc/multi.c | 54 + > 1 files changed, 25 insertions(+), 29 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The typical page layout program is nothing more than an electronic light table for cutting and pasting documents. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] PPC: fix "Warning: FOO uses hard float, BAR uses soft float".
Dear Wolfgang Denk, In message <1324564181-8949-1-git-send-email...@denx.de> you wrote: > It appears that with recent versions of GCC the explicit > "-mhard-float" command line option takes precedence over the > ``asm(".gnu_attribute 4, 2");'' in the source file, so this no longer > helps to avoid the warnings we get when linking code that uses FP > instructions with other code that was built using soft-float. > > We can remove the ".gnu_attribute" (which appears to carry no other > information, at least so far) from the object files, but we also have > to make sure we don't pull in the __gcc_qsub() and __gcc_qmul() > functions from the standard libgcc, as these would again "infect" our > linking. We copy this code from: > gcc-4.2.2/gcc/config/rs6000/darwin-ldouble.c > This old version was chosen because it was still available under a > compatible license (GCC v2+). The file was stripped down to the > needed parts, and reformatted so it passes checkpatch with only one > warning (do not add new typedefs). > > Signed-off-by: Wolfgang Denk > Cc: Kumar Gala > Cc: Stefan Roese > Cc: Andy Fleming > Cc: Kim Phillips > --- > This patch silences build warnings for the following boards: > aev BC3450 charon, cm5200 fo300 korat korat_perm lwmon5 MiniFAP > PMC440 sacsng sequoia sequoia_nand sequoia_ramboot TB5200 TB5200_B > TQM5200 TQM5200_B TQM5200_B_HIGHBOOT TQM5200S TQM5200S_HIGHBOOT > TQM5200_STK100 > > post/lib_powerpc/fpu/Makefile | 17 - > post/lib_powerpc/fpu/darwin-ldouble.c | 141 > + > 2 files changed, 156 insertions(+), 2 deletions(-) > create mode 100644 post/lib_powerpc/fpu/darwin-ldouble.c Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de He who hesitates is not only lost, but miles from the next exit. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-tegra/next
Dear Albert ARIBAUD, In message <4ef4b68d.9020...@aribaud.net> you wrote: > > > If you have anything else queued up, then please send your pull > > request ASAP. We skip the tegra stuff. > > Right now I have nothing left on master for you to pull. > > Accordingly, I'll pull the tegra repo into next. Thanks! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de History tends to exaggerate. -- Col. Green, "The Savage Curtain", stardate 5906.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fsl_esdhc: fix PIO mode transfers
The pointer to the registers used to control the Freescale ESDHC MMC controller is not initialized correctly when using PIO mode. This is fixed by initializing the pointer in the same way as all other sites within the driver. Examining the commit history shows that this was broken at introduction due to a code change in upstream U-Boot to support the mx51 processor family. Reported-by: Jim Lentz Cc: Andy Fleming Cc: Kumar Gala Signed-off-by: Ira W. Snyder --- I'm sending this as a new email with correct subject line so that patchwork can find it. Also so that Andy Fleming and Kumar Gala see it. I've marked the orginal patch (part of thread "fsl_esdhc.c bug") as "Superseded" in patchwork. Andy and Kumar, I've CC'd you because you committed the bulk of patches to the drivers/mmc/fsl_esdhc.c driver in the past. This was tested on a P2020COME board by forcing PIO mode in the config file. This bug effects boards using P1_P2_RDB.h with CONFIG_P2020 set. drivers/mmc/fsl_esdhc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index ec953f0..b56ddc65 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -113,7 +113,8 @@ uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data) static void esdhc_pio_read_write(struct mmc *mmc, struct mmc_data *data) { - struct fsl_esdhc *regs = mmc->priv; + struct fsl_esdhc_cfg *cfg = mmc->priv; + struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; uint blocks; char *buffer; uint databuf; -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] kirkwood: add support for D-Link DNS-325
From: Stefan This patch adds support for D-Link DNS-325 ShareCenter NAS. Signed-off-by: Stefan Herbrechtsmeier Cc: prafu...@marvell.com Cc: albert.u.b...@aribaud.net --- MAINTAINERS |4 + board/d-link/dns325/Makefile | 49 + board/d-link/dns325/dns325.c | 148 +++ board/d-link/dns325/dns325.h | 48 + board/d-link/dns325/kwbimage.cfg | 208 ++ boards.cfg |1 + include/configs/dns325.h | 188 ++ 7 files changed, 646 insertions(+), 0 deletions(-) create mode 100644 board/d-link/dns325/Makefile create mode 100644 board/d-link/dns325/dns325.c create mode 100644 board/d-link/dns325/dns325.h create mode 100644 board/d-link/dns325/kwbimage.cfg create mode 100644 include/configs/dns325.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..2c4b968 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -668,6 +668,10 @@ Kshitij Gupta omap1510inn ARM925T omap1610inn ARM926EJS +Stefan Herbrechtsmeier + + dns325 ARM926EJS (Kirkwood SoC) + Vaibhav Hiremath am3517_evm ARM ARMV7 (AM35x SoC) diff --git a/board/d-link/dns325/Makefile b/board/d-link/dns325/Makefile new file mode 100644 index 000..35da21a --- /dev/null +++ b/board/d-link/dns325/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2011 +# Stefan Herbrechtsmeier +# +# Based on Kirkwood support: +# (C) Copyright 2009 +# Marvell Semiconductor +# Written-by: Prafulla Wadaskar +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := dns325.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c new file mode 100644 index 000..990d79f --- /dev/null +++ b/board/d-link/dns325/dns325.c @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2011 + * Stefan Herbrechtsmeier + * + * Based on Kirkwood support: + * (C) Copyright 2009 + * Marvell Semiconductor + * Written-by: Prafulla Wadaskar + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include "dns325.h" + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + /* Gpio configuration */ + kw_config_gpio(DNS325_OE_VAL_LOW, DNS325_OE_VAL_HIGH, + DNS325_OE_LOW, DNS325_OE_HIGH); + + /* Multi-Purpose Pins Functionality configuration */ + u32 kwmpp_config[] = { + MPP0_NF_IO2, + MPP1_NF_IO3, + MPP2_NF_IO4, + MPP3_NF_IO5, + MPP4_NF_IO6, + MPP5_NF_IO7, + MPP6_SYSRST_OUTn, + MPP7_GPO, + MPP8_TW_SDA, + MPP9_TW_SCK, + MPP10_UART0_TXD, + MPP11_UART0_RXD, + MPP12_SD_CLK, + MPP13_SD_CMD, + MPP14_SD_D0, + MPP
Re: [U-Boot] Pull request: u-boot-tegra/next
Le 23/12/2011 17:06, Wolfgang Denk a écrit : Dear Albert, In message<4ef49931.7090...@aribaud.net> you wrote: The branch is now correctly based above u-boot-arm/master, However, not all commits are bug fixes. Can you reorganize so that all bugfixes are in u-boot-tegra-master, and all non-bugfixes are in .../next above .../master ? I suggest we don't wait any longer. There has been more than enough thime to get things fixed, and instead of adding lots of untested stuff I rather pull this into the next release. If you have anything else queued up, then please send your pull request ASAP. We skip the tegra stuff. Right now I have nothing left on master for you to pull. Accordingly, I'll pull the tegra repo into next. Thanks a lot! Best regards, Wolfgang Denk Regards, Albert. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] doc/mkimage.1: Fix -D/-f options formatting
Signed-off-by: Horst Kronstorfer --- doc/mkimage.1 |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/mkimage.1 b/doc/mkimage.1 index 800aed4..39652c8 100644 --- a/doc/mkimage.1 +++ b/doc/mkimage.1 @@ -82,12 +82,12 @@ Set XIP (execute in place) flag. .B Create FIT image: .TP -.BI "\-D "dtc option" +.BI "\-D [" "dtc options" "]" Provide special options to the device tree compiler that is used to create the image. .TP -.BI "\-f "fit-image.its" +.BI "\-f [" "image tree source file" "]" Image tree source file that describes the structure and contents of the FIT image. -- 1.7.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] -rc3 is out
Hello Wolfgang, On Wed, 21 Dec 2011 20:45:42 +0100 Wolfgang Denk wrote: ... > I have just pushed out -rc3, so we have two more days for testing > before the release of v2011.12 > > Please check that everythink looks as expected, and that all your > important bug fixes have been merged. Here is a patch for build warning fix. http://patchwork.ozlabs.org/patch/130044/ Probably it should go into v2011.12 release? Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] PPC: fix "Warning: FOO uses hard float, BAR uses soft float".
Hi Wolfgang, On Thu, 22 Dec 2011 15:29:41 +0100 Wolfgang Denk wrote: > It appears that with recent versions of GCC the explicit > "-mhard-float" command line option takes precedence over the > ``asm(".gnu_attribute 4, 2");'' in the source file, so this no longer > helps to avoid the warnings we get when linking code that uses FP > instructions with other code that was built using soft-float. > > We can remove the ".gnu_attribute" (which appears to carry no other > information, at least so far) from the object files, but we also have > to make sure we don't pull in the __gcc_qsub() and __gcc_qmul() > functions from the standard libgcc, as these would again "infect" our > linking. We copy this code from: > gcc-4.2.2/gcc/config/rs6000/darwin-ldouble.c > This old version was chosen because it was still available under a > compatible license (GCC v2+). The file was stripped down to the > needed parts, and reformatted so it passes checkpatch with only one > warning (do not add new typedefs). > > Signed-off-by: Wolfgang Denk > Cc: Kumar Gala > Cc: Stefan Roese > Cc: Andy Fleming > Cc: Kim Phillips Tested on TQM5200. Tested-by: Anatolij Gustschin Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-tegra/next
Dear Albert, In message <4ef49931.7090...@aribaud.net> you wrote: > > The branch is now correctly based above u-boot-arm/master, However, not > all commits are bug fixes. Can you reorganize so that all bugfixes are > in u-boot-tegra-master, and all non-bugfixes are in .../next above > .../master ? I suggest we don't wait any longer. There has been more than enough thime to get things fixed, and instead of adding lots of untested stuff I rather pull this into the next release. If you have anything else queued up, then please send your pull request ASAP. We skip the tegra stuff. Thanks a lot! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de ... Jesus cried with a loud voice: Lazarus, come forth; the bug hath been found and thy program runneth. And he that was dead came forth... -- John 11:43-44 [version 2.0?] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] post/lib_powerpc/multi.c: fix stack overflow error
Hello Wolfgang, On Fri, 23 Dec 2011 12:29:12 +0100 Wolfgang Denk wrote: > The code and comment disagreed: the comment claimed that r6...r31 > were copied, and consequently the arrays for "src" and "dst" were > declared with 26 entries, but the actual code ("lmw r5,0(r3)" and > "stmw r5,0(r4)") copied _27_ words (r5 through r31), which resulted > in false "POST cpu Error at multi test" messages. Great! Thanks for fixing this bug! Acked-by: Anatolij Gustschin Tested-by: Anatolij Gustschin But I wonder why didn't we see it with U-Boot built using older GCC versions. Since only 26 words will be compared after the test, the issue only shows up if the destination buffer is placed at lower addresses on the stack than the source buffer. In this case the first word in the source buffer is overwritten. GCC 4.6.1 generated code which changed the order of src[] and dst[] on the stack and the hidden bug showed up. Here is a partial dump of each buffer and additionally a dump of the following word. The buffer address is in parenthesis: with GCC 4.2.2: 00: src(03e51c74) 0x, dst(03e51cdc) 0x 01: src(03e51c78) 0x0001, dst(03e51ce0) 0x ... 25: src(03e51cd8) 0x0019, dst(03e51d40) 0x 26: src(03e51cdc) 0x, dst(03e51d44) 0x Test result: 00: src(03e51c74) 0x, dst(03e51cdc) 0x 01: src(03e51c78) 0x0001, dst(03e51ce0) 0x0001 ... 25: src(03e51cd8) 0x0019, dst(03e51d40) 0x0019 26: src(03e51cdc) 0x, dst(03e51d44) 0x with GCC 4.6.1: 00: src(03e57cf4) 0x, dst(03e57c8c) 0x 01: src(03e57cf8) 0x0001, dst(03e57c90) 0x ... 25: src(03e57d58) 0x0019, dst(03e57cf0) 0x 26: src(03e57d5c) 0x03f9c3c0, dst(03e57cf4) 0x Test result: Error at multi test ! 00: src(03e57cf4) 0x03f9c3c0, dst(03e57c8c) 0x 01: src(03e57cf8) 0x0001, dst(03e57c90) 0x0001 ... 25: src(03e57d58) 0x0019, dst(03e57cf0) 0x0019 26: src(03e57d5c) 0x03f9c3c0, dst(03e57cf4) 0x03f9c3c0 Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-tegra/next
Hi Tom, Le 23/12/2011 00:17, Tom Warren a écrit : Alright, I hope I've gotten it right this time. I had already done a git fetch of the u-boot-arm master (see my very first sentence below), but regardless, I followed your 'always use commands' and I believe I've gotten a valid repo. It's pushed as both 'master' and 'next' to u-boot-tegra.git. Here's the pull request, please pull into arm master. Thanks. The following changes since commit e570fe8ef2734fddc15e086b7bc344e64c907e81: PXA: Kill last remnants of set_GPIO_mode function (2011-12-19 17:52:44 +0100) are available in the git repository at: git://git.denx.de/u-boot-tegra.git master Simon Glass (14): tegra2: Tidy UART selection tegra2: Add UARTB support tegra2: config: Enable SPI flash on Seaboard tegra2: Enable SPI environment on Seaboard tegra2: Implement SPI / UART GPIO switch tegra2: spi: Support SPI / UART switch tegra2: Plumb in SPI/UART switch code tegra: Fix build error in plutux, medcom tegra: Move cpu_init_cp15() to arch_cpu_init() tegra: Move clock_early_init() to arch_cpu_init() tegra: add clock_ll_start_uart() to enable UART prior to reloc tegra: Add a function mux feature tegra: Add support for UART init in cpu board.c tegra: Move boards over to use arch-level board UART function Thierry Reding (7): tegra2: Always build with USE_PRIVATE_LIBGCC=yes. tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000. tegra2: Move tegra2_mmc_init() prototype to public header. tegra2: Add common Avionic Design Tamonten support. tegra2: Add Avionic Design Plutux support. tegra2: Add Avionic Design Medcom support. tegra2: Optimize out-of-tree build for Ventana. Tom Warren (2): tegra2: spi: Add SPI driver for Tegra2 SOC arm: Tegra: Fix Harmony and Ventana builds in u-boot-tegra/master MAINTAINERS|5 + arch/arm/cpu/armv7/tegra2/Makefile |2 +- arch/arm/cpu/armv7/tegra2/board.c | 58 arch/arm/cpu/armv7/tegra2/clock.c | 14 + arch/arm/cpu/armv7/tegra2/config.mk|2 + arch/arm/cpu/armv7/tegra2/funcmux.c| 58 arch/arm/include/asm/arch-tegra2/board.h | 30 ++ arch/arm/include/asm/arch-tegra2/clock.h | 11 + arch/arm/include/asm/arch-tegra2/funcmux.h | 41 +++ arch/arm/include/asm/arch-tegra2/mmc.h | 27 ++ arch/arm/include/asm/arch-tegra2/tegra2.h |1 + arch/arm/include/asm/arch-tegra2/tegra2_spi.h | 76 ++ arch/arm/include/asm/arch-tegra2/uart-spi-switch.h | 46 board/avionic-design/common/tamonten.c | 116 board/avionic-design/common/tamonten.h | 32 +++ board/avionic-design/medcom/Makefile | 50 board/avionic-design/medcom/medcom.c | 45 board/avionic-design/plutux/Makefile | 50 board/avionic-design/plutux/plutux.c | 45 board/nvidia/common/Makefile | 47 board/nvidia/common/board.c| 73 + board/nvidia/common/board.h|2 +- board/nvidia/common/uart-spi-switch.c | 138 ++ board/nvidia/harmony/Makefile |1 - board/nvidia/harmony/harmony.c |2 +- board/nvidia/seaboard/Makefile |1 - board/nvidia/seaboard/seaboard.c |5 +- board/nvidia/ventana/Makefile |5 +- boards.cfg |2 + drivers/mmc/tegra2_mmc.h |2 - drivers/spi/Makefile |1 + drivers/spi/tegra2_spi.c | 279 include/configs/harmony.h |3 + include/configs/medcom.h | 64 + include/configs/plutux.h | 64 + include/configs/seaboard.h | 20 ++ include/configs/tegra2-common.h|5 +- include/configs/ventana.h |3 + 38 files changed, 1353 insertions(+), 73 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/funcmux.c create mode 100644 arch/arm/include/asm/arch-tegra2/board.h create mode 100644 arch/arm/include/asm/arch-tegra2/funcmux.h create mode 100644 arch/arm/include/asm/arch-tegra2/mmc.h create mode 100644 arch/arm/include/asm/arch-tegra2/tegra2_spi.h create mode 100644 arch/arm/include/asm/arch-tegra2/uart-spi-switch.h create mode 100644 board/avionic-design/common/tamonten.c create mode 100644 board/avionic-design/common/tamonten.h create mode 100644 board/avionic-design/medcom/Makefile
Re: [U-Boot] testing u-boot on virtual environment
Hi Erico, Le 23/12/2011 15:03, Érico Porto a écrit : md 0805283e 0805283e: 4489028b 1beba4bd 7502fb83 028b660d...D...u.f.. 0805284e: 7d448966 c0b70fa4 028a09eb a43d4488f.D}.D=. 0805285e: 51c0b60f 75ff5047 90558994 059e2568...QGP.u..U.h%.. 0805286e: aaefe808 558b 10c48390 f739da01...U..9. 0805287e: f089b975 af0fff31 0c4501c3 548a1debu...1.ET 0805288e: b60fa43d 89b60fca 08059cdc 7497e180=..t 0805289e: 79d28404 3d44c605 39472ea4 50df75c7...y..D=..G9.u.P 080528ae: a4458d50 9e2b6850 44c60805 e800a43dP.E.Ph+D=... 080528be: aaa1 29087d01 25e81475 83ab.}.)u..% 080528ce: c08510c4 14eb0874 891b048d 7d839445t...E..} 080528de: 850f0014 ff33 03ebc031 8dffc8833...1... 080528ee: 5e5bf465 90c35d5f 89559090 0c458be5e.[^_]U...E. 080528fe: 5d084589 ffae50e9 e58955ff 0f10458b.E.].P...U...E.. 0805290e: 830c45af e0830fc0 084589f0 b00de95d.EE.]... 0805291e: 8955 535657e5 8b4cec83 3c6a0c7d..U..WVS..L.}.j< 0805292e: 68145d8b 08059e33 758df16a 45c756ac.].h3...j..u.V.E =>mtest 0805283e 080528fe Pattern Writing... Segmentation Fault So close.. Please do not top-post. I don't know what exactly the sandbox 'board' covers, but displaying memory in it has rather little meaning, does it not? Memory mapping and usage is quite board-dependent. It could help if you indicated what you're trying to achieve by simulation exactly. You might possibly be better off using qemu, for instance. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
Hi Érico Am 23.12.2011 14:19, schrieb Érico Porto: > Thanks! > > Tried to do some memory display commands but got instant segmentation > fault, and tried to run it as root - but then some bad things > happened, so now I know no one should run it as root. > > I wanted to tryout a memory test algorithm I developed, but it seem > u-boot runs with no ram access. If I could findout the ram address > where it is located, I think then the 8MB it says it has wouldn't give > me segmentation fault... You could try to change the address passed to the mmap in os.c: 92 void *os_malloc(size_t length) from NULL to something known. 0x2000 worked well for me when I added the RAM simulation. The approach of a fixed RAM address was nacked for mainline but for tests I still use this approach. Matthias ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
md 0805283e 0805283e: 4489028b 1beba4bd 7502fb83 028b660d...D...u.f.. 0805284e: 7d448966 c0b70fa4 028a09eb a43d4488f.D}.D=. 0805285e: 51c0b60f 75ff5047 90558994 059e2568...QGP.u..U.h%.. 0805286e: aaefe808 558b 10c48390 f739da01...U..9. 0805287e: f089b975 af0fff31 0c4501c3 548a1debu...1.ET 0805288e: b60fa43d 89b60fca 08059cdc 7497e180=..t 0805289e: 79d28404 3d44c605 39472ea4 50df75c7...y..D=..G9.u.P 080528ae: a4458d50 9e2b6850 44c60805 e800a43dP.E.Ph+D=... 080528be: aaa1 29087d01 25e81475 83ab.}.)u..% 080528ce: c08510c4 14eb0874 891b048d 7d839445t...E..} 080528de: 850f0014 ff33 03ebc031 8dffc8833...1... 080528ee: 5e5bf465 90c35d5f 89559090 0c458be5e.[^_]U...E. 080528fe: 5d084589 ffae50e9 e58955ff 0f10458b.E.].P...U...E.. 0805290e: 830c45af e0830fc0 084589f0 b00de95d.EE.]... 0805291e: 8955 535657e5 8b4cec83 3c6a0c7d..U..WVS..L.}.j< 0805292e: 68145d8b 08059e33 758df16a 45c756ac.].h3...j..u.V.E =>mtest 0805283e 080528fe Pattern Writing... Segmentation Fault So close.. On 12/23/11, Érico Porto wrote: > doing md 0805283e works > > if I can change the base address now, every memory command should work > > On 12/23/11, Érico Porto wrote: >> md 0 gives me in dmesg: >> >> >> [11753.433067] u-boot[4277]: segfault at 0 ip 0805283e sp bfb809f0 >> error 4 in u-boot[8048000+1a000] >> >> >> On 12/23/11, Érico Porto wrote: >>> Thanks! >>> >>> Tried to do some memory display commands but got instant segmentation >>> fault, and tried to run it as root - but then some bad things >>> happened, so now I know no one should run it as root. >>> >>> I wanted to tryout a memory test algorithm I developed, but it seem >>> u-boot runs with no ram access. If I could findout the ram address >>> where it is located, I think then the 8MB it says it has wouldn't give >>> me segmentation fault... >>> >>> =>version >>> >>> U-Boot 2011.12-rc3 (Dec 23 2011 - 11:07:12) >>> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 >>> GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810 >>> =>printenv >>> baudrate=115200 >>> stderr=serial >>> stdin=serial >>> stdout=serial >>> >>> Environment size: 66/8188 bytes >>> =>bdinfo >>> boot_params = 0x >>> DRAM bank = 0x >>> -> start= 0x >>> -> size = 0x0800 >>> FB base = 0x >>> >>> On 12/23/11, Graeme Russ wrote: Hi Érico On 23/12/11 23:46, Érico Porto wrote: > Hello, > > Does anyone know if exists somekind of simulator to run u-boot in test > mode? Have a look at the sandbox 'board' - It allows U-Boot to be run as an executable in Linux to test non hardware specific code do: make sandbox_config make all Regards, Graeme >>> >>> >>> -- >>> Érico V. Porto >>> >> >> >> -- >> Érico V. Porto >> > > > -- > Érico V. Porto > -- Érico V. Porto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
md 0 gives me in dmesg: [11753.433067] u-boot[4277]: segfault at 0 ip 0805283e sp bfb809f0 error 4 in u-boot[8048000+1a000] On 12/23/11, Érico Porto wrote: > Thanks! > > Tried to do some memory display commands but got instant segmentation > fault, and tried to run it as root - but then some bad things > happened, so now I know no one should run it as root. > > I wanted to tryout a memory test algorithm I developed, but it seem > u-boot runs with no ram access. If I could findout the ram address > where it is located, I think then the 8MB it says it has wouldn't give > me segmentation fault... > > =>version > > U-Boot 2011.12-rc3 (Dec 23 2011 - 11:07:12) > gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 > GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810 > =>printenv > baudrate=115200 > stderr=serial > stdin=serial > stdout=serial > > Environment size: 66/8188 bytes > =>bdinfo > boot_params = 0x > DRAM bank = 0x > -> start= 0x > -> size = 0x0800 > FB base = 0x > > On 12/23/11, Graeme Russ wrote: >> Hi Érico >> >> On 23/12/11 23:46, Érico Porto wrote: >>> Hello, >>> >>> Does anyone know if exists somekind of simulator to run u-boot in test >>> mode? >> >> Have a look at the sandbox 'board' - It allows U-Boot to be run as an >> executable in Linux to test non hardware specific code >> >> do: >> >> make sandbox_config >> make all >> >> Regards, >> >> Graeme >> > > > -- > Érico V. Porto > -- Érico V. Porto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
doing md 0805283e works if I can change the base address now, every memory command should work On 12/23/11, Érico Porto wrote: > md 0 gives me in dmesg: > > > [11753.433067] u-boot[4277]: segfault at 0 ip 0805283e sp bfb809f0 > error 4 in u-boot[8048000+1a000] > > > On 12/23/11, Érico Porto wrote: >> Thanks! >> >> Tried to do some memory display commands but got instant segmentation >> fault, and tried to run it as root - but then some bad things >> happened, so now I know no one should run it as root. >> >> I wanted to tryout a memory test algorithm I developed, but it seem >> u-boot runs with no ram access. If I could findout the ram address >> where it is located, I think then the 8MB it says it has wouldn't give >> me segmentation fault... >> >> =>version >> >> U-Boot 2011.12-rc3 (Dec 23 2011 - 11:07:12) >> gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 >> GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810 >> =>printenv >> baudrate=115200 >> stderr=serial >> stdin=serial >> stdout=serial >> >> Environment size: 66/8188 bytes >> =>bdinfo >> boot_params = 0x >> DRAM bank = 0x >> -> start= 0x >> -> size = 0x0800 >> FB base = 0x >> >> On 12/23/11, Graeme Russ wrote: >>> Hi Érico >>> >>> On 23/12/11 23:46, Érico Porto wrote: Hello, Does anyone know if exists somekind of simulator to run u-boot in test mode? >>> >>> Have a look at the sandbox 'board' - It allows U-Boot to be run as an >>> executable in Linux to test non hardware specific code >>> >>> do: >>> >>> make sandbox_config >>> make all >>> >>> Regards, >>> >>> Graeme >>> >> >> >> -- >> Érico V. Porto >> > > > -- > Érico V. Porto > -- Érico V. Porto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
Thanks! Tried to do some memory display commands but got instant segmentation fault, and tried to run it as root - but then some bad things happened, so now I know no one should run it as root. I wanted to tryout a memory test algorithm I developed, but it seem u-boot runs with no ram access. If I could findout the ram address where it is located, I think then the 8MB it says it has wouldn't give me segmentation fault... =>version U-Boot 2011.12-rc3 (Dec 23 2011 - 11:07:12) gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810 =>printenv baudrate=115200 stderr=serial stdin=serial stdout=serial Environment size: 66/8188 bytes =>bdinfo boot_params = 0x DRAM bank = 0x -> start= 0x -> size = 0x0800 FB base = 0x On 12/23/11, Graeme Russ wrote: > Hi Érico > > On 23/12/11 23:46, Érico Porto wrote: >> Hello, >> >> Does anyone know if exists somekind of simulator to run u-boot in test >> mode? > > Have a look at the sandbox 'board' - It allows U-Boot to be run as an > executable in Linux to test non hardware specific code > > do: > > make sandbox_config > make all > > Regards, > > Graeme > -- Érico V. Porto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] testing u-boot on virtual environment
Hi Érico On 23/12/11 23:46, Érico Porto wrote: > Hello, > > Does anyone know if exists somekind of simulator to run u-boot in test mode? Have a look at the sandbox 'board' - It allows U-Boot to be run as an executable in Linux to test non hardware specific code do: make sandbox_config make all Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] testing u-boot on virtual environment
Hello, Does anyone know if exists somekind of simulator to run u-boot in test mode? I also have a spare qoriva platform (MPC5604B-TRK), which can't run linux, but maybe could run uboot just to test some autoboot commands. Thanks -- Érico V. Porto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] post/lib_powerpc/multi.c: code cleanup
On Fri, 23 Dec 2011 12:29:11 +0100 Wolfgang Denk wrote: > Clean up and document the code: > > - get rid of unneeded code block > - add comment which code is generated > > Signed-off-by: Wolfgang Denk > Cc: Anatolij Gustschin > Cc: Stefan Roese > Cc: Kumar Gala > Cc: Kim Phillips > Cc: Andy Fleming Acked-by: Anatolij Gustschin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] post/lib_powerpc/multi.c: make checkpatch clean
Hello Wolfgang, Looks good. A minor commend below. On Fri, 23 Dec 2011 12:29:10 +0100 Wolfgang Denk wrote: > Signed-off-by: Wolfgang Denk > Cc: Anatolij Gustschin > Cc: Stefan Roese > Cc: Kumar Gala > Cc: Kim Phillips > Cc: Andy Fleming > --- > post/lib_powerpc/multi.c | 54 + > 1 files changed, 25 insertions(+), 29 deletions(-) > > diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c > index 5845616..4b4b119 100644 > --- a/post/lib_powerpc/multi.c > +++ b/post/lib_powerpc/multi.c > @@ -38,45 +38,41 @@ > > #if CONFIG_POST & CONFIG_SYS_POST_CPU > > -extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); > +extern void cpu_post_exec_02(ulong * code, ulong op1, ulong op2); IIRC checkpatch complains like "foo * bar" should be "foo *bar", There is surely no need to resubmit the patch, it could be changed when applying. Otherwise Acked-by: Anatolij Gustschin Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 14/14] x86: Tweak initialisation procedure
--- arch/x86/cpu/start.S| 43 ++ arch/x86/include/asm/init_helpers.h |3 + arch/x86/include/asm/u-boot-x86.h |2 - arch/x86/lib/board.c| 87 ++ arch/x86/lib/init_helpers.c | 14 ++ arch/x86/lib/relocate.c | 43 ++--- include/common.h| 11 - 7 files changed, 131 insertions(+), 72 deletions(-) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index be21d97..9cfd54d 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -30,7 +30,7 @@ #include #include #include -#include +#include .section .text .code32 @@ -84,36 +84,41 @@ car_init_ret: */ movl$CONFIG_SYS_INIT_SP_ADDR, %esp - /* Set parameter to board_init_f() to boot flags */ - xorl%eax, %eax - movw%bx, %ax + /* +* Any setting of Global Data member need to be done here +* NOTE: car_init must clear CAR so that Global Data is initialised +* to zero! +*/ - /* Enter, U-boot! */ + /* +* Enter U-boot by calling: +* board_init_f(location_of_gd_in_temporary_memory) +*/ + movl$CONFIG_SYS_INIT_GD_ADDR, %eax callboard_init_f /* indicate (lack of) progress */ movw$0x85, %ax jmp die -.globl setup_sdram_environment -.type setup_sdram_environment, @function -setup_sdram_environment: - /* Leave room for Global Data - Round down to 16 byte boundary */ - subl%edx, %eax +.globl board_init_f_r_trampoline +.type board_init_f_r_trampoline, @function +board_init_f_r_trampoline: + /* +* %eax contains the upper address of usable RAM. Create a fresh +* stack in RAM. x86 stack grows down, global data sits immediately +* above the stack, so we have to leave enough room between the top +* of the stack and top of RAM for global data +*/ + subl$GENERATED_GBL_DATA_SIZE, %eax andl$~15, %eax - - /* Create a new stack */ movl%eax, %esp /* -* relocate_code(ulong stack_ptr, gd_t *id, ulong reloc_addr) -* %eax = Address of top of stack -* %edx = Address of Global Data -* %ecx = Base address of in-RAM copy of U-Boot (ignored) +* Re-enter U-Boot by calling: +* board_init_f_r(location_of_gd_in_RAM) */ - movl%eax, %edx - xorl%ecx, %ecx - callrelocate_code + callboard_init_f_r die: hlt diff --git a/arch/x86/include/asm/init_helpers.h b/arch/x86/include/asm/init_helpers.h index 14ef11a..2d08834 100644 --- a/arch/x86/include/asm/init_helpers.h +++ b/arch/x86/include/asm/init_helpers.h @@ -28,6 +28,9 @@ int display_banner(void); int display_dram_config(void); int init_baudrate_f(void); +int copy_gd_to_ram_f_r(gd_t *id); +int init_cache_f_r(gd_t *id); + int mem_malloc_init_r(void); int init_bd_struct_r(void); int flash_init_r(void); diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index eaa50cc..093ad11 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -63,6 +63,4 @@ u32 isa_map_rom(u32 bus_addr, int size); int video_bios_init(void); int video_init(void); -void setup_sdram_environment(phys_size_t ram_size, ulong gd_size); - #endif /* _U_BOOT_I386_H_ */ diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index b06063a..05d362d 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -51,12 +52,35 @@ DECLARE_GLOBAL_DATA_PTR = (gd_t *) (CONFIG_SYS_INIT_GD_ADDR); /* * Breath some life into the board... * - * Initialize an SMC for serial comms, and carry out some hardware - * tests. + * Getting the board up and running is a three-stage process: + * 1) Execute from Flash, SDRAM Uninitialised + * At this point, there is a limited amount of non-SDRAM memory + * (typically the CPU cache, but can also be SRAM or even a buffer of + * of some peripheral). This limited memory is used to hold the initial + * copy of the Global Data Structure and a temporary stack. * - * The first part of initialization is running from Flash memory; - * its main purpose is to initialize the RAM so that we - * can relocate the monitor code to RAM. + * The following is performed during this phase of execution: + * - Core low-level CPU initialisation + * - Console initialisation + * - SDRAM initialisation + * + * 2) Execute from Flash, SDRAM Initialised + * At this point we copy Global Data from the initial non-SDRAM + * memory and set up the permanent stack in SDRAM. The CPU cache is no + * longer being used as temporary memory, so we can now fully enable + * it. + * + * The following is performed during
[U-Boot] [RFC 13/14] x86: Simplify board.c
--- arch/x86/include/asm/init_helpers.h | 39 + arch/x86/include/asm/init_wrappers.h | 42 + arch/x86/lib/Makefile|2 + arch/x86/lib/board.c | 289 +- arch/x86/lib/init_helpers.c | 140 arch/x86/lib/init_wrappers.c | 137 6 files changed, 435 insertions(+), 214 deletions(-) create mode 100644 arch/x86/include/asm/init_helpers.h create mode 100644 arch/x86/include/asm/init_wrappers.h create mode 100644 arch/x86/lib/init_helpers.c create mode 100644 arch/x86/lib/init_wrappers.c diff --git a/arch/x86/include/asm/init_helpers.h b/arch/x86/include/asm/init_helpers.h new file mode 100644 index 000..14ef11a --- /dev/null +++ b/arch/x86/include/asm/init_helpers.h @@ -0,0 +1,39 @@ +/* + * (C) Copyright 2011 + * Graeme Russ, + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _INIT_HELPERS_H_ +#define _INIT_HELPERS_H_ + +int display_banner(void); +int display_dram_config(void); +int init_baudrate_f(void); + +int mem_malloc_init_r(void); +int init_bd_struct_r(void); +int flash_init_r(void); +int init_ip_address_r(void); +int status_led_set_r(void); +int set_bootfile_r(void); +int set_load_addr_r(void); + +#endif /* !_INIT_HELPERS_H_ */ diff --git a/arch/x86/include/asm/init_wrappers.h b/arch/x86/include/asm/init_wrappers.h new file mode 100644 index 000..899ffb1 --- /dev/null +++ b/arch/x86/include/asm/init_wrappers.h @@ -0,0 +1,42 @@ +/* + * (C) Copyright 2011 + * Graeme Russ, + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _INIT_WRAPPERS_H_ +#define _INIT_WRAPPERS_H_ + +int serial_initialize_r(void); +int env_relocate_r(void); +int pci_init_r(void); +int jumptable_init_r(void); +int pcmcia_init_r(void); +int kgdb_init_r(void); +int enable_interrupts_r(void); +int eth_initialize_r(void); +int reset_phy_r(void); +int ide_init_r(void); +int scsi_init_r(void); +int doc_init_r(void); +int bb_miiphy_init_r(void); +int post_run_r(void); + +#endif /* !_INIT_WRAPPERS_H_ */ diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 57b6896..51836da 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -34,6 +34,8 @@ COBJS-y += board.o COBJS-y+= bootm.o COBJS-y+= cmd_boot.o COBJS-y+= gcc.o +COBJS-y+= init_helpers.o +COBJS-y+= init_wrappers.o COBJS-y+= interrupts.o COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index a6596ef..b06063a 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -33,18 +33,11 @@ #include #include -#include #include -#include -#include -#include -#include -#include #include -#ifdef CONFIG_BITBANGMII -#include -#endif +#include +#include /* * Pointer to initial global data area @@ -55,49 +48,6 @@ #define XTRN_DECLARE_GLOBAL_DATA_PTR /* empty = allocate here */ DECLARE_GLOBAL_DATA_PTR = (gd_t *) (CONFIG_SYS_INIT_GD_ADDR); -/ - * Init Utilities * - - * Some of this code should be moved into the core functions, - * or dropped completely, - * but let's get it working (again) first... - */ -static int ini
[U-Boot] [RFC 12/14] x86: Move relocation code out of board.c
--- arch/x86/lib/Makefile |1 + arch/x86/lib/board.c| 113 --- arch/x86/lib/relocate.c | 150 +++ 3 files changed, 151 insertions(+), 113 deletions(-) create mode 100644 arch/x86/lib/relocate.c diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 7820895..57b6896 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -40,6 +40,7 @@ COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o COBJS-$(CONFIG_PCI) += pci.o COBJS-$(CONFIG_PCI) += pci_type1.o COBJS-$(CONFIG_SYS_X86_REALMODE) += realmode.o +COBJS-y+= relocate.o COBJS-y+= string.o COBJS-$(CONFIG_SYS_X86_ISR_TIMER) += timer.o COBJS-$(CONFIG_VIDEO) += video_bios.o diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index e8274bf..a6596ef 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -41,7 +41,6 @@ #include #include #include -#include #ifdef CONFIG_BITBANGMII #include @@ -124,11 +123,6 @@ static void display_flash_config(ulong size) */ typedef int (init_fnc_t) (void); -static int calculate_relocation_address(gd_t *); -static int copy_uboot_to_ram(gd_t *); -static int clear_bss(gd_t *); -static int do_elf_reloc_fixups(gd_t *); - init_fnc_t *init_sequence_f[] = { cpu_init_f, board_early_init_f, @@ -155,85 +149,6 @@ init_fnc_t *init_sequence_r[] = { gd_t *gd; -static int calculate_relocation_address(gd_t *id) -{ - ulong text_start = (ulong)&__text_start; - ulong bss_end = (ulong)&__bss_end; - ulong dest_addr; - ulong rel_offset; - - /* Calculate destination RAM Address and relocation offset */ - dest_addr = (ulong)id; - dest_addr -= CONFIG_SYS_STACK_SIZE; - dest_addr -= (bss_end - text_start); - - /* -* Round destination address down to 16-byte boundary to keep -* IDT and GDT 16-byte aligned -*/ - dest_addr &= ~15; - - rel_offset = dest_addr - text_start; - - id->relocaddr = dest_addr; - id->reloc_off = rel_offset; - - return 0; -} - -static int copy_uboot_to_ram(gd_t *id) -{ - size_t len = (size_t)&__data_end - (size_t)&__text_start; - - memcpy((void *)id->relocaddr, (void *)&__text_start, len); - - return 0; -} - -static int clear_bss(gd_t *id) -{ - ulong dst_addr = (ulong)&__bss_start + id->reloc_off; - size_t len = (size_t)&__bss_end - (size_t)&__bss_start; - - memset((void *)dst_addr, 0x00, len); - - return 0; -} - -static int do_elf_reloc_fixups(gd_t *id) -{ - Elf32_Rel *re_src = (Elf32_Rel *)(&__rel_dyn_start); - Elf32_Rel *re_end = (Elf32_Rel *)(&__rel_dyn_end); - - Elf32_Addr *offset_ptr_rom; - Elf32_Addr *offset_ptr_ram; - - /* The size of the region of u-boot that runs out of RAM. */ - uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start; - - do { - /* Get the location from the relocation entry */ - offset_ptr_rom = (Elf32_Addr *)re_src->r_offset; - - /* Check that the location of the relocation is in .text */ - if (offset_ptr_rom >= (Elf32_Addr *)CONFIG_SYS_TEXT_BASE) { - - /* Switch to the in-RAM version */ - offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom + - id->reloc_off); - - /* Check that the target points into .text */ - if (*offset_ptr_ram >= CONFIG_SYS_TEXT_BASE && - *offset_ptr_ram < - (CONFIG_SYS_TEXT_BASE + size)) { - *offset_ptr_ram += id->reloc_off; - } - } - } while (re_src++ < re_end); - - return 0; -} - /* Load U-Boot into RAM, initialize BSS, perform relocation adjustments */ void board_init_f(ulong boot_flags) { @@ -254,34 +169,6 @@ void board_init_f(ulong boot_flags) ; } -typedef void (board_init_r_t) (gd_t *, ulong); - -void relocate_code(ulong stack_ptr, gd_t *id, ulong reloc_addr) -{ - board_init_r_t *board_init_r_func; - - /* We are running from flash, but the stack is now in SDRAM */ - - /* gd is still in CAR - Copy it into SDRAM */ - memcpy(id, gd, sizeof(gd_t)); - - if (init_cache() != 0) - hang(); - - calculate_relocation_address(id); - copy_uboot_to_ram(id); - clear_bss(id); - do_elf_reloc_fixups(id); - - board_init_r_func = board_init_r; - board_init_r_func += id->reloc_off; - board_init_r_func(id, id->relocaddr); - - /* NOTREACHED - relocate_code() does not return */ - while (1) - ; -} - void board_init_r(gd_t *id, ulong dest_addr) { #if defined(CONFIG_CMD_NET) diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c new f
[U-Boot] [RFC 11/14] x86: remove gd->start_addr_sp
It's not used for anything useful --- arch/x86/include/asm/global_data.h |1 - arch/x86/lib/board.c |4 +--- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 05a2139..ad15509 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -50,7 +50,6 @@ typedef struct global_data { unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long bus_clk; unsigned long relocaddr; /* Start address of U-Boot in RAM */ - unsigned long start_addr_sp; /* start_addr_stackpointer */ phys_size_t ram_size; /* RAM size */ unsigned long reset_status; /* reset status register at boot */ void**jt; /* jump table */ diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index f201542..e8274bf 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -163,7 +163,7 @@ static int calculate_relocation_address(gd_t *id) ulong rel_offset; /* Calculate destination RAM Address and relocation offset */ - dest_addr = id->start_addr_sp; + dest_addr = (ulong)id; dest_addr -= CONFIG_SYS_STACK_SIZE; dest_addr -= (bss_end - text_start); @@ -265,8 +265,6 @@ void relocate_code(ulong stack_ptr, gd_t *id, ulong reloc_addr) /* gd is still in CAR - Copy it into SDRAM */ memcpy(id, gd, sizeof(gd_t)); - id->start_addr_sp = stack_ptr; - if (init_cache() != 0) hang(); -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 10/14] x86: Move setup_pcat_compatibility() out of board.c
--- arch/x86/lib/board.c |7 --- arch/x86/lib/zimage.c |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 2b97b47..f201542 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -463,10 +463,3 @@ void hang(void) for (;;) ; } - -void setup_pcat_compatibility(void) - __attribute__((weak, alias("__setup_pcat_compatibility"))); - -void __setup_pcat_compatibility(void) -{ -} diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index bb40517..2214286 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -314,6 +314,13 @@ void boot_zimage(void *setup_base, void *load_address) #endif } +void setup_pcat_compatibility(void) + __attribute__((weak, alias("__setup_pcat_compatibility"))); + +void __setup_pcat_compatibility(void) +{ +} + int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { struct boot_params *base_ptr; -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 09/14] x86: Move do_go_exec() out of board.c
--- arch/x86/lib/Makefile |1 + arch/x86/lib/board.c| 27 --- arch/x86/lib/cmd_boot.c | 64 +++ 3 files changed, 65 insertions(+), 27 deletions(-) create mode 100644 arch/x86/lib/cmd_boot.c diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index d584aa4..7820895 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -32,6 +32,7 @@ SOBJS-$(CONFIG_SYS_X86_REALMODE) += realmode_switch.o COBJS-$(CONFIG_SYS_PC_BIOS)+= bios_setup.o COBJS-y+= board.o COBJS-y+= bootm.o +COBJS-y+= cmd_boot.o COBJS-y+= gcc.o COBJS-y+= interrupts.o COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index fb2b92c..2b97b47 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -464,33 +464,6 @@ void hang(void) ; } -unsigned long do_go_exec(ulong (*entry)(int, char * const []), -int argc, char * const argv[]) -{ - unsigned long ret = 0; - char **argv_tmp; - - /* -* x86 does not use a dedicated register to pass the pointer to -* the global_data, so it is instead passed as argv[-1]. By using -* argv[-1], the called 'Application' can use the contents of -* argv natively. However, to safely use argv[-1] a new copy of -* argv is needed with the extra element -*/ - argv_tmp = malloc(sizeof(char *) * (argc + 1)); - - if (argv_tmp) { - argv_tmp[0] = (char *)gd; - - memcpy(&argv_tmp[1], argv, (size_t)(sizeof(char *) * argc)); - - ret = (entry) (argc, &argv_tmp[1]); - free(argv_tmp); - } - - return ret; -} - void setup_pcat_compatibility(void) __attribute__((weak, alias("__setup_pcat_compatibility"))); diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c new file mode 100644 index 000..a81a9a3 --- /dev/null +++ b/arch/x86/lib/cmd_boot.c @@ -0,0 +1,64 @@ +/* + * (C) Copyright 2008-2011 + * Graeme Russ, + * + * (C) Copyright 2002 + * Daniel Engström, Omicron Ceti AB, + * + * (C) Copyright 2002 + * Wolfgang Denk, DENX Software Engineering, + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Marius Groeger + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include + +unsigned long do_go_exec(ulong (*entry)(int, char * const []), +int argc, char * const argv[]) +{ + unsigned long ret = 0; + char **argv_tmp; + + /* +* x86 does not use a dedicated register to pass the pointer to +* the global_data, so it is instead passed as argv[-1]. By using +* argv[-1], the called 'Application' can use the contents of +* argv natively. However, to safely use argv[-1] a new copy of +* argv is needed with the extra element +*/ + argv_tmp = malloc(sizeof(char *) * (argc + 1)); + + if (argv_tmp) { + argv_tmp[0] = (char *)gd; + + memcpy(&argv_tmp[1], argv, (size_t)(sizeof(char *) * argc)); + + ret = (entry) (argc, &argv_tmp[1]); + free(argv_tmp); + } + + return ret; +} -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 07/14] CHECKPATCH: arch/x86/cpu/*
--- arch/x86/cpu/cpu.c|2 +- arch/x86/cpu/interrupts.c |2 +- arch/x86/cpu/start16.S| 54 +++- 3 files changed, 45 insertions(+), 13 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 7ec0c12..70a864d 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -61,7 +61,7 @@ static void reload_gdt(void) * There are machines which are known to not boot with the GDT * being 8-byte unaligned. Intel recommends 16 byte alignment */ - static const u64 boot_gdt[] __attribute__((aligned(16))) = { + static const u64 boot_gdt[] __aligned(16) = { /* CS: code, read/execute, 4 GB, base 0 */ [GDT_ENTRY_32BIT_CS] = GDT_ENTRY(0xc09b, 0, 0xf), /* DS: data, read/write, 4 GB, base 0 */ diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index e0958eb..43ec3f8 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -174,7 +174,7 @@ struct desc_ptr { unsigned short segment; } __packed; -struct idt_entry idt[256] __attribute__((aligned(16))); +struct idt_entry idt[256] __aligned(16); struct desc_ptr idt_ptr; diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S index 33e53cd..f454827 100644 --- a/arch/x86/cpu/start16.S +++ b/arch/x86/cpu/start16.S @@ -86,7 +86,8 @@ gdt_ptr: .word 0x20/* limit (32 bytes = 4 GDT entries) */ .long BOOT_SEG + gdt /* base */ - /* The GDT table ... + /* +* The GDT table ... * * Selector Type * 0x00 NULL @@ -96,15 +97,46 @@ gdt_ptr: */ gdt: - .word 0, 0, 0, 0 /* NULL */ - .word 0, 0, 0, 0 /* unused */ + /* The NULL Desciptor - Mandatory */ + .word 0x /* limit_low */ + .word 0x /* base_low */ + .byte 0x00/* base_middle */ + .byte 0x00/* access */ + .byte 0x00/* flags + limit_high */ + .byte 0x00/* base_high */ + + /* Unused Desciptor - (matches Linux) */ + .word 0x /* limit_low */ + .word 0x /* base_low */ + .byte 0x00/* base_middle */ + .byte 0x00/* access */ + .byte 0x00/* flags + limit_high */ + .byte 0x00/* base_high */ - .word 0x /* 4Gb - (0x10*0x1000 = 4Gb) */ - .word 0 /* base address = 0 */ - .word 0x9B00 /* code read/exec */ - .word 0x00CF /* granularity = 4096, 386 (+5th nibble of limit) */ + /* +* The Code Segment Descriptor: +* - Base = 0x +* - Size = 4GB +* - Access = Present, Ring 0, Exec (Code), Readable +* - Flags = 4kB Granularity, 32-bit +*/ + .word 0x /* limit_low */ + .word 0x /* base_low */ + .byte 0x00/* base_middle */ + .byte 0x9a/* access */ + .byte 0xcf/* flags + limit_high */ + .byte 0x00/* base_high */ - .word 0x /* 4Gb - (0x10*0x1000 = 4Gb) */ - .word 0x0 /* base address = 0 */ - .word 0x9300 /* data read/write */ - .word 0x00CF /* granularity = 4096, 386 (+5th nibble of limit) */ + /* +* The Data Segment Descriptor: +* - Base = 0x +* - Size = 4GB +* - Access = Present, Ring 0, Non-Exec (Data), Writable +* - Flags = 4kB Granularity, 32-bit +*/ + .word 0x /* limit_low */ + .word 0x /* base_low */ + .byte 0x00/* base_middle */ + .byte 0x93/* access */ + .byte 0xcf/* flags + limit_high */ + .byte 0x00/* base_high */ -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 08/14] CHECKPATCH: arch/x86/lib/*
--- arch/x86/lib/bios.S| 134 +-- arch/x86/lib/realmode_switch.S | 61 +++ 2 files changed, 122 insertions(+), 73 deletions(-) diff --git a/arch/x86/lib/bios.S b/arch/x86/lib/bios.S index ce8deb5..239aaa9 100644 --- a/arch/x86/lib/bios.S +++ b/arch/x86/lib/bios.S @@ -246,11 +246,9 @@ rm_int1f: rm_def_int: iret - /* -* All interrupt jumptable entries jump to here -* after pushing the interrupt vector number onto the -* stack. +* All interrupt jumptable entries jump to here after pushing the +* interrupt vector number onto the stack. */ any_interrupt16: MAKE_BIOS_STACK @@ -272,7 +270,8 @@ gs movwOFFS_VECTOR(%bp), %ax je Lint_1ah movw$0x, %ax jmp Lout -Lint_10h: /* VGA BIOS services */ +Lint_10h: + /* VGA BIOS services */ callbios_10h jmp Lout Lint_11h: @@ -281,35 +280,42 @@ Lint_11h: Lint_12h: callbios_12h jmp Lout -Lint_13h: /* BIOS disk services */ +Lint_13h: + /* BIOS disk services */ callbios_13h jmp Lout -Lint_15h: /* Misc. BIOS services */ +Lint_15h: + /* Misc. BIOS services */ callbios_15h jmp Lout -Lint_16h: /* keyboard services */ +Lint_16h: + /* keyboard services */ callbios_16h jmp Lout -Lint_1ah: /* PCI bios */ +Lint_1ah: + /* PCI bios */ callbios_1ah jmp Lout Lout: cmpw$0, %ax je Lhandeled - /* Insert code for unhandeled INTs here. + /* +* Insert code for unhandeled INTs here. * -* ROLO prints a message to the console -* (we could do that but then we're in 16bit mode -* so we'll have to get back into 32bit mode -* to use the console I/O routines (if we do this -* we shuls make int 0x10 and int 0x16 work as well)) +* ROLO prints a message to the console we could do that but then +* we're in 16bit mode so we'll have to get back into 32bit mode +* to use the console I/O routines (if we do this we should make +* int 0x10 and int 0x16 work as well) */ Lhandeled: RESTORE_CALLERS_STACK - addw$2,%sp /* dump vector number */ - iret/* return from interrupt */ + /* dump vector number */ + addw$2,%sp + + /* return from interrupt */ + iret /* @@ -327,22 +333,24 @@ gsmovwOFFS_AX(%bp), %ax je Lvid_cfg movw$0x, %ax ret -Lcur_pos: /* Read Cursor Position and Size */ +Lcur_pos: + /* Read Cursor Position and Size */ gs movw$0, OFFS_CX(%bp) gs movw$0, OFFS_DX(%bp) xorw%ax, %ax ret -Lvid_state:/* Get Video State */ -gs movw$(80 << 8|0x03), OFFS_AX(%bp) /* 80 columns, 80x25, 16 colors */ +Lvid_state: + /* Get Video State - 80 columns, 80x25, 16 colors */ +gs movw$(80 << 8|0x03), OFFS_AX(%bp) gs movw$0, OFFS_BX(%bp) xorw%ax, %ax ret -Lvid_cfg: /* Video Subsystem Configuration (EGA/VGA) */ -gs movw$0x10, OFFS_BX(%bp) /* indicate CGA/MDA/HGA */ +Lvid_cfg: + /* Video Subsystem Configuration (EGA/VGA) - indicate CGA/MDA/HGA */ +gs movw$0x10, OFFS_BX(%bp) xorw%ax, %ax ret - /* * BIOS interrupt 11h -- Equipment determination @@ -355,7 +363,6 @@ gs movw%ax, OFFS_AX(%bp) xorw%ax, %ax ret - /* * BIOSinterrupt 12h -- Get Memory Size @@ -370,16 +377,18 @@ csmovwram_in_64kb_chunks, %ax b12_more_than_640k: movw$0x280, %ax b12_return: -gs movw%ax, OFFS_AX(%bp) /* return number of kilobytes in ax */ + /* return number of kilobytes in ax */ +gs movw%ax, OFFS_AX(%bp) gs movwOFFS_FLAGS(%bp), %ax - andw$0xfffe, %ax/* clear carry -- function succeeded */ + + /* clear carry -- function succeeded */ + andw$0xfffe, %ax gs movw%ax, OFFS_FLAGS(%bp) xorw%ax, %ax ret - /* * BIOS interrupt 13h -- Disk services @@ -394,12 +403,13 @@ gsmovwOFFS_AX(%bp), %ax ret Lfunc_15h: gs movwOFFS_AX(%bp), %ax - a
[U-Boot] [RFC 06/14] x86: cache tidy-ups
--- arch/x86/cpu/cpu.c | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index a8069ad..7ec0c12 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -115,14 +115,6 @@ int cpu_init_r(void) __attribute__((weak, alias("x86_cpu_init_r"))); int x86_init_cache(void) { - const u32 nw_cd_rst = ~(X86_CR0_NW | X86_CR0_CD); - - /* turn on the cache and disable write through */ - asm("movl %%cr0, %%eax\n" - "andl %0, %%eax\n" - "movl %%eax, %%cr0\n" - "wbinvd\n" : : "i" (nw_cd_rst) : "eax"); - return 0; } int init_cache(void) __attribute__((weak, alias("x86_init_cache"))); @@ -140,6 +132,18 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +void enable_caches(void) +{ + const u32 nw_cd_rst = ~(X86_CR0_NW | X86_CR0_CD); + + /* turn on the cache and disable write through */ + asm("movl %%cr0, %%eax\n" + "andl %0, %%eax\n" + "movl %%eax, %%cr0\n" : : "i" (nw_cd_rst) : "eax"); + + flush_cache(0, 0); +} + void flush_cache(unsigned long dummy1, unsigned long dummy2) { asm("wbinvd\n"); -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 04/14] x86: Import MSR/MTRR code from Linux
Imported from Linux 3.1 with a few modifications to suit U-Boot --- arch/x86/include/asm/msr-index.h | 447 ++ arch/x86/include/asm/msr.h | 216 ++ arch/x86/include/asm/mtrr.h | 203 + 3 files changed, 866 insertions(+), 0 deletions(-) create mode 100644 arch/x86/include/asm/msr-index.h create mode 100644 arch/x86/include/asm/msr.h create mode 100644 arch/x86/include/asm/mtrr.h diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h new file mode 100644 index 000..2d4a20a --- /dev/null +++ b/arch/x86/include/asm/msr-index.h @@ -0,0 +1,447 @@ +#ifndef _ASM_X86_MSR_INDEX_H +#define _ASM_X86_MSR_INDEX_H + +/* CPU model specific register (MSR) numbers */ + +/* x86-64 specific MSRs */ +#define MSR_EFER 0xc080 /* extended feature register */ +#define MSR_STAR 0xc081 /* legacy mode SYSCALL target */ +#define MSR_LSTAR 0xc082 /* long mode SYSCALL target */ +#define MSR_CSTAR 0xc083 /* compat mode SYSCALL target */ +#define MSR_SYSCALL_MASK 0xc084 /* EFLAGS mask for syscall */ +#define MSR_FS_BASE0xc100 /* 64bit FS base */ +#define MSR_GS_BASE0xc101 /* 64bit GS base */ +#define MSR_KERNEL_GS_BASE 0xc102 /* SwapGS GS shadow */ +#define MSR_TSC_AUX0xc103 /* Auxiliary TSC */ + +/* EFER bits: */ +#define _EFER_SCE 0 /* SYSCALL/SYSRET */ +#define _EFER_LME 8 /* Long mode enable */ +#define _EFER_LMA 10 /* Long mode active (read-only) */ +#define _EFER_NX 11 /* No execute enable */ +#define _EFER_SVME 12 /* Enable virtualization */ +#define _EFER_LMSLE13 /* Long Mode Segment Limit Enable */ +#define _EFER_FFXSR14 /* Enable Fast FXSAVE/FXRSTOR */ + +#define EFER_SCE (1<<_EFER_SCE) +#define EFER_LME (1<<_EFER_LME) +#define EFER_LMA (1<<_EFER_LMA) +#define EFER_NX(1<<_EFER_NX) +#define EFER_SVME (1<<_EFER_SVME) +#define EFER_LMSLE (1<<_EFER_LMSLE) +#define EFER_FFXSR (1<<_EFER_FFXSR) + +/* Intel MSRs. Some also available on other CPUs */ +#define MSR_IA32_PERFCTR0 0x00c1 +#define MSR_IA32_PERFCTR1 0x00c2 +#define MSR_FSB_FREQ 0x00cd + +#define MSR_NHM_SNB_PKG_CST_CFG_CTL0x00e2 +#define NHM_C3_AUTO_DEMOTE (1UL << 25) +#define NHM_C1_AUTO_DEMOTE (1UL << 26) +#define ATM_LNC_C6_AUTO_DEMOTE (1UL << 25) + +#define MSR_MTRRcap0x00fe +#define MSR_IA32_BBL_CR_CTL0x0119 +#define MSR_IA32_BBL_CR_CTL3 0x011e + +#define MSR_IA32_SYSENTER_CS 0x0174 +#define MSR_IA32_SYSENTER_ESP 0x0175 +#define MSR_IA32_SYSENTER_EIP 0x0176 + +#define MSR_IA32_MCG_CAP 0x0179 +#define MSR_IA32_MCG_STATUS0x017a +#define MSR_IA32_MCG_CTL 0x017b + +#define MSR_OFFCORE_RSP_0 0x01a6 +#define MSR_OFFCORE_RSP_1 0x01a7 + +#define MSR_IA32_PEBS_ENABLE 0x03f1 +#define MSR_IA32_DS_AREA 0x0600 +#define MSR_IA32_PERF_CAPABILITIES 0x0345 + +#define MSR_MTRRfix64K_0 0x0250 +#define MSR_MTRRfix16K_8 0x0258 +#define MSR_MTRRfix16K_A 0x0259 +#define MSR_MTRRfix4K_C0x0268 +#define MSR_MTRRfix4K_C80000x0269 +#define MSR_MTRRfix4K_D0x026a +#define MSR_MTRRfix4K_D80000x026b +#define MSR_MTRRfix4K_E0x026c +#define MSR_MTRRfix4K_E80000x026d +#define MSR_MTRRfix4K_F0x026e +#define MSR_MTRRfix4K_F80000x026f +#define MSR_MTRRdefType0x02ff + +#define MSR_IA32_CR_PAT0x0277 + +#define MSR_IA32_DEBUGCTLMSR 0x01d9 +#define MSR_IA32_LASTBRANCHFROMIP 0x01db +#define MSR_IA32_LASTBRANCHTOIP0x01dc +#define MSR_IA32_LASTINTFROMIP 0x01dd +#define MSR_IA32_LASTINTTOIP 0x01de + +/* DEBUGCTLMSR bits (others vary by model): */ +#define DEBUGCTLMSR_LBR(1UL << 0) +#define DEBUGCTLMSR_BTF(1UL << 1) +#define DEBUGCTLMSR_TR (1UL << 6) +#define DEBUGCTLMSR_BTS(1UL << 7) +#define DEBUGCTLMSR_BTINT (1UL << 8) +#define DEBUGCTLMSR_BTS_OFF_OS (1UL << 9) +#define DEBUGCTLMSR_BTS_OFF_USR(1UL << 10) +#define DEBUGCTLMSR_FREEZE_LBRS_ON_PMI (1UL << 11) + +#define MSR_IA32_MC0_CTL 0x0400 +#define MSR_IA32_MC0_STATUS0x0401 +#define MSR_IA32_MC0_ADDR 0x0402 +#define MSR_I
[U-Boot] [RFC 05/14] x86: Create weak init_cache() function
--- arch/x86/cpu/cpu.c| 16 +++- arch/x86/include/asm/u-boot-x86.h |2 ++ arch/x86/lib/board.c |3 +++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 61d0b69..a8069ad 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -105,6 +105,16 @@ int cpu_init_f(void) __attribute__((weak, alias("x86_cpu_init_f"))); int x86_cpu_init_r(void) { + reload_gdt(); + + /* Initialize core interrupt and exception functionality of CPU */ + cpu_init_interrupts(); + return 0; +} +int cpu_init_r(void) __attribute__((weak, alias("x86_cpu_init_r"))); + +int x86_init_cache(void) +{ const u32 nw_cd_rst = ~(X86_CR0_NW | X86_CR0_CD); /* turn on the cache and disable write through */ @@ -113,13 +123,9 @@ int x86_cpu_init_r(void) "movl %%eax, %%cr0\n" "wbinvd\n" : : "i" (nw_cd_rst) : "eax"); - reload_gdt(); - - /* Initialize core interrupt and exception functionality of CPU */ - cpu_init_interrupts(); return 0; } -int cpu_init_r(void) __attribute__((weak, alias("x86_cpu_init_r"))); +int init_cache(void) __attribute__((weak, alias("x86_init_cache"))); int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index 757a8ee..eaa50cc 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -37,6 +37,8 @@ int x86_cpu_init_r(void); int cpu_init_r(void); int x86_cpu_init_f(void); int cpu_init_f(void); +int x86_init_cache(void); +int init_cache(void); /* cpu/.../timer.c */ void timer_isr(void *); diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 4736477..fb2b92c 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -267,6 +267,9 @@ void relocate_code(ulong stack_ptr, gd_t *id, ulong reloc_addr) id->start_addr_sp = stack_ptr; + if (init_cache() != 0) + hang(); + calculate_relocation_address(id); copy_uboot_to_ram(id); clear_bss(id); -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 03/14] x86: Allow cache before copy to RAM
--- arch/x86/cpu/start.S | 37 +++--- arch/x86/include/asm/u-boot-x86.h |1 + arch/x86/lib/board.c | 76 +++- 3 files changed, 64 insertions(+), 50 deletions(-) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index f87633b..be21d97 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -95,32 +95,25 @@ car_init_ret: movw$0x85, %ax jmp die -.globl relocate_code -.type relocate_code, @function -relocate_code: +.globl setup_sdram_environment +.type setup_sdram_environment, @function +setup_sdram_environment: + /* Leave room for Global Data - Round down to 16 byte boundary */ + subl%edx, %eax + andl$~15, %eax + + /* Create a new stack */ + movl%eax, %esp + /* -* SDRAM has been initialised, U-Boot code has been copied into -* RAM, BSS has been cleared and relocation adjustments have been -* made. It is now time to jump into the in-RAM copy of U-Boot -* +* relocate_code(ulong stack_ptr, gd_t *id, ulong reloc_addr) * %eax = Address of top of stack * %edx = Address of Global Data -* %ecx = Base address of in-RAM copy of U-Boot +* %ecx = Base address of in-RAM copy of U-Boot (ignored) */ - - /* Setup stack in RAM */ - movl%eax, %esp - - /* Setup call address of in-RAM copy of board_init_r() */ - movl$board_init_r, %ebp - addl(GENERATED_GD_RELOC_OFF)(%edx), %ebp - - /* Setup parameters to board_init_r() */ - movl%edx, %eax - movl%ecx, %edx - - /* Jump to in-RAM copy of board_init_r() */ - call*%ebp + movl%eax, %edx + xorl%ecx, %ecx + callrelocate_code die: hlt diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index 755f88a..757a8ee 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -61,5 +61,6 @@ u32 isa_map_rom(u32 bus_addr, int size); int video_bios_init(void); int video_init(void); +void setup_sdram_environment(phys_size_t ram_size, ulong gd_size); #endif /* _U_BOOT_I386_H_ */ diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index ba6b59f..4736477 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -124,10 +124,10 @@ static void display_flash_config(ulong size) */ typedef int (init_fnc_t) (void); -static int calculate_relocation_address(void); -static int copy_uboot_to_ram(void); -static int clear_bss(void); -static int do_elf_reloc_fixups(void); +static int calculate_relocation_address(gd_t *); +static int copy_uboot_to_ram(gd_t *); +static int clear_bss(gd_t *); +static int do_elf_reloc_fixups(gd_t *); init_fnc_t *init_sequence_f[] = { cpu_init_f, @@ -137,10 +137,6 @@ init_fnc_t *init_sequence_f[] = { serial_init, console_init_f, dram_init_f, - calculate_relocation_address, - copy_uboot_to_ram, - clear_bss, - do_elf_reloc_fixups, NULL, }; @@ -159,7 +155,7 @@ init_fnc_t *init_sequence_r[] = { gd_t *gd; -static int calculate_relocation_address(void) +static int calculate_relocation_address(gd_t *id) { ulong text_start = (ulong)&__text_start; ulong bss_end = (ulong)&__bss_end; @@ -167,7 +163,7 @@ static int calculate_relocation_address(void) ulong rel_offset; /* Calculate destination RAM Address and relocation offset */ - dest_addr = gd->ram_size; + dest_addr = id->start_addr_sp; dest_addr -= CONFIG_SYS_STACK_SIZE; dest_addr -= (bss_end - text_start); @@ -179,33 +175,32 @@ static int calculate_relocation_address(void) rel_offset = dest_addr - text_start; - gd->start_addr_sp = gd->ram_size; - gd->relocaddr = dest_addr; - gd->reloc_off = rel_offset; + id->relocaddr = dest_addr; + id->reloc_off = rel_offset; return 0; } -static int copy_uboot_to_ram(void) +static int copy_uboot_to_ram(gd_t *id) { - size_t len = (size_t)(&__data_end) - (size_t)(&__text_start); + size_t len = (size_t)&__data_end - (size_t)&__text_start; - memcpy((void *)gd->relocaddr, (void *)&__text_start, len); + memcpy((void *)id->relocaddr, (void *)&__text_start, len); return 0; } -static int clear_bss(void) +static int clear_bss(gd_t *id) { - ulong dst_addr = (ulong)(&__bss_start) + gd->reloc_off; - size_t len = (size_t)(&__bss_end) - (size_t)(&__bss_start); + ulong dst_addr = (ulong)&__bss_start + id->reloc_off; + size_t len = (size_t)&__bss_end - (size_t)&__bss_start; memset((void *)dst_addr, 0x00, len); return 0; } -static int do_elf_reloc_fixups(void) +static int do_elf_reloc_fixups(gd_t *id) { Elf32_Rel *re_src = (Elf32_Rel *)(&__rel_dyn_start); Elf32_Rel *re_end = (Elf3
[U-Boot] [RFC 02/14] x86: Speed up copy-to-RAM and clear BSS operations
The implementations of memcpy and memset are now the optimised versions from glibc, so use them instead of simple copy loops --- arch/x86/lib/board.c | 17 + 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index d742fec..ba6b59f 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -188,26 +188,19 @@ static int calculate_relocation_address(void) static int copy_uboot_to_ram(void) { - ulong *dst_addr = (ulong *)gd->relocaddr; - ulong *src_addr = (ulong *)&__text_start; - ulong *end_addr = (ulong *)&__data_end; + size_t len = (size_t)(&__data_end) - (size_t)(&__text_start); - while (src_addr < end_addr) - *dst_addr++ = *src_addr++; + memcpy((void *)gd->relocaddr, (void *)&__text_start, len); return 0; } static int clear_bss(void) { - void *bss_start = &__bss_start; - void *bss_end = &__bss_end; + ulong dst_addr = (ulong)(&__bss_start) + gd->reloc_off; + size_t len = (size_t)(&__bss_end) - (size_t)(&__bss_start); - ulong *dst_addr = (ulong *)(bss_start + gd->reloc_off); - ulong *end_addr = (ulong *)(bss_end + gd->reloc_off); - - while (dst_addr < end_addr) - *dst_addr++ = 0x; + memset((void *)dst_addr, 0x00, len); return 0; } -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 01/14] x86: Import glibc memcpy implementation
Taken from glibc version 2.14.90 --- arch/x86/include/asm/string.h |2 +- arch/x86/lib/string.c | 61 + 2 files changed, 62 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h index 3aa6c11..0ad612f 100644 --- a/arch/x86/include/asm/string.h +++ b/arch/x86/include/asm/string.h @@ -14,7 +14,7 @@ extern char * strrchr(const char * s, int c); #undef __HAVE_ARCH_STRCHR extern char * strchr(const char * s, int c); -#undef __HAVE_ARCH_MEMCPY +#define __HAVE_ARCH_MEMCPY extern void * memcpy(void *, const void *, __kernel_size_t); #undef __HAVE_ARCH_MEMMOVE diff --git a/arch/x86/lib/string.c b/arch/x86/lib/string.c index f2ea7e4..1fde81b 100644 --- a/arch/x86/lib/string.c +++ b/arch/x86/lib/string.c @@ -85,3 +85,64 @@ void *memset(void *dstpp, int c, size_t len) return dstpp; } + +#defineOP_T_THRES 8 +#define OPSIZ (sizeof(op_t)) + +#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes)\ +do { \ + int __d0; \ + asm volatile( \ + /* Clear the direction flag, so copying goes forward. */ \ + "cld\n" \ + /* Copy bytes. */\ + "rep\n" \ + "movsb" : \ + "=D" (dst_bp), "=S" (src_bp), "=c" (__d0) : \ + "0" (dst_bp), "1" (src_bp), "2" (nbytes) :\ + "memory");\ +} while (0) + +#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ +do { \ + int __d0; \ + asm volatile( \ + /* Clear the direction flag, so copying goes forward. */ \ + "cld\n" \ + /* Copy longwords. */\ + "rep\n" \ + "movsl" : \ + "=D" (dst_bp), "=S" (src_bp), "=c" (__d0) : \ + "0" (dst_bp), "1" (src_bp), "2" ((nbytes) / 4) : \ + "memory");\ + (nbytes_left) = (nbytes) % 4; \ +} while (0) + +void *memcpy(void *dstpp, const void *srcpp, size_t len) +{ + unsigned long int dstp = (long int)dstpp; + unsigned long int srcp = (long int)srcpp; + + /* Copy from the beginning to the end. */ + + /* If there not too few bytes to copy, use word copy. */ + if (len >= OP_T_THRES) { + /* Copy just a few bytes to make DSTP aligned. */ + len -= (-dstp) % OPSIZ; + BYTE_COPY_FWD(dstp, srcp, (-dstp) % OPSIZ); + + /* Copy from SRCP to DSTP taking advantage of the known +* alignment of DSTP. Number of bytes remaining is put +* in the third argument, i.e. in LEN. This number may +* vary from machine to machine. +*/ + WORD_COPY_FWD(dstp, srcp, len, len); + + /* Fall out and copy the tail. */ + } + + /* There are just a few bytes to copy. Use byte memory operations. */ + BYTE_COPY_FWD(dstp, srcp, len); + + return dstpp; +} -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC 00/14] x86 touch-ups (Includes new init sequence!)
Merry Christmas everyone After some positive feedback on my new x86 init sequence, I've reworked it onto the tail end of some patches that have been sitting around in my staging branch for the last few weeks. Patches 1-8 should not be that interesting to most of you (although patch 3 is a precursor for what happens from patches 9 onward) A note of warning, patches 1-8 have been run-tested on a new board I've been working on - I have not tested them for regression on the sc520 eNET board or coreboot yet Patches 9-14 have been compile tested but not run (and these have not been run through checkpatch yet - sorry, but it's late and this is the last chance for me to get anything out before the new year) This series is against u-boot-x86/next and _should_ apply to u-boot/next Patches 9-14 transition x86 away from the very ad-hoc init sequence into a clearly defined series of init loops - It should be capable of being the back-bone of a new unified init sequence. From there, we should be able to tackle the 'ifdef hell' (misc_init_r? what-the!) So a quick overview of the new sequence and it's associated elegance (IMHO) (keep in mind this is x86 centric) - CPU boots and runs the reset vector code - early_board_init performs any insanely-low-level init that is needed - car_init sets up Cache-As-RAM (and clears it so gd is zero'd) - set up a stack in CAR - call board_init_f() passing the address of gd in CAR[1][2] - board_init_f() runs the 'init_sequence_f' functions which should initialise console and SDRAM - board_init_f() calls back into the assembler routine board_init_f_r_trampoline - This routine is very simple - It creates a new stack in SDRAM and calls back into board_init_f_r - board_init_f_r is running in Flash, but with SDRAM initialised. It runs an init loop which copies gd from CAR to SDRAM, initialises the CPU cache (which destroys all data in CAR, but that is all safely in RAM by now), copies U-Boot to RAM, clears BSS and jumps to the in-RAM version of board_init_r which finishes the initialisation and enters the main loop The memory layout for x86 is pretty simple right now - gd is at top-of-RAM and the stack sits just below it. U-Boot .text, .data, .bss etc are below the stack and the heap is below U-Boot. I understand that other arch's are more complex (LCD frame buffers in top-of-RAM for example) - I think this can all be dealt with elegantly with this code as well, but I have not attempted to do so [1] The board_init_f() has different meanings for different arch's already [2] This parameter is not used, but could be in future to remove the 'gd pointer in a fixed register' hack Graeme Russ (14): x86: Import glibc memcpy implementation x86: Speed up copy-to-RAM and clear BSS operations x86: Allow cache before copy to RAM x86: Import MSR/MTRR code from Linux x86: Create weak init_cache() function x86: cache tidy-ups CHECKPATCH: arch/x86/cpu/* CHECKPATCH: arch/x86/lib/* x86: Move do_go_exec() out of board.c x86: Move setup_pcat_compatibility() out of board.c x86: remove gd->start_addr_sp x86: Move relocation code out of board.c x86: Simplify board.c x86: Tweak initialisation procedure arch/x86/cpu/cpu.c | 28 ++- arch/x86/cpu/interrupts.c|2 +- arch/x86/cpu/start.S | 52 ++-- arch/x86/cpu/start16.S | 54 +++- arch/x86/include/asm/global_data.h |1 - arch/x86/include/asm/init_helpers.h | 42 +++ arch/x86/include/asm/init_wrappers.h | 42 +++ arch/x86/include/asm/msr-index.h | 447 +++ arch/x86/include/asm/msr.h | 216 +++ arch/x86/include/asm/mtrr.h | 203 ++ arch/x86/include/asm/string.h|2 +- arch/x86/include/asm/u-boot-x86.h|3 +- arch/x86/lib/Makefile|4 + arch/x86/lib/bios.S | 134 ++ arch/x86/lib/board.c | 483 ++ arch/x86/lib/cmd_boot.c | 64 + arch/x86/lib/init_helpers.c | 154 +++ arch/x86/lib/init_wrappers.c | 137 ++ arch/x86/lib/realmode_switch.S | 61 +++-- arch/x86/lib/relocate.c | 117 arch/x86/lib/string.c| 61 + arch/x86/lib/zimage.c|7 + include/common.h | 11 +- 23 files changed, 1854 insertions(+), 471 deletions(-) create mode 100644 arch/x86/include/asm/init_helpers.h create mode 100644 arch/x86/include/asm/init_wrappers.h create mode 100644 arch/x86/include/asm/msr-index.h create mode 100644 arch/x86/include/asm/msr.h create mode 100644 arch/x86/include/asm/mtrr.h create mode 100644 arch/x86/lib/cmd_boot.c create mode 100644 arch/x86/lib/init_helpers.c create mode 100644 arch/x86/lib/init_wrappers.c create mode 100644 arch/x86/lib/relocate.c -- 1.7.5.2.317.g391b14
Re: [U-Boot] [STATUS] -rc3 is out
Le 23/12/2011 12:30, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message<4ef452c7.1010...@aribaud.net> you wrote: Tom Warren has requested a pull of u-boot-tegra/next into u-boot-arm/master, which I assume is for inclusion into 2011.12. Once I have checked that no major breakage is caused to the ARM boards, and if you're ok with a last-day pull request, I'll send one out for u-boot-arm/master around 14:00 GMT+1. That's OK with me, assuming these are only bug fixes and not new stuff. (adding Tom) Hmm, there's both bug fixes and new stuff. :/ Tom, any possibility to quickly reorder the tegra commits in order to separate bugfixes (in tegra/master) from new stuff (in tegra/next)? Bugfixes could go in now. I have some last minute PPC bug fixes myself :-( Best regards, Wolfgang Denk Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] -rc3 is out
Dear Albert ARIBAUD, In message <4ef452c7.1010...@aribaud.net> you wrote: > > Tom Warren has requested a pull of u-boot-tegra/next into > u-boot-arm/master, which I assume is for inclusion into 2011.12. Once I > have checked that no major breakage is caused to the ARM boards, and if > you're ok with a last-day pull request, I'll send one out for > u-boot-arm/master around 14:00 GMT+1. That's OK with me, assuming these are only bug fixes and not new stuff. I have some last minute PPC bug fixes myself :-( Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "An open mind has but one disadvantage: it collects dirt." - a saying at RPI ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] post/lib_powerpc/multi.c: make checkpatch clean
Signed-off-by: Wolfgang Denk Cc: Anatolij Gustschin Cc: Stefan Roese Cc: Kumar Gala Cc: Kim Phillips Cc: Andy Fleming --- post/lib_powerpc/multi.c | 54 + 1 files changed, 25 insertions(+), 29 deletions(-) diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c index 5845616..4b4b119 100644 --- a/post/lib_powerpc/multi.c +++ b/post/lib_powerpc/multi.c @@ -38,45 +38,41 @@ #if CONFIG_POST & CONFIG_SYS_POST_CPU -extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); +extern void cpu_post_exec_02(ulong * code, ulong op1, ulong op2); -int cpu_post_test_multi (void) +int cpu_post_test_multi(void) { -int ret = 0; -unsigned int i; -int flag = disable_interrupts(); + int ret = 0; + unsigned int i; + int flag = disable_interrupts(); -if (ret == 0) -{ - ulong src [26], dst [26]; + if (ret == 0) { + ulong src[26], dst[26]; - ulong code[] = - { - ASM_LMW(5, 3, 0), - ASM_STMW(5, 4, 0), - ASM_BLR, - }; + ulong code[] = { + ASM_LMW(5, 3, 0), + ASM_STMW(5, 4, 0), + ASM_BLR, + }; - for (i = 0; i < ARRAY_SIZE(src); ++i) - { - src[i] = i; - dst[i] = 0; - } + for (i = 0; i < ARRAY_SIZE(src); ++i) { + src[i] = i; + dst[i] = 0; + } - cpu_post_exec_02(code, (ulong)src, (ulong)dst); + cpu_post_exec_02(code, (ulong) src, (ulong) dst); - ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1; -} + ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1; + } -if (ret != 0) -{ - post_log ("Error at multi test !\n"); -} + if (ret != 0) { + post_log("Error at multi test !\n"); + } -if (flag) - enable_interrupts(); + if (flag) + enable_interrupts(); -return ret; + return ret; } #endif -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] post/lib_powerpc/multi.c: code cleanup
Clean up and document the code: - get rid of unneeded code block - add comment which code is generated Signed-off-by: Wolfgang Denk Cc: Anatolij Gustschin Cc: Stefan Roese Cc: Kumar Gala Cc: Kim Phillips Cc: Andy Fleming --- post/lib_powerpc/multi.c | 27 --- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c index 4b4b119..b8619de 100644 --- a/post/lib_powerpc/multi.c +++ b/post/lib_powerpc/multi.c @@ -44,26 +44,23 @@ int cpu_post_test_multi(void) { int ret = 0; unsigned int i; + ulong src[26], dst[26]; int flag = disable_interrupts(); - if (ret == 0) { - ulong src[26], dst[26]; + ulong code[] = { + ASM_LMW(5, 3, 0), /* lmw r5, 0(r3) */ + ASM_STMW(5, 4, 0), /* stmr r5, 0(r4) */ + ASM_BLR,/* blr */ + }; - ulong code[] = { - ASM_LMW(5, 3, 0), - ASM_STMW(5, 4, 0), - ASM_BLR, - }; - - for (i = 0; i < ARRAY_SIZE(src); ++i) { - src[i] = i; - dst[i] = 0; - } + for (i = 0; i < ARRAY_SIZE(src); ++i) { + src[i] = i; + dst[i] = 0; + } - cpu_post_exec_02(code, (ulong) src, (ulong) dst); + cpu_post_exec_02(code, (ulong) src, (ulong) dst); - ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1; - } + ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1; if (ret != 0) { post_log("Error at multi test !\n"); -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] post/lib_powerpc/multi.c: fix stack overflow error
The code and comment disagreed: the comment claimed that r6...r31 were copied, and consequently the arrays for "src" and "dst" were declared with 26 entries, but the actual code ("lmw r5,0(r3)" and "stmw r5,0(r4)") copied _27_ words (r5 through r31), which resulted in false "POST cpu Error at multi test" messages. Fix the comment and the array sizes. Signed-off-by: Wolfgang Denk Cc: Anatolij Gustschin Cc: Stefan Roese Cc: Kumar Gala Cc: Kim Phillips Cc: Andy Fleming --- post/lib_powerpc/multi.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c index b8619de..6642ee3 100644 --- a/post/lib_powerpc/multi.c +++ b/post/lib_powerpc/multi.c @@ -27,9 +27,9 @@ * CPU test * Load/store multiple word instructions: lmw, stmw * - * 26 consecutive words are loaded from a source memory buffer - * into GPRs r6 through r31. After that, 26 consecutive words are stored - * from the GPRs r6 through r31 into a target memory buffer. The contents + * 27 consecutive words are loaded from a source memory buffer + * into GPRs r5 through r31. After that, 27 consecutive words are stored + * from the GPRs r5 through r31 into a target memory buffer. The contents * of the source and target buffers are then compared. */ @@ -44,7 +44,7 @@ int cpu_post_test_multi(void) { int ret = 0; unsigned int i; - ulong src[26], dst[26]; + ulong src[27], dst[27]; int flag = disable_interrupts(); ulong code[] = { -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] -rc3 is out
Le 21/12/2011 20:45, Wolfgang Denk a écrit : Hello everybody, I have just pushed out -rc3, so we have two more days for testing before the release of v2011.12 Please check that everythink looks as expected, and that all your important bug fixes have been merged. Thanks. Best regards, Wolfgang Denk Wolfgang, Tom Warren has requested a pull of u-boot-tegra/next into u-boot-arm/master, which I assume is for inclusion into 2011.12. Once I have checked that no major breakage is caused to the ARM boards, and if you're ok with a last-day pull request, I'll send one out for u-boot-arm/master around 14:00 GMT+1. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] -rc3 is out
Dear Wolfgang, On 21.12.2011 20:45, Wolfgang Denk wrote: > Hello everybody, > > I have just pushed out -rc3, so we have two more days for testing > before the release of v2011.12 avr32 is working again ... thanks best regards Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot