From: Erwin Rol <mailinglists@erwinrol.com>
To: barebox@lists.infradead.org
Subject: x86 weirdness
Date: Tue, 31 Jul 2012 00:36:26 +0200 [thread overview]
Message-ID: <50170C6A.2000101@erwinrol.com> (raw)
Hallo,
after I had successfully "ported" barebox to about 5 different embedded
x86 (mostly N270 and Z510 Atom boards) I ran into problems with a
Celeron SU2300 CPU based board. After a lot of trail and error, which
included the implementation of a BIOS based console cause the board does
not have a RS232 port, it looked like the global variables were not what
I expected them to be, namely zero.
So in arch/x86/boot/main_entry.c i changed to following;
/**
* Called plainly from assembler that switches from real to flat mode
*
* @note The C environment isn't initialized yet
*/
void uboot_entry(void)
{
#if 0
/* clear the BSS first */
memset(__bss_start, 0x00, __bss_stop - __bss_start);
#else
unsigned char* ptr;
for (ptr = __bss_start; ptr < __bss_stop; ptr++)
*ptr = 0x00;
#endif
start_barebox();
}
After doing that it works. I have not yet looked into the resulting asm
to find the differences, but could someone have an explanation for why
the memset doesn't work and the simple loop does work?
- Erwin
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2012-07-30 22:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 22:36 Erwin Rol [this message]
2012-07-31 10:49 ` Erwin Rol
2012-07-31 13:13 ` Sascha Hauer
2012-07-31 15:16 ` Erwin Rol
2012-07-31 15:51 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-31 16:16 ` Erwin Rol
2012-07-31 17:07 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50170C6A.2000101@erwinrol.com \
--to=mailinglists@erwinrol.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox