shpc.c (e0cbcf1eea16e81f116560130a1b36da711fb102) shpc.c (9323e79f10e5f5d8fffc3b307776173ca11faeae)
1#include "qemu/osdep.h"
2#include "qapi/error.h"
3#include "qemu/host-utils.h"
4#include "qemu/range.h"
5#include "qemu/error-report.h"
6#include "hw/pci/shpc.h"
7#include "migration/qemu-file-types.h"
8#include "hw/pci/pci.h"

--- 442 unchanged lines hidden (view full) ---

451 return config_offset;
452 }
453 config = d->config + config_offset;
454
455 pci_set_byte(config + SHPC_CAP_DWORD_SELECT, 0);
456 pci_set_byte(config + SHPC_CAP_CxP, 0);
457 pci_set_long(config + SHPC_CAP_DWORD_DATA, 0);
458 d->shpc->cap = config_offset;
1#include "qemu/osdep.h"
2#include "qapi/error.h"
3#include "qemu/host-utils.h"
4#include "qemu/range.h"
5#include "qemu/error-report.h"
6#include "hw/pci/shpc.h"
7#include "migration/qemu-file-types.h"
8#include "hw/pci/pci.h"

--- 442 unchanged lines hidden (view full) ---

451 return config_offset;
452 }
453 config = d->config + config_offset;
454
455 pci_set_byte(config + SHPC_CAP_DWORD_SELECT, 0);
456 pci_set_byte(config + SHPC_CAP_CxP, 0);
457 pci_set_long(config + SHPC_CAP_DWORD_DATA, 0);
458 d->shpc->cap = config_offset;
459 /* Make dword select and data writeable. */
459 /* Make dword select and data writable. */
460 pci_set_byte(d->wmask + config_offset + SHPC_CAP_DWORD_SELECT, 0xff);
461 pci_set_long(d->wmask + config_offset + SHPC_CAP_DWORD_DATA, 0xffffffff);
462 return 0;
463}
464
465static uint64_t shpc_mmio_read(void *opaque, hwaddr addr,
466 unsigned size)
467{

--- 261 unchanged lines hidden ---
460 pci_set_byte(d->wmask + config_offset + SHPC_CAP_DWORD_SELECT, 0xff);
461 pci_set_long(d->wmask + config_offset + SHPC_CAP_DWORD_DATA, 0xffffffff);
462 return 0;
463}
464
465static uint64_t shpc_mmio_read(void *opaque, hwaddr addr,
466 unsigned size)
467{

--- 261 unchanged lines hidden ---