mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-14 08:29:32 +00:00
9c2eafce6f
* runtime: split baremetal memory setup * runtime: extract Windows PE globals scan helper * compileopts,builder: add target linker flavor override * machine,runtime,targets: add minimal uefi-amd64 target * runtime,examples: add clean UEFI exit path test * machine,x86: fix amd64 ABI stack handling * machine/uefi: add CHAR16 conversion helpers * machine/uefi: add loaded image protocol support * runtime: add UEFI PE globals support * machine,runtime,x86: add UEFI time and text output support * machine,runtime,x86: add UEFI text and time support * machine,runtime,examples: add UEFI text input support * machine,examples: add UEFI graphics output support * add rest of STOP methods (direct UEFI ABI only) * runtime: fix UEFI sleep tick conversion * machine/uefi: make text input waits cooperative * address TestClangAttributes/uefi-amd64 failure * address TestConfigLinkerFlavor bug * uefi: move raw bindings to device package * strip down implementation to bare minimum * amd64: rename x86 package * do git restore upstream/dev for src/net * add smoketest for uefi-amd64; add required zeroSizeAllocPtr constant * address PR issues: remove unused files; make putchar() insert '\r' before '\n' * swap lines around
36 lines
821 B
Go
36 lines
821 B
Go
//go:build baremetal && !uefi
|
|
|
|
package runtime
|
|
|
|
import "unsafe"
|
|
|
|
//go:extern _heap_start
|
|
var heapStartSymbol [0]byte
|
|
|
|
//go:extern _heap_end
|
|
var heapEndSymbol [0]byte
|
|
|
|
//go:extern _globals_start
|
|
var globalsStartSymbol [0]byte
|
|
|
|
//go:extern _globals_end
|
|
var globalsEndSymbol [0]byte
|
|
|
|
//go:extern _stack_top
|
|
var stackTopSymbol [0]byte
|
|
|
|
var (
|
|
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
|
heapEnd = uintptr(unsafe.Pointer(&heapEndSymbol))
|
|
globalsStart = uintptr(unsafe.Pointer(&globalsStartSymbol))
|
|
globalsEnd = uintptr(unsafe.Pointer(&globalsEndSymbol))
|
|
stackTop = uintptr(unsafe.Pointer(&stackTopSymbol))
|
|
)
|
|
|
|
// growHeap tries to grow the heap size. It returns true if it succeeds, false
|
|
// otherwise.
|
|
func growHeap() bool {
|
|
// On baremetal, there is no way the heap can be grown.
|
|
return false
|
|
}
|