1 \ *****************************************************************************
2 \ * Copyright (c) 2013 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
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
15 s" network" device-type
17 INSTANCE VARIABLE obp-tftp-package
18 get-node CONSTANT my-phandle
19 10 config-l@ translate-my-address 3 not AND CONSTANT baseaddr
28 e1k-open dup not IF ." e1k-open failed" EXIT THEN
37 my-args s" obp-tftp" $open-package obp-tftp-package !
38 open-count 1 + to open-count
45 open-count 1 - dup to open-count
51 s" close" obp-tftp-package @ $call-method
54 : read ( buf len -- actual )
62 : write ( buf len -- actual )
70 : load ( addr -- len )
71 s" load" obp-tftp-package @ $call-method
75 s" ping" obp-tftp-package @ $call-method
81 " vendor-id" get-node get-property IF EXIT THEN
83 " device-id" get-node get-property IF EXIT THEN
86 local-mac e1k-mac-setup IF
87 encode-bytes " local-mac-address" property
94 " net" get-next-alias ?dup IF
95 get-node node>path set-alias