From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kbf6M-0000xd-FA for mharc-grub-devel@gnu.org; Fri, 05 Sep 2008 13:28:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kbf6K-0000uw-7c for grub-devel@gnu.org; Fri, 05 Sep 2008 13:28:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kbf6J-0000u8-AF for grub-devel@gnu.org; Fri, 05 Sep 2008 13:28:03 -0400 Received: from [199.232.76.173] (port=36405 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kbf6J-0000tb-07 for grub-devel@gnu.org; Fri, 05 Sep 2008 13:28:03 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:41962) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kbf6H-0003Pj-TQ for grub-devel@gnu.org; Fri, 05 Sep 2008 13:28:02 -0400 Received: by fg-out-1718.google.com with SMTP id l26so813646fgb.30 for ; Fri, 05 Sep 2008 10:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=rR+ATJguNy1rK0cPky/vAjfnBn3NU9aluL+oGVvinlI=; b=f4B1Gr0yowCtZp6oLbFvhLGntVbuJw2T02+qK8gY3w8FjcJKGDSirMA7vQJsM5CtDB yhbd59tLmATshAl0p94Wnxk4J7UbLY1LkTNQqqPOTLdH1i/HT/WSMuCbDSDp9p4bKvVx RYqU3kHKS4SNb/3JjpTbPPUCNJot+cfhvIxfw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=uzL4yNdmUzAjm5SMaG45J4lAmgdBXerAVQM04h19hw88XPLiYTdN0xIfpzzBtt5DrO OXrXuBmp1yLikEBRbO9AtIGXOBOreXTDDHn5WOeRBcybDjsVIXsgYKXkUeF7lBVPstpK l6UgnqbbVf/NnlnMI7g9lBg/R8CDMVQFWt5Zo= Received: by 10.86.74.15 with SMTP id w15mr8983614fga.42.1220635678714; Fri, 05 Sep 2008 10:27:58 -0700 (PDT) Received: from ?192.168.1.15? ( [85.0.144.99]) by mx.google.com with ESMTPS id l19sm1203533fgb.7.2008.09.05.10.27.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Sep 2008 10:27:57 -0700 (PDT) Message-ID: <48C16C17.2000803@gmail.com> Date: Fri, 05 Sep 2008 19:27:51 +0200 From: phcoder User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: The development of GRUB 2 X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: [RFC] general-usage real-mode loader X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2008 17:28:04 -0000 Hello. A long time ago I written a C+asm code which loads any given code at any real-mode location, then puts machine in correct state and then launches the kernel. I can modify this code to suit GRUB2. Then loading realmode kernel would work like this: 1) copy helper asm to last kb of lower memory 2) jump to the helper 3) helper copies from upper memory the kernel 4) turn A10 bug back on if necessary 5) go to RM 6) prepare registers 7) jump to the kernel This protocol is very flexible and as such could be used by all loaders which load kernel in realmode or even in PM (skip step 5, do steps 6-7 in 32-bit mode) except for changing page tables. Such a helper can be easily implemented as module and so help us removing asm-parts of loaders from the kernel. If I recieve greenlight for it, I implement it. Vladimir 'phcoder' Serbinenko