Dump QEMU 所使用的 dtb 信息

qemu

一直疑惑 qemu 启动 Linux 时所传的 dtb 信息。最近找到了获取的方法,供参考。

我们可以让 qemu dump 相应的 dtb 信息,这里以 virt machine 使用 GICv2 开启虚拟化情况下所使用的 dtb 为例。之后通过 dtc 命令转换成 dts 文本。

$ qemu-system-aarch64 -machine virt,gic-version=2,virtualization=on,dumpdtb=dump.dtb
$ dtc -o dump.dts -O dts -I dtb dump.dtb

GIC

    ....
	intc@8000000 {
		phandle = <0x8001>;
		interrupts = <0x01 0x09 0x04>;
		reg = <0x00 0x8000000 0x00 0x10000 // GICD
			   0x00 0x8010000 0x00 0x10000 // GICC
			   0x00 0x8030000 0x00 0x10000 // GICH
			   0x00 0x8040000 0x00 0x10000>; // GICV
		compatible = "arm,cortex-a15-gic";
		ranges;
		#size-cells = <0x02>;
		#address-cells = <0x02>;
		interrupt-controller;
		#interrupt-cells = <0x03>;

		v2m@8020000 {
			phandle = <0x8002>;
			reg = <0x00 0x8020000 0x00 0x1000>;
			msi-controller;
			compatible = "arm,gic-v2m-frame";
		};
	};
    ...

reg : Specifies base physical address(s) and size of the GIC registers.

  • The first region is the GIC distributor register base and size.
  • The 2nd region is the GIC cpu interface register base and size.

开启虚拟化的场景下,GIC virtualization extensions (VGIC)。

reg : Additional regions specifying the base physical address and size of the VGIC registers.

  • The first additional region is the GIC virtual interface control register base and size.
  • The 2nd additional region is the GIC virtual cpu interface register base and size.

猜你喜欢

转载自blog.csdn.net/FJDJFKDJFKDJFKD/article/details/115547636