|
|
1.1 ! root 1: \ ***************************************************************************** ! 2: \ * Copyright (c) 2004, 2008 IBM Corporation ! 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: \ ****************************************************************************/ ! 12: ! 13: ! 14: \ IPMI KCS interface to the BMC. ! 15: ! 16: new-device ! 17: ca8 1 set-unit ! 18: ! 19: : open true ; ! 20: : close ; ! 21: ! 22: create descr-buf 100 allot ! 23: ! 24: : rtas-get-bmc-version ( -- adr len ) ! 25: descr-buf 100 rtas-get-blade-descr ( len status ) ! 26: IF ! 27: drop 0 0 ! 28: ELSE ! 29: descr-buf 9 + swap 11 - ( adr len ) ! 30: THEN ! 31: ; ! 32: ! 33: ' rtas-get-bmc-version to bmc-version ! 34: ! 35: s" system-controller" 2dup device-name device-type ! 36: \ s" IBM,BMC." get-build-name $cat encode-string s" model" property ! 37: \ s" IBM,BMC.12345" encode-string s" model" property ! 38: s" IBM,BMC." bmc-version $cat encode-string s" model" property ! 39: 0 0 s" ranges" property ! 40: ! 41: new-device ! 42: ! 43: : open true ; ! 44: : close ; ! 45: ! 46: s" ipmi" 2dup device-name device-type ! 47: s" ipmi-kcs" compatible ! 48: ! 49: 1 encode-int ca8 encode-int+ 1 encode-int+ s" reg" property ! 50: 4 encode-int s" reg-spacing" property ! 51: s" IBM,BMC." bmc-version $cat encode-string s" model" property ! 52: ! 53: s" ipmi" get-node node>path set-alias ! 54: ! 55: finish-device ! 56: ! 57: finish-device
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.