mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 03:48:05 +00:00
Merge pull request #7806 from jongwu/clh_serial
clh:arm64: use arm AMBA UART for hypervisor debug
This commit is contained in:
commit
dfa6af54df
@ -22,6 +22,7 @@ import (
|
|||||||
"os/user"
|
"os/user"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -271,6 +272,10 @@ var clhDebugKernelParams = []Param{
|
|||||||
{"console", "ttyS0,115200n8"}, // enable serial console
|
{"console", "ttyS0,115200n8"}, // enable serial console
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var clhArmDebugKernelParams = []Param{
|
||||||
|
{"console", "ttyAMA0,115200n8"}, // enable serial console
|
||||||
|
}
|
||||||
|
|
||||||
var clhDebugConfidentialGuestKernelParams = []Param{
|
var clhDebugConfidentialGuestKernelParams = []Param{
|
||||||
{"console", "hvc0"}, // enable HVC console
|
{"console", "hvc0"}, // enable HVC console
|
||||||
}
|
}
|
||||||
@ -527,6 +532,8 @@ func (clh *cloudHypervisor) CreateVM(ctx context.Context, id string, network Net
|
|||||||
if clh.config.Debug {
|
if clh.config.Debug {
|
||||||
if clh.config.ConfidentialGuest {
|
if clh.config.ConfidentialGuest {
|
||||||
params = append(params, clhDebugConfidentialGuestKernelParams...)
|
params = append(params, clhDebugConfidentialGuestKernelParams...)
|
||||||
|
} else if runtime.GOARCH == "arm64" {
|
||||||
|
params = append(params, clhArmDebugKernelParams...)
|
||||||
} else {
|
} else {
|
||||||
params = append(params, clhDebugKernelParams...)
|
params = append(params, clhDebugKernelParams...)
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
# This option is used for all 8250 compatible serial ports
|
# This option is used for all 8250 compatible serial ports
|
||||||
# that are probed through device tree.
|
# that are probed through device tree.
|
||||||
CONFIG_SERIAL_OF_PLATFORM=y
|
CONFIG_SERIAL_OF_PLATFORM=y
|
||||||
|
|
||||||
|
# Enable Arm AMBA UART
|
||||||
|
CONFIG_SERIAL_AMBA_PL011=y
|
||||||
|
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||||
|
@ -1 +1 @@
|
|||||||
115
|
116
|
||||||
|
Loading…
Reference in New Issue
Block a user