MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "SELF",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "3014": {
                "pageid": 3014,
                "ns": 0,
                "title": "Reproducible Build",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "coreboot itself is reproducible under certain requirements.\nBut some (or even all?) payloads are not reproducible.\n\n= Requirements =\n* same GCC/LLVM version (use coreboot's toolchain!)\n* same path of source code, because this is part of debug symbols\n\n== Payloads ==\n\n=== seabios ===\n* includes hostname\n* includes build timestamp\n**  discussed [http://www.seabios.org/pipermail/seabios/2015-February/008603.html]\n**  discussed [http://www.seabios.org/pipermail/seabios/2015-April/009026.html]\n\n=== other ===\nunknown."
                    }
                ]
            },
            "2571": {
                "pageid": 2571,
                "ns": 0,
                "title": "Reverse Engineering PCI Drivers",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "by Vikram Ambrose -- [[User:Vambrose|Vambrose]] 01:44, 22 February 2010 (UTC)\n\n==Getting traces==\nThis is a short guide demonstrating how I used the PCI Passthrough framework in KVM  to reverse engineer atiflash.exe \ufffd a video BIOS flashing tool for DOS.\n\natiflash.exe is a real dos application that flashes the video BIOS on ATi graphics cards. There are numerous ATi video BIOS flashing tools for Windows, but none for Linux as the code for doing this has not been made publicly available by AMD.\n\nThis technique allowed me to trace all PCI configuration space and memory mapped i/o (mmio) accesses to the PCI-E device from the closed source flashing tool.\n\nTools needed:\n* CPU with virtualisation support (eg, AMD-V, Intel VT-x, an IOMMU is not necessary)\n* Newer-the-better Linux kernel with KVM support\n* Special KVM branch of QEMU (git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git)\n* Guest operating system (I used FreeDOS from UBCD - http://www.ultimatebootcd.com/)\n* Secondary video card to boot Linux with while the Radeon is used in the virtual machine\n\nIn order to give the virtual machine direct pci access, the host operating system cannot register a driver for the device. In my case, this simply meant blacklisting the radeon and drm kernel modules.\n\nAll the tracing is done from QEMU. Using the special qemu-kvm branch mentioned above, go into qemu-kvm/hw/device-assignments.c and ensure:\n\n  #define DEVICE_ASSIGNMENT_DEBUG 1 \n\nThis will turn on logging for assigned_dev_pci_{read,write}_config() functions (Config space) and slow_bar_read{b,w,l} and slow_bar_write{b,w,l} functions (MMIO). You may also want to add d->e_physbase to the prints to get the physical assigned address.\n\nIn order to trace the write commands to the ROM space, you will need to write your own _write{b,w,l} functions. Eg:\n  static void slow_rom_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)\n  {\n      DEBUG(\" addr=0x\" TARGET_FMT_plx \" val=0x%02x\\n\", addr, val);\n  }\n  ...\n  static CPUWriteMemoryFunc * const slow_rom_write[] = {\n     &slow_rom_writeb,\n     &slow_rom_writew,\n     &slow_rom_writel\n  };\n\nThen register your function array in assigned_dev_iomem_map_slow(), Eg:\n  ...\n     if (region_num == PCI_ROM_SLOT)\n  -        m = cpu_register_io_memory(slow_bar_read, NULL, region);\n  +        m = cpu_register_io_memory(slow_bar_read, slow_rom_write, region);\n  ...\n\nNow modify assigned_dev_register_regions() to get QEMU to use the slow path otherwise KVM will let the guest write directly to the device.\n  ...\n        if (cur_region->type & IORESOURCE_MEM) {\n  -            int slow_map = 0;\n  +            int slow_map = 1;\n  ...\n\nYou can also get the Programmed I/O (PIO) by logging assigned_dev_ioport_{read,write)*(), but otherwise this should give you a good idea of what the flashing tool is doing.\n\n\nNow use lspci to get the location of the PCI device:\n  02:00.0 VGA compatible controller: ATI Technologies Inc RV770 [Radeon HD 4870]\n  02:00.1 Audio device: ATI Technologies Inc HD48x0 audio\n\nPass the device to qemu, along with your virtual machine disk image. Eg;\n\n  qemu-system-x86 -hda disk.img -cdrom ubcd411.iso -boot order=d -pcidevice host=02:00:0,dma=none\n\nRun the flashing tool from the VM and watch the traces appear on the console.\n\n==Decoding traces==\nHere are some traces from my trials (graciously decoded by Carl-D):\n* http://coreboot.pastebin.com/f73df946c\n* http://coreboot.pastebin.com/f3b85711d (complete decode with comments)\n* http://coreboot.pastebin.com/f6c21856e\n* http://coreboot.pastebin.com/YMYkrZGs (automated decode)\n\n==Notes==\nUseful links:\n* VGA Bios database - http://www.techpowerup.com/vgabios/\n* Chapter 12, PCI device drivers of \"Linux Device Drivers (3rd Edition)\" by J.Corbet et al, downloadable for free from - http://lwn.net/Kernel/LDD3/\n* If you would like to use the same technique on a native Linux application/driver, see the mmiotrace project - http://nouveau.freedesktop.org/wiki/MmioTrace \n\n\n''Special thanks go out to Carl-Daniel Hailfinger, Twice#11 and the entire KVM and QEMU team for making this possible.''"
                    }
                ]
            }
        }
    }
}