m68knommu: remove local gettimeofday code
[wrt350n-kernel.git] / arch / x86 / boot / voyager.c
blob6499e3239b4132213907ab9ff54d00be9219dd1b
1 /* -*- linux-c -*- ------------------------------------------------------- *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
9 * ----------------------------------------------------------------------- */
12 * arch/i386/boot/voyager.c
14 * Get the Voyager config information
17 #include "boot.h"
19 int query_voyager(void)
21 u8 err;
22 u16 es, di;
23 /* Abuse the apm_bios_info area for this */
24 u8 *data_ptr = (u8 *)&boot_params.apm_bios_info;
26 data_ptr[0] = 0xff; /* Flag on config not found(?) */
28 asm("pushw %%es ; "
29 "int $0x15 ; "
30 "setc %0 ; "
31 "movw %%es, %1 ; "
32 "popw %%es"
33 : "=q" (err), "=r" (es), "=D" (di)
34 : "a" (0xffc0));
36 if (err)
37 return -1; /* Not Voyager */
39 set_fs(es);
40 copy_from_fs(data_ptr, di, 7); /* Table is 7 bytes apparently */
41 return 0;