bdoor_386.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. package bdoor
  15. const (
  16. BackdoorMagic = uint32(0x564D5868)
  17. )
  18. type BackdoorProto struct {
  19. // typedef union {
  20. // struct {
  21. // DECLARE_REG_NAMED_STRUCT(ax);
  22. // size_t size; /* Register bx. */
  23. // DECLARE_REG_NAMED_STRUCT(cx);
  24. // DECLARE_REG_NAMED_STRUCT(dx);
  25. // DECLARE_REG_NAMED_STRUCT(si);
  26. // DECLARE_REG_NAMED_STRUCT(di);
  27. // } in;
  28. // struct {
  29. // DECLARE_REG_NAMED_STRUCT(ax);
  30. // DECLARE_REG_NAMED_STRUCT(bx);
  31. // DECLARE_REG_NAMED_STRUCT(cx);
  32. // DECLARE_REG_NAMED_STRUCT(dx);
  33. // DECLARE_REG_NAMED_STRUCT(si);
  34. // DECLARE_REG_NAMED_STRUCT(di);
  35. // } out;
  36. // } proto;
  37. AX, BX, CX, DX, SI, DI, BP UInt32
  38. size uint32
  39. }
  40. func bdoor_inout(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32)
  41. func bdoor_hbout(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32)
  42. func bdoor_hbin(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32)
  43. func bdoor_inout_test(ax, bx, cx, dx, si, di, bp uint32) (retax, retbx, retcx, retdx, retsi, retdi, retbp uint32)