search for: uint16_t

Displaying 20 results from an estimated 1143 matches for "uint16_t".

2009 Dec 15
2
[PATCH 1/2] drm/nouveau: Kill global state in NvShadowBIOS
--- drivers/gpu/drm/nouveau/nouveau_bios.c | 47 ++++++++++++++----------------- 1 files changed, 21 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 5eec5ed..04ac564 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -181,43 +181,42 @@ struct methods { const char
2011 Jan 07
1
[LLVMdev] [PATCH] compiler-rt patch for clean build on Solaris 10 / x86
...i2.c.o In file included from /home/jocke/llvm/clean/compiler-rt/lib/absvdi2.c:15: In file included from /home/jocke/llvm/clean/compiler-rt/lib/int_lib.h:23: In file included from /home/jocke/llvm/clean/compiler-rt/lib/endianness.h:25: /usr/include/sys/byteorder.h:60:9: error: unknown type name 'uint16_t' typedef uint16_t in_port_t; ^ /usr/include/sys/byteorder.h:65:9: error: unknown type name 'uint32_t' typedef uint32_t in_addr_t; ^ /usr/include/sys/byteorder.h:69:8: error: unknown type name 'uint32_t' extern uint32_t htonl(uint32_t); ^ /usr/include/sys...
2006 Aug 11
0
[PATCH] [4/5] SMBIOS -- generate SMBIOS tables
...on, uint32_t xen_minor_version); + +static void +get_cpu_manufacturer(char *buf, int len); +static size_t +smbios_table_size(uint32_t vcpus, const char *xen_version, + const char *processor_manufacturer); +static void * +smbios_entry_point_init(void *start, + uint16_t max_structure_size, + uint16_t structure_table_length, + uint32_t structure_table_address, + uint16_t number_of_structures); +static void * +smbios_type_0_init(void *start, const char *xen_version, + uint32_t xen...
2015 Aug 21
2
[PATCH 1/2] msg: VGAFilePtr should be char
...39;) { - if ((char *)VGAFilePtr < (VGAFileBuf + sizeof(VGAFileBuf))) + if (VGAFilePtr < (VGAFileBuf + sizeof(VGAFileBuf))) *VGAFilePtr++ = data; } } @@ -163,7 +163,7 @@ static void msg_filename(uint8_t data) static void msg_vga(void) { NextCharJump = msg_filename; - VGAFilePtr = (uint16_t *)VGAFileBuf; + VGAFilePtr = VGAFileBuf; } static void msg_normal(uint8_t data) diff --git a/core/graphics.c b/core/graphics.c index 834372f..1604ab4 100644 --- a/core/graphics.c +++ b/core/graphics.c @@ -27,9 +27,9 @@ __export uint8_t UsingVGA = 0; uint16_t VGAPos; /* Pointer into VGA mem...
2018 Apr 03
2
[RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device
On Sun, Apr 01, 2018 at 05:13:08AM -0400, Si-Wei Liu wrote: > @@ -896,6 +898,68 @@ void qmp_device_del(const char *id, Error **errp) > } > } > > +int pci_get_busdevfn_by_id(const char *id, uint16_t *busnr, > + uint16_t *devfn, Error **errp) > +{ > + uint16_t busnum = 0, slot = 0, func = 0; > + const char *pc, *pd, *pe; > + Error *local_err = NULL; > + ObjectClass *class; > + char value[1024]; > + BusState *bus; > + uint...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...r is written before we update index. */ + wmb(); + vq->vring.used->idx++; +} + +int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem) +{ + unsigned int i, head; + unsigned int position; + + /* Check it isn't doing very strange things with descriptor numbers. */ + if ((uint16_t)(vq->vring.avail->idx - vq->last_avail_idx) > vq->vring.num) + errx(1, "Guest moved used index from %u to %u", + vq->last_avail_idx, vq->vring.avail->idx); + + /* If there's nothing new since last we looked, return invalid. */ + if (vq->vri...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...r is written before we update index. */ + wmb(); + vq->vring.used->idx++; +} + +int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem) +{ + unsigned int i, head; + unsigned int position; + + /* Check it isn't doing very strange things with descriptor numbers. */ + if ((uint16_t)(vq->vring.avail->idx - vq->last_avail_idx) > vq->vring.num) + errx(1, "Guest moved used index from %u to %u", + vq->last_avail_idx, vq->vring.avail->idx); + + /* If there's nothing new since last we looked, return invalid. */ + if (vq->vri...
2019 Sep 24
0
[PATCH nbdkit 3/4] common/protocol: Update nbd-protocol.h so it matches libnbd’s copy.
...um length of a string field */ + /* Old-style handshake. */ -struct old_handshake { +struct nbd_old_handshake { char nbdmagic[8]; /* "NBDMAGIC" */ - uint64_t version; /* OLD_VERSION */ + uint64_t version; /* NBD_OLD_VERSION */ uint64_t exportsize; uint16_t gflags; /* global flags */ uint16_t eflags; /* per-export flags */ char zeroes[124]; /* must be sent as zero bytes */ } __attribute__((packed)); -#define OLD_VERSION UINT64_C(0x420281861253) +#define NBD_OLD_VERSION UINT64_C(0x420281861253) /* New-style h...
2013 Jul 24
4
[PATCH 2/3] V5 qemu-xen-trad: Correctly expose PCH ISA bridge for IGD passthrough
...| 10 ++++++++++ hw/pci.h | 3 +++ hw/pt-graphics.c | 9 ++++++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index f051de1..c423285 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -938,6 +938,16 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, return s->bus; } +PCIBus *pci_isa_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, + uint8_t rid, pci_map_irq_fn map_irq, const char *name) +{ + PCIBus *s = pci_bridge_init(bus, devfn, vid, did, rid, map_irq, name); + + pc...
2008 Sep 27
0
[PATCH 8/9] qemu: enable HMV guest SR-IOV support
...dev *ptdev, @@ -90,6 +94,9 @@ static int pt_word_reg_read(struct pt_dev *ptdev, static int pt_long_reg_read(struct pt_dev *ptdev, struct pt_reg_tbl *cfg_entry, uint32_t *value, uint32_t valid_mask); +static int pt_cmd_reg_read(struct pt_dev *ptdev, + struct pt_reg_tbl *cfg_entry, + uint16_t *value, uint16_t valid_mask); static int pt_bar_reg_read(struct pt_dev *ptdev, struct pt_reg_tbl *cfg_entry, uint32_t *value, uint32_t valid_mask); @@ -151,6 +158,28 @@ static int pt_msixctrl_reg_write(struct pt_dev *ptdev, /* Header Type0 reg static infomation table */ static struct...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...>irq_index = pci_irq_index++; bus->devices[devfn] = pci_dev; pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4); + pci_dev->cap.start = PCI_CAPABILITY_CONFIG_START_ADDR; return pci_dev; } @@ -1004,8 +1005,30 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, return s->bus; } +void pci_add_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t size) +{ + uint8_t offset = pdev->cap.start + pdev->cap.length; + uint8_t *config = pdev->config + offset; + config[PCI_CAP_LIST_ID] = cap_id; + config[PCI_CAP_LIST_...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...>irq_index = pci_irq_index++; bus->devices[devfn] = pci_dev; pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4); + pci_dev->cap.start = PCI_CAPABILITY_CONFIG_START_ADDR; return pci_dev; } @@ -1004,8 +1005,30 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, return s->bus; } +void pci_add_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t size) +{ + uint8_t offset = pdev->cap.start + pdev->cap.length; + uint8_t *config = pdev->config + offset; + config[PCI_CAP_LIST_ID] = cap_id; + config[PCI_CAP_LIST_...
2009 Jan 29
0
[PATCH v2] txt: 2/5 - ACPI Generic Address Structure for tboot shutdown
...p_vector_va = (uint64_t)bootsym_phys(wakeup_start); } } @@ -279,37 +273,47 @@ static int acpi_get_wake_status(void) static void tboot_sleep(u8 sleep_state) { - uint32_t shutdown_type; + uint32_t shutdown_type; - g_tboot_shared->acpi_sinfo.pm1a_cnt = - (uint16_t)acpi_sinfo.pm1a_cnt_blk.address; - g_tboot_shared->acpi_sinfo.pm1b_cnt = - (uint16_t)acpi_sinfo.pm1b_cnt_blk.address; - g_tboot_shared->acpi_sinfo.pm1a_evt = - (uint16_t)acpi_sinfo.pm1a_evt_blk.address; - g_tboot_shared->acpi_sinfo....
2014 Oct 30
3
Display graphic from filename broken?
...DISPLAY file (as documented in http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:) seems heavily broken since syslinux has been converted from assembler to C. I already discovered one bug in core/include/graphics.h (and core/graphics.c): the pointer VGAFilePtr is of type uint16_t*, but should be plain char*. This bug causes the file name to be assembled incorrectly in com32/elflink/ldlinux/msg.c (msg_filename(), line 160): there the pointer is autoincremented, and if it is a uint16_t*, then it will autoincrement by two bytes. Therefore there will be a null char every second...
2016 Mar 03
2
[cfe-dev] [3.8 Release] Please write release notes!
...ter is to a struct that represents that layout of a > serialized structure, consider making that struct packed; this will remove any > implicit internal padding that the compiler might add to the struct and > reduce its alignment requirement to 1. > > struct file_header { > uint16_t magic_number; > uint16_t format_version; > uint16_t num_entries; > } __attribute__((packed)); If we want to include this example, it is likely a good idea to point out that packed and aligned can be combined, i.e. if you know that the file_header copies are going to be at an ali...
2019 Sep 24
2
[PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
.../ +#if defined(__GNUC__) || defined(__clang__) +#define NBD_ATTRIBUTE_PACKED __attribute__((__packed__)) +#else +#define NBD_ATTRIBUTE_PACKED +#endif + #define NBD_MAX_STRING 4096 /* Maximum length of a string field */ /* Old-style handshake. */ @@ -55,7 +56,7 @@ struct nbd_old_handshake { uint16_t gflags; /* global flags */ uint16_t eflags; /* per-export flags */ char zeroes[124]; /* must be sent as zero bytes */ -} __attribute__((packed)); +} NBD_ATTRIBUTE_PACKED; #define NBD_OLD_VERSION UINT64_C(0x420281861253) @@ -64,7 +65,7 @@ struct nbd_new_han...
2019 Sep 24
0
[PATCH nbdkit 4/4] common/protocol: Install <nbd-protocol.h> as a public header.
.../ +#if defined(__GNUC__) || defined(__clang__) +#define NBD_ATTRIBUTE_PACKED __attribute__((__packed__)) +#else +#define NBD_ATTRIBUTE_PACKED +#endif + #define NBD_MAX_STRING 4096 /* Maximum length of a string field */ /* Old-style handshake. */ @@ -50,7 +56,7 @@ struct nbd_old_handshake { uint16_t gflags; /* global flags */ uint16_t eflags; /* per-export flags */ char zeroes[124]; /* must be sent as zero bytes */ -} __attribute__((packed)); +} NBD_ATTRIBUTE_PACKED; #define NBD_OLD_VERSION UINT64_C(0x420281861253) @@ -59,7 +65,7 @@ struct nbd_new_han...
2014 Oct 30
0
Display graphic from filename broken?
...umented in > http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:) > seems heavily broken since syslinux has been converted from assembler to > C. I already discovered one bug in core/include/graphics.h (and > core/graphics.c): the pointer VGAFilePtr is of type uint16_t*, but > should be plain char*. This bug causes the file name to be assembled > incorrectly in com32/elflink/ldlinux/msg.c (msg_filename(), line 160): > there the pointer is autoincremented, and if it is a uint16_t*, then it > will autoincrement by two bytes. Therefore there will be a nu...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static CPUWriteMemoryFunc *syborg_virtio_writefn[] = { syborg_virtio_writel }; -static void syborg_virtio_update_irq(void *opaque) +static void syborg_virtio_update_irq(void *opaque, uint16_t vector) { SyborgVirtIOProxy *proxy = opaque; int level; @@ -239,7 +242,7 @@ static void syborg_virtio_update_irq(void *opaque) } static VirtIOBindings syborg_virtio_bindings = { - .update_irq = syborg_virtio_update_irq + .notify = syborg_virtio_update_irq }; static void syb...
2009 Jun 18
0
[PATCHv5 09/13] qemu: virtio support for many interrupt vectors
...break; case SYBORG_VIRTIO_QUEUE_SEL: if (value < VIRTIO_PCI_QUEUE_MAX) @@ -228,7 +231,7 @@ static CPUWriteMemoryFunc *syborg_virtio_writefn[] = { syborg_virtio_writel }; -static void syborg_virtio_update_irq(void *opaque) +static void syborg_virtio_update_irq(void *opaque, uint16_t vector) { SyborgVirtIOProxy *proxy = opaque; int level; @@ -239,7 +242,7 @@ static void syborg_virtio_update_irq(void *opaque) } static VirtIOBindings syborg_virtio_bindings = { - .update_irq = syborg_virtio_update_irq + .notify = syborg_virtio_update_irq }; static void syb...