From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schweigstill Date: Tue, 20 May 2008 10:36:25 +0200 Subject: [U-Boot-Users] question about interrupt In-Reply-To: <3a665c760805192253j4dd68bd5mb8c4fcc7407954a2@mail.gmail.com> References: <3a665c760805191911h64b7e12fqff9fcd9b3d9ba135@mail.gmail.com> <7f245da80805192218j5a675e01mf7e2fc8fca777d95@mail.gmail.com> <3a665c760805192253j4dd68bd5mb8c4fcc7407954a2@mail.gmail.com> Message-ID: <48328D89.9050708@schweigstill.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello! loody schrieb: > As far as I know, the cpu will set the PC to irq/fiq vector when the > these exceptions are triggered. And these pointers are usually at the > beginning position of bootloader, if bootloader wants to pass these > functions to kernel, there may be some instructions like "b xxxxxx'. > > If uboot don't handle these exceptions, how the kernel knows these events? Probably you are confusing a bootloader with something like a BIOS. When a Linux kernel starts it just copies some data (like information contained in ATAGS on ARM processors) and activates the MMU. U-Boot just works when the MMU is disabled because it uses physical addresses. Usually the interrupt handler code isn't used by *plain* U-Boot, and on many platforms it may be totally out-dated. The big advantage of this concept is that you can implement your own interrupt handler without fearing conflicts with other interrupt handler stuff, so the runtime behaviour of such a single interrupt handler can be much more predictable than in complex environments like Linux. And the answer to the next question which you probably have in mind is: No, the U-Boot process scheduler or realtime kernel also doesn't use interrupts because the is no kernel. Everything is based on a main loop. Yes, on implication is that U-Boot also won't respond to ARP/ICMP ECHO or similar network requests when it isn't running a network command like bootp, dhcp or ftp. And also timer handling is not interrupt driven but instead performed by polling some hardware timer registers. Regards Andreas Schweigstill -- Dipl.-Phys. Andreas Schweigstill Schweigstill IT | Embedded Systems Schauenburgerstra?e 116, D-24118 Kiel, Germany Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436 Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/