...
...
\ for mac id on the fcode prom itself
h# 24 constant vpdp-loc
h# c000 value vpd-base
0 value cheer-rombase
0 value vpd-addr
h# 1.0000 value /cheer-rom
\ HappyMeal Enet Address Map
hex
000.0000 constant global-regs-offset
7020 constant /total-reg-space
h# 4000 constant max-frame-size ( d# 1536 for le )
d# 48 constant address-bits
h# 10 constant cfg-bar0
h# 4 constant cfg-cmd-reg
h# 30 constant cfg-rom-base
h# 200.0000 constant 32-bit-mem-ss
: encode-ints ( nn .. n1 n -- adr len )
0 0 encode-bytes rot 0 ?do rot encode-int encode+ loop
;
: xdrreg ( addr space size -- adr len )
>r encode-phys r> 0 2 encode-ints encode+
;
: offset>physical-addr ( offset -- paddr.lo paddr.mid paddr.hi )
my-bus-addr >r + r> my-bus-space
32-bit-mem-ss or cfg-bar0 or \ OR in "ss" = memory, base reg=10
;
: create-hme-attributes ( -- )
" SUNW,hme" name
" SUNW,cheerio" encode-string " model" property" SUNW,hme"
" pci108e,1001" encode-string " pciclass,-60000" encode-string
encode+ " compatible" proerty
|