1121407Speter/*-
2121407Speter * Copyright (c) 2003 Peter Wemm
3121407Speter * All rights reserved.
4121407Speter *
5121407Speter * Redistribution and use in source and binary forms, with or without
6121407Speter * modification, are permitted provided that the following conditions
7121407Speter * are met:
8121407Speter * 1. Redistributions of source code must retain the above copyright
9121407Speter *    notice, this list of conditions and the following disclaimer.
10121407Speter * 2. Redistributions in binary form must reproduce the above copyright
11121407Speter *    notice, this list of conditions and the following disclaimer in the
12121407Speter *    documentation and/or other materials provided with the distribution.
13121407Speter *
14121407Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15121407Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16121407Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17121407Speter * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18121407Speter * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19121407Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20121407Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21121407Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22121407Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23121407Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24121407Speter * SUCH DAMAGE.
25121407Speter */
26121407Speter
27121407Speter#include <sys/cdefs.h>
28121407Speter__FBSDID("$FreeBSD$");
29121407Speter
30121407Speter#include <machine/sysarch.h>
31121407Speter
32121407Speterint
33121407Speteramd64_set_gsbase(void *addr)
34121407Speter{
35121407Speter
36124296Snectar	return (sysarch(AMD64_SET_GSBASE, &addr));
37121407Speter}
38