isoboot.c (76224) | isoboot.c (80751) |
---|---|
1/* 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. 9 * 10 * This software is provided "AS IS" and without any express or 11 * implied warranties, including, without limitation, the implied 12 * warranties of merchantability and fitness for a particular 13 * purpose. 14 */ 15 16/* | 1/* 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. 9 * 10 * This software is provided "AS IS" and without any express or 11 * implied warranties, including, without limitation, the implied 12 * warranties of merchantability and fitness for a particular 13 * purpose. 14 */ 15 16/* |
17 * $FreeBSD: head/sys/boot/i386/gptboot/gptboot.c 76224 2001-05-02 23:56:21Z obrien $ | 17 * $FreeBSD: head/sys/boot/i386/gptboot/gptboot.c 80751 2001-07-31 19:50:09Z jhb $ |
18 */ 19 20#include <sys/param.h> 21#include <sys/reboot.h> 22#include <sys/diskslice.h> 23#include <sys/disklabel.h> 24#include <sys/dirent.h> 25#include <machine/bootinfo.h> 26#include <machine/elf.h> 27 28#include <ufs/ffs/fs.h> 29#include <ufs/ufs/dinode.h> 30 31#include <stdarg.h> 32 33#include <a.out.h> 34 35#include <btxv86.h> 36 | 18 */ 19 20#include <sys/param.h> 21#include <sys/reboot.h> 22#include <sys/diskslice.h> 23#include <sys/disklabel.h> 24#include <sys/dirent.h> 25#include <machine/bootinfo.h> 26#include <machine/elf.h> 27 28#include <ufs/ffs/fs.h> 29#include <ufs/ufs/dinode.h> 30 31#include <stdarg.h> 32 33#include <a.out.h> 34 35#include <btxv86.h> 36 |
37#include "boot2.h" |
|
37#include "lib.h" 38 39#define RBX_ASKNAME 0x0 /* -a */ 40#define RBX_SINGLE 0x1 /* -s */ 41#define RBX_DFLTROOT 0x5 /* -r */ 42#define RBX_KDB 0x6 /* -d */ 43#define RBX_CONFIG 0xa /* -c */ 44#define RBX_VERBOSE 0xb /* -v */ --- 689 unchanged lines hidden (view full) --- 734 735static int 736drvread(void *buf, unsigned lba, unsigned nblk) 737{ 738 static unsigned c = 0x2d5c7c2f; 739 740 printf("%c\b", c = c << 8 | c >> 24); 741 v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; | 38#include "lib.h" 39 40#define RBX_ASKNAME 0x0 /* -a */ 41#define RBX_SINGLE 0x1 /* -s */ 42#define RBX_DFLTROOT 0x5 /* -r */ 43#define RBX_KDB 0x6 /* -d */ 44#define RBX_CONFIG 0xa /* -c */ 45#define RBX_VERBOSE 0xb /* -v */ --- 689 unchanged lines hidden (view full) --- 735 736static int 737drvread(void *buf, unsigned lba, unsigned nblk) 738{ 739 static unsigned c = 0x2d5c7c2f; 740 741 printf("%c\b", c = c << 8 | c >> 24); 742 v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; |
742 v86.addr = 0x704; /* call to xread in boot1 */ | 743 v86.addr = XREADORG; /* call to xread in boot1 */ |
743 v86.es = VTOPSEG(buf); 744 v86.eax = lba; 745 v86.ebx = VTOPOFF(buf); 746 v86.ecx = lba >> 16; 747 v86.edx = nblk << 8 | dsk.drive; 748 v86int(); 749 v86.ctl = V86_FLAGS; 750 if (V86_CY(v86.efl)) { --- 55 unchanged lines hidden --- | 744 v86.es = VTOPSEG(buf); 745 v86.eax = lba; 746 v86.ebx = VTOPOFF(buf); 747 v86.ecx = lba >> 16; 748 v86.edx = nblk << 8 | dsk.drive; 749 v86int(); 750 v86.ctl = V86_FLAGS; 751 if (V86_CY(v86.efl)) { --- 55 unchanged lines hidden --- |