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.
  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值