- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Portions related to the alpha architecture are:
- *
- * Copyright(C) 2001 University of California. LA-CC Number 01-67.
- * This software has been authored by an employee or employees of the
- * University of California, operator of the Los Alamos National
- * Laboratory under Contract No. W-7405-ENG-36 with the U.S.
- * Department of Energy. The U.S. Government has rights to use,
- * reproduce, and distribute this software. If the software is
- * modified to produce derivative works, such modified software should
- * be clearly marked, so as not to confuse it with the version
- * available from LANL.
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by
- * reference to http://www.gnu.org/licenses/gpl.html.
- *
- * This software is provided by the author(s) "as is" and any express
- * or implied warranties, including, but not limited to, the implied
- * warranties of merchantability and fitness for a particular purpose
- * are disclaimed. In no event shall the author(s) be liable for any
- * direct, indirect, incidental, special, exemplary, or consequential
- * damages (including, but not limited to, procurement of substitute
- * goods or services; loss of use, data, or profits; or business
- * interruption) however caused and on any theory of liability,
- * whether in contract, strict liability, or tort (including
- * negligence or otherwise) arising in any way out of the use of this
- * software, even if advised of the possibility of such damage.
- *
- * $Id: Exp $
- *--------------------------------------------------------------------*/
-
-/* Modified to be a self sufficient plug in so that it can be used
- without reliance on other parts of core Linuxbios
- (C) 2005 Nick.Barker9@btinternet.com
-
- Used initially for epia-m where there are problems getting the bios
- emulator to successfully run this bios.
-*/
-
-/* Declare a temporary global descriptor table - necessary because the
- Core part of the bios no longer sets up any 16 bit segments */
-__asm__ (
- /* pointer to original gdt */
- "gdtarg: \n"
- " .word gdt_limit \n"
- " .long gdt \n"
-
- /* compute the table limit */
- "__mygdt_limit = __mygdt_end - __mygdt - 1 \n"
-
- "__mygdtaddr: \n"
- " .word __mygdt_limit \n"
- " .long __mygdt \n"
-
- "__mygdt: \n"
- /* selgdt 0, unused */
- " .word 0x0000, 0x0000 \n"
- " .byte 0x00, 0x00, 0x00, 0x00 \n"
-
- /* selgdt 8, unused */
- " .word 0x0000, 0x0000 \n"
- " .byte 0x00, 0x00, 0x00, 0x00 \n"
-
- /* selgdt 0x10, flat code segment */
- " .word 0xffff, 0x0000 \n"
- " .byte 0x00, 0x9b, 0xcf, 0x00 \n"
-
- /* selgdt 0x18, flat data segment */
- " .word 0xffff, 0x0000 \n"
- " .byte 0x00, 0x93, 0xcf, 0x00 \n"
-
- /* selgdt 0x20, unused */
- " .word 0x0000, 0x0000 \n"
- " .byte 0x00, 0x00, 0x00, 0x00 \n"
-
- /* selgdt 0x28 16-bit 64k code at 0x00000000 */
- " .word 0xffff, 0x0000 \n"
- " .byte 0, 0x9a, 0, 0 \n"
-
- /* selgdt 0x30 16-bit 64k data at 0x00000000 */
- " .word 0xffff, 0x0000 \n"
- " .byte 0, 0x92, 0, 0 \n"