vmbus_vector.S revision 301017
155714Skris/*-
2280304Sjkim * Copyright (c) 2016 Microsoft Corp.
355714Skris * All rights reserved.
4273149Sjkim *
5273149Sjkim * Redistribution and use in source and binary forms, with or without
6273149Sjkim * modification, are permitted provided that the following conditions
7273149Sjkim * are met:
8280304Sjkim * 1. Redistributions of source code must retain the above copyright
9280304Sjkim *    notice unmodified, this list of conditions, and the following
1079998Skris *    disclaimer.
1159191Skris * 2. Redistributions in binary form must reproduce the above copyright
1259191Skris *    notice, this list of conditions and the following disclaimer in the
1355714Skris *    documentation and/or other materials provided with the distribution.
14280304Sjkim *
15280304Sjkim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1659191Skris * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1759191Skris * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18280304Sjkim * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19280304Sjkim * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20280304Sjkim * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21280304Sjkim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2259191Skris * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2359191Skris * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2459191Skris * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2559191Skris *
2659191Skris * $FreeBSD: head/sys/dev/hyperv/vmbus/i386/hv_vector.S 301017 2016-05-31 05:01:43Z sephe $
2759191Skris */
2859191Skris
2955714Skris#include <machine/asmacros.h>
3059191Skris#include <machine/specialreg.h>
3159191Skris
3255714Skris#include "assym.s"
33296317Sdelphij
34280304Sjkim/*
35296317Sdelphij * This is the Hyper-V vmbus channel direct callback interrupt.
36280304Sjkim * Only used when it is running on Hyper-V.
37296317Sdelphij */
38280304Sjkim	.text
39280304Sjkim	SUPERALIGN_TEXT
4055714SkrisIDTVEC(vmbus_isr)
41280304Sjkim	PUSH_FRAME
42280304Sjkim	SET_KERNEL_SREGS
4368651Skris	cld
4468651Skris	FAKE_MCOUNT(TF_EIP(%esp))
4568651Skris	pushl	%esp
4668651Skris	call	vmbus_handle_intr
4768651Skris	add	$4, %esp
4868651Skris	MEXITCOUNT
4968651Skris	jmp	doreti
50280304Sjkim