Пример #1
0
    planes=[
        Container(
            addr=0x013ec000,
            stride=u.ba.video.stride,
            addr_format=AddrFormat.PLANAR,
        ),
        Container(),
        Container()
    ],
    plane_cnt=1,
    width=u.ba.video.width,
    height=u.ba.video.height,
    surface_fmt=SurfaceFormat.w30r,
    colorspace=2,
    eotf=EOTF.GAMMA_SDR,
    transform=Transform.NONE,
)

mw = min(w, u.ba.video.width)
mh = min(h, u.ba.video.height)

swap = dcp.iboot.disp0.swapBegin()
print(swap)
dcp.iboot.disp0.swapSetLayer(0, layer, (mw, mh, 0, 0), (mw, mh, 0, 0))
dcp.iboot.disp0.swapEnd()
#dcp.iboot.disp0.swapWait(swap.swap_id)

run_shell(globals(), msg="Have fun!")

dcp.stop()
Пример #2
0
    hv.set_logfile(args.logfile.open("w"))

if len(args.boot_args) > 0:
    boot_args = " ".join(args.boot_args)
    hv.set_bootargs(boot_args)

symfile = None
if args.symbols:
    symfile = args.symbols.open("rb")
hv.load_macho(args.payload.open("rb"), symfile=symfile)

for i in args.script:
    try:
        hv.run_script(i)
    except:
        traceback.print_exc()
        args.shell = True

for i in args.command:
    try:
        hv.run_code(i)
    except:
        traceback.print_exc()
        args.shell = True

if args.shell:
    run_shell(hv.shell_locals,
              "Entering hypervisor shell. Type `start` to start the guest.")
else:
    hv.start()