Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Robert Finch Newsgroups: comp.arch Subject: Re: MSI interrupts - Instructions Date: Wed, 26 Mar 2025 06:56:00 -0400 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <53b8227eba214e0340cad309241af7b5@www.novabbs.org> <3pXAP.584096$FVcd.26370@fx10.iad> <795b541375e3e0f53e2c76a55ffe3f20@www.novabbs.org> <1681197d3c1af131d6b8cae884f7c9ca@www.novabbs.org> <8BVBP.816276$eNx6.247046@fx14.iad> <20250317161132.00004dd9@yahoo.com> <1WZBP.558392$SZca.243157@fx13.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 26 Mar 2025 11:56:01 +0100 (CET) Injection-Info: dont-email.me; posting-host="ceebc71e485ba32e0d00d9f589df632b"; logging-data="1685993"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18g26SpBxkjCdoOB1840FgJFqRk9k1cOGs=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Z/zWPw6ReZPLf8ZDWRkMAtDrrz4= Content-Language: en-US In-Reply-To: Working on a simple OS I thought it might be useful to be able to poll for interrupts when interrupts are disabled. I think there may be times where it is acceptable to process certain kinds of interrupts even if they were disable. So, I added a poll-for-interrupt instruction to the architecture. Which just checks for interrupts and continues if there is not one. I have seen wait-for-interrupt instructions before, but not sure about polling. I also added a two-up-level return from interrupt instruction. I have not seen this in other architectures, but I needed it at one point. Interrupt information is stored on an internal stack, and it is tricky (slow) to manipulate it for a two-up-level return. It is an eight level stack with two or three words of information per level. It was a bit much to copy it all in software, so I added the hardware return. But it is a lot of extra hardware for a very rare occurrence. Finding this discussion on interrupts informative. I have only done a modicum of work on an OS; tried to get things working with spinlocks.