@@ -10,6 +10,7 @@ import (
1010 "net"
1111 "os"
1212 "path/filepath"
13+ "runtime"
1314 "strings"
1415
1516 "github.com/Microsoft/go-winio"
@@ -152,6 +153,11 @@ func defaultLCOWOSBootFilesPath() string {
152153func NewDefaultOptionsLCOW (id , owner string ) * OptionsLCOW {
153154 // Use KernelDirect boot by default on all builds that support it.
154155 kernelDirectSupported := osversion .Build () >= 18286
156+ var vPmemCount uint32 = DefaultVPMEMCount
157+ if runtime .GOARCH == "arm64" {
158+ kernelDirectSupported = false
159+ vPmemCount = 0
160+ }
155161 opts := & OptionsLCOW {
156162 Options : newDefaultOptions (id , owner ),
157163 KernelFile : KernelFile ,
@@ -163,7 +169,7 @@ func NewDefaultOptionsLCOW(id, owner string) *OptionsLCOW {
163169 ForwardStdout : false ,
164170 ForwardStderr : true ,
165171 OutputHandlerCreator : parseLogrus ,
166- VPMemDeviceCount : DefaultVPMEMCount ,
172+ VPMemDeviceCount : vPmemCount ,
167173 VPMemSizeBytes : DefaultVPMemSizeBytes ,
168174 VPMemNoMultiMapping : osversion .Get ().Build < osversion .V19H1 ,
169175 PreferredRootFSType : PreferredRootFSTypeInitRd ,
@@ -180,7 +186,6 @@ func NewDefaultOptionsLCOW(id, owner string) *OptionsLCOW {
180186 }
181187
182188 opts .UpdateBootFilesPath (context .TODO (), defaultLCOWOSBootFilesPath ())
183-
184189 return opts
185190}
186191
@@ -807,14 +812,20 @@ func makeLCOWDoc(ctx context.Context, opts *OptionsLCOW, uvm *UtilityVM) (_ *hcs
807812 vmDebugging := false
808813 if opts .ConsolePipe != "" {
809814 vmDebugging = true
810- kernelArgs += " 8250_core.nr_uarts=1 8250_core.skip_txen_test=1 console=ttyS0,115200"
815+ if runtime .GOARCH == "arm64" {
816+ kernelArgs += " console=ttyAMA0,115200"
817+ } else {
818+ kernelArgs += " 8250_core.nr_uarts=1 8250_core.skip_txen_test=1 console=ttyS0,115200"
819+ }
811820 doc .VirtualMachine .Devices .ComPorts = map [string ]hcsschema.ComPort {
812821 "0" : { // Which is actually COM1
813822 NamedPipe : opts .ConsolePipe ,
814823 },
815824 }
816825 } else {
817- kernelArgs += " 8250_core.nr_uarts=0"
826+ if runtime .GOARCH != "arm64" {
827+ kernelArgs += " 8250_core.nr_uarts=0"
828+ }
818829 }
819830
820831 if opts .EnableGraphicsConsole {
@@ -835,7 +846,7 @@ func makeLCOWDoc(ctx context.Context, opts *OptionsLCOW, uvm *UtilityVM) (_ *hcs
835846 kernelArgs += " " + opts .KernelBootOptions
836847 }
837848
838- if ! opts .VPCIEnabled {
849+ if runtime . GOARCH != "arm64" && ! opts .VPCIEnabled {
839850 kernelArgs += ` pci=off`
840851 }
841852
0 commit comments