From owner-freebsd-hackers Fri Feb 26 0:36:22 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp-out1.bellatlantic.net (smtp-out1.bellatlantic.net [199.45.39.156]) by hub.freebsd.org (Postfix) with ESMTP id 5766114F0C for ; Fri, 26 Feb 1999 00:35:54 -0800 (PST) (envelope-from dmm125@bellatlantic.net) Received: from dmm125 (client201-122-166.bellatlantic.net [151.201.122.166]) by smtp-out1.bellatlantic.net (8.9.1/8.9.1) with SMTP id DAA29935 for ; Fri, 26 Feb 1999 03:35:20 -0500 (EST) Message-ID: <000701be6162$b52458e0$02000003@dmm125> From: "Donn Miller" To: Subject: Accessing the BIOS... Date: Fri, 26 Feb 1999 03:33:18 -0500 X-Priority: 3 X-Mailer: Microsoft Outlook Express 5.00.0810.800 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I need to find out some information about how to write apps that access the BIOS in FreeBSD. Obviously, since we are dealing with proteced mode, we can't use INT 10h. My understanding is this (help me out here if I'm wrong): (*) FreeBSD makes a copy of the Bios image, which is what, 32kB in length? We need to find a pointer to the start of the Bios image, also known as the protected mode entry point. (*) FreeBSD also makes a copy of the first 0x600 bytes of conventional memory, which may or may not be stored within the already existing BIOS image. Obviously, a far pointer is required to access this if it is outside the range of the 32kB BIOS image. FWIU, DOS uses address locations 0x000-0x600 for some BIOS services, such as writing to the VGA display. It does this by passing arguments in the various registers (such as AX or EAX) and calling INT 10. In 16-bit or 32-bit protected mode, I don't know which, you can't pass arguments in AX and call int10. You have to get a pointer to the protected mode entry point. (*) Does FBSD use 16 or 32 bit protected-mode BIOS calls? If they are 16-bit, I think you use a selector:offest in the format 16:16. 32-bit protected-mode calls have a selector:offset format of 16:32. I know this must involve using some arithmetic with DS or ES registers, but I'm not sure. (*) When FreeBSD makes a copy of the 32kB of BIOS, does it put it in the same location every time? Also, I imagine Linux is very similar in its handling of protected-mode BIOS calls, but it probably puts the image in a different place, etc. It seems like BIOS calls are pretty complicated in protected mode. Why aren't we allowed to use INT 0x10, and use the registers (AX, etc.) in protected mode, but real mode allows this? I know other platforms, such as Macs, Sun SPARCS, and Alpha Stations don't have an explicit BIOS, but they do have some equivalent, like some kind of firmware. Is programming the "BIOS" in non-intel platforms as difficult as programming the BIOS on PC's? I think a good source of info would be Ralph's interrupt list. ;-) Thanks Donn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message