@@ -15,6 +15,7 @@ This package is only used for documentation purposes, applications need to defin
1515[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/usbarmory/tamago/doc.svg )] ( https://pkg.go.dev/github.com/usbarmory/tamago/doc )
1616
1717- [ Variables] ( < #variables > )
18+ - [ func CPUInit\(\) ] ( < #CPUInit > )
1819- [ func GetRandomData\( b \[\] byte\) ] ( < #GetRandomData > )
1920- [ func Hwinit0\(\) ] ( < #Hwinit0 > )
2021- [ func Hwinit1\(\) ] ( < #Hwinit1 > )
@@ -96,7 +97,7 @@ var RamStart uint
9697For an example see package [ vnet] ( < https://github.com/usbarmory/virtio-net/blob/main/runtime.go > ) .
9798
9899``` go
99- var SocketFunc func (ctx context .Context , net string , family , sotype int , laddr , raddr net .Addr ) (interface {} , error )
100+ var SocketFunc func (ctx context .Context , net string , family , sotype int , laddr , raddr net .Addr ) (any , error )
100101```
101102
102103<a name="Task"></a>Task describes the optional [runtime.Task](<https:// pkg.go.dev/runtime/#Task>) function, which can be set to provide an implementation for HW/OS threading \(see \`runtime.newosproc\`\).
@@ -109,8 +110,25 @@ For an example see package [amd64 SMP initialization](<https://github.com/usbarm
109110var Task func(sp, mp, gp, fn unsafe.Pointer)
110111```
111112
113+ <a name="CPUInit"></a>
114+ ## func [CPUInit](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L51>)
115+
116+ ```go
117+ func CPUInit()
118+ ```
119+
120+ CPUInit, which must be linked as \`cpuinit\`¹ handles immediate startup CPU initialization as it represents the first instruction set executed.
121+
122+ It must be defined using Go's Assembler.
123+
124+ For an example see package [arm64 CPU initialization](<https:// github.com/usbarmory/tamago/blob/master/arm64/init.s>).
125+
126+ ```
127+ ¹ TEXT cpuinit(SB),NOSPLIT|NOFRAME,$0
128+ ```
129+
112130<a name="GetRandomData"></a>
113- ## func [GetRandomData](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L112 >)
131+ ## func [GetRandomData](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L119 >)
114132
115133```go
116134func GetRandomData(b []byte)
@@ -125,7 +143,7 @@ For an example see package [amd64 random number generation](<https://github.com/
125143```
126144
127145<a name="Hwinit0"></a>
128- ## func [Hwinit0](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L60 >)
146+ ## func [Hwinit0](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L67 >)
129147
130148```go
131149func Hwinit0()
@@ -142,7 +160,7 @@ For an example see package [arm initialization](<https://github.com/usbarmory/ta
142160```
143161
144162<a name="Hwinit1"></a>
145- ## func [Hwinit1](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L72 >)
163+ ## func [Hwinit1](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L79 >)
146164
147165```go
148166func Hwinit1()
@@ -157,7 +175,7 @@ For an example see package [microvm platform initialization](<https://github.com
157175```
158176
159177<a name="InitRNG"></a>
160- ## func [InitRNG](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L100 >)
178+ ## func [InitRNG](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L107 >)
161179
162180```go
163181func InitRNG()
@@ -172,7 +190,7 @@ For an example see package [amd64 randon number generation](<https://github.com/
172190```
173191
174192<a name="Nanotime"></a>
175- ## func [Nanotime](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L128 >)
193+ ## func [Nanotime](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L135 >)
176194
177195```go
178196func Nanotime() int64
@@ -189,7 +207,7 @@ For an example see package [fu540 initialization](<https://github.com/usbarmory/
189207```
190208
191209<a name="Printk"></a>
192- ## func [Printk](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L88 >)
210+ ## func [Printk](<https:// github.com/usbarmory/tamago/blob/master/doc/api_doc_stub.go#L95 >)
193211
194212```go
195213func Printk(c byte)
0 commit comments