| 1 |
// Copyright 2016-2017 VMware, Inc. All Rights Reserved. |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
package bdoor |
| 16 |
|
| 17 |
const ( |
| 18 |
BackdoorMagic = uint32(0x564D5868) |
| 19 |
) |
| 20 |
|
| 21 |
type BackdoorProto struct { |
| 22 |
// typedef union { |
| 23 |
// struct { |
| 24 |
// DECLARE_REG_NAMED_STRUCT(ax); |
| 25 |
// size_t size; /* Register bx. */ |
| 26 |
// DECLARE_REG_NAMED_STRUCT(cx); |
| 27 |
// DECLARE_REG_NAMED_STRUCT(dx); |
| 28 |
// DECLARE_REG_NAMED_STRUCT(si); |
| 29 |
// DECLARE_REG_NAMED_STRUCT(di); |
| 30 |
// } in; |
| 31 |
// struct { |
| 32 |
// DECLARE_REG_NAMED_STRUCT(ax); |
| 33 |
// DECLARE_REG_NAMED_STRUCT(bx); |
| 34 |
// DECLARE_REG_NAMED_STRUCT(cx); |
| 35 |
// DECLARE_REG_NAMED_STRUCT(dx); |
| 36 |
// DECLARE_REG_NAMED_STRUCT(si); |
| 37 |
// DECLARE_REG_NAMED_STRUCT(di); |
| 38 |
// } out; |
| 39 |
// } proto; |
| 40 |
|
| 41 |
AX, BX, CX, DX, SI, DI, BP UInt32 |
| 42 |
size uint32 |
| 43 |
} |
| 44 |
|
| 45 |
func bdoor_inout(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32) |
| 46 |
func bdoor_hbout(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32) |
| 47 |
func bdoor_hbin(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32) |
| 48 |
func bdoor_inout_test(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32) |