|
|
1.1 root 1: /****************************************************************************** 1.1.1.2 ! root 2: * Copyright (c) 2004, 2011 IBM Corporation 1.1 root 3: * All rights reserved. 4: * This program and the accompanying materials 5: * are made available under the terms of the BSD License 6: * which accompanies this distribution, and is available at 7: * http://www.opensource.org/licenses/bsd-license.php 8: * 9: * Contributors: 10: * IBM Corporation - initial implementation 11: *****************************************************************************/ 1.1.1.2 ! root 12: 1.1 root 13: #include <libhvcall.h> 14: 1.1.1.2 ! root 15: // : hv-putchar ( hvtermno char -- ) 1.1 root 16: PRIM(hv_X2d_putchar) 17: char c = TOS.n; POP; 1.1.1.2 ! root 18: int hvtermno = TOS.n; POP; ! 19: hv_putchar(c, hvtermno); 1.1 root 20: MIRP 21: 1.1.1.2 ! root 22: // : hv-getchar ( hvtermno -- char ) 1.1 root 23: PRIM(hv_X2d_getchar) 1.1.1.2 ! root 24: TOS.n = hv_getchar(TOS.n); 1.1 root 25: MIRP 26: 1.1.1.2 ! root 27: // : hv-haschar ( hvtermno -- res ) 1.1 root 28: PRIM(hv_X2d_haschar) 1.1.1.2 ! root 29: TOS.n = hv_haschar(TOS.n); 1.1 root 30: MIRP 31: 32: // : hv-reg-crq ( unit qaddr qsize -- res ) 33: PRIM(hv_X2d_reg_X2d_crq) 34: unsigned long qsize = TOS.u; POP; 35: unsigned long qaddr = TOS.u; POP; 36: unsigned int unit = TOS.u; 37: TOS.n = hv_reg_crq(unit, qaddr, qsize); 38: MIRP 39: 40: // : hv-free-crq ( unit -- ) 41: PRIM(hv_X2d_free_X2d_crq) 42: unsigned int unit = TOS.u; POP; 43: hv_free_crq(unit); 44: MIRP 45: 46: // : hv-send-crq ( unit msgaddr -- rc ) 47: PRIM(hv_X2d_send_X2d_crq) 48: uint64_t *msgaddr = (uint64_t *)TOS.u; POP; 49: unsigned int unit = TOS.u; 50: TOS.n = hv_send_crq(unit, msgaddr); 51: MIRP 1.1.1.2 ! root 52: ! 53: // : hv-put-tce ( liobn ioba tce -- rc ) ! 54: PRIM(hv_X2d_put_X2d_tce) ! 55: uint64_t tce = TOS.u; POP; ! 56: uint64_t ioba = TOS.u; POP; ! 57: uint32_t liobn = TOS.u; ! 58: TOS.u = hv_generic(H_PUT_TCE, liobn, ioba, tce); ! 59: MIRP ! 60: ! 61: PRIM(RB_X40) ! 62: unsigned long qaddr = TOS.u; ! 63: TOS.u = hv_logical_ci_load(1, qaddr); ! 64: MIRP ! 65: PRIM(RB_X21) ! 66: unsigned long qaddr = TOS.u; POP; ! 67: unsigned char val = TOS.u; POP; ! 68: hv_logical_ci_store(1, qaddr, val); ! 69: MIRP ! 70: PRIM(RW_X40) ! 71: unsigned long qaddr = TOS.u; ! 72: TOS.u = hv_logical_ci_load(2, qaddr); ! 73: MIRP ! 74: PRIM(RW_X21) ! 75: unsigned long qaddr = TOS.u; POP; ! 76: unsigned short val = TOS.u; POP; ! 77: hv_logical_ci_store(2, qaddr, val); ! 78: MIRP ! 79: PRIM(RL_X40) ! 80: unsigned long qaddr = TOS.u; ! 81: TOS.u = hv_logical_ci_load(4, qaddr); ! 82: MIRP ! 83: PRIM(RL_X21) ! 84: unsigned long qaddr = TOS.u; POP; ! 85: unsigned int val = TOS.u; POP; ! 86: hv_logical_ci_store(4, qaddr, val); ! 87: MIRP ! 88: PRIM(RX_X40) ! 89: unsigned long qaddr = TOS.u; ! 90: TOS.u = hv_logical_ci_load(8, qaddr); ! 91: MIRP ! 92: PRIM(RX_X21) ! 93: unsigned long qaddr = TOS.u; POP; ! 94: unsigned long val = TOS.u; POP; ! 95: hv_logical_ci_store(8, qaddr, val); ! 96: MIRP ! 97:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.