read NAND

Andy Green andy at openmoko.com
Thu Jul 3 10:38:08 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| I write code like this:(can not compile.error message "start_kboot.c:32:
| undefined reference to `ADDR' ")
|
|  >unsigned char buf[824];
|  >#define ADDR  (*(volatile unsigned *)buf)

|  >    __asm__("b ADDR");

What happens if you paste (*(volatile unsigned *)buf) in place of the
ADDR usage?  Is it OK?

| 2. i don't know how to allocate memory  to buf. so i just unsigned char
| buf[824];
|    and i also don't know how to let the CPU jump to the address.

you can make like

	void (fp*)(void) = &buf[0];

	(fp)();

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkhsj+IACgkQOjLpvpq7dMrUegCcD1x5AfPy2EV43NtW/Zd2r22L
qzYAn1+2USt9BK5X0oP37s0qehIRYHs+
=XTGK
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list