Displaying 20 results from an estimated 88 matches for "readb".
Did you mean:
read
2004 Jul 27
3
[PATCH 0/10] NTLM patchset submission
Hello all,
as I promised some days ago here is NTLM (aka SPA, aka MSN) authentication
support patchset.
It contains common code in src/lib-ntlm directory, Samba compatible
NTLM password scheme and authentication mechanism itself.
All patches are against 1.0-test30.
Please take a look.
Best regards.
--
Andrey Panin | Linux and UNIX system administrator
pazke at donpac.ru | PGP key:
2013 May 24
0
Re: [Qemu-devel] use O_DIRECT to open disk images for IDE failed under xen-4.1.2 and qemu upstream
...; On Thu, 23 May 2013, Gonglei (Arei) wrote:
> > > Hi, all
> > >
> > > I use O_DIRECT to open disk images for IDE, but I'm failed. After debug, I get
> > the below logs:
> > > [2013-05-22 23:25:46] ide: CMD=c8
> > > [2013-05-22 23:25:46] bmdma: readb 0x00 : 0x08
> > > [2013-05-22 23:25:46] bmdma: writeb 0x00 : 0x09
> > > [2013-05-22 23:25:46] bmdma_cmd_writeb: 0x00000009
> > > [2013-05-22 23:25:46] bmdma: readb 0x02 : 0x01
> > > [2013-05-22 23:25:46] bmdma: readb 0x02 : 0x01
> > > [2013-05-22 23:25:4...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...tio_device *vdev, unsigned offset,
void *buf, unsigned len)
{
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
- u8 *ptr = buf;
- int i;
+ void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG;
+ u8 b;
+ __le16 w;
+ __le32 l;
- for (i = 0; i < len; i++)
- ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i);
+ if (vm_dev->version == 1) {
+ u8 *ptr = buf;
+ int i;
+
+ for (i = 0; i < len; i++)
+ ptr[i] = readb(base + offset + i);
+ return;
+ }
+
+ switch (len) {
+ case 1:
+ b = readb(base + offset);
+ memcpy(buf, &b, sizeof b);
+ bre...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...tio_device *vdev, unsigned offset,
void *buf, unsigned len)
{
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
- u8 *ptr = buf;
- int i;
+ void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG;
+ u8 b;
+ __le16 w;
+ __le32 l;
- for (i = 0; i < len; i++)
- ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i);
+ if (vm_dev->version == 1) {
+ u8 *ptr = buf;
+ int i;
+
+ for (i = 0; i < len; i++)
+ ptr[i] = readb(base + offset + i);
+ return;
+ }
+
+ switch (len) {
+ case 1:
+ b = readb(base + offset);
+ memcpy(buf, &b, sizeof b);
+ bre...
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
Subject: [PATCH] virtio_mmio: fix access width for mmio
Going over the virtio mmio code, I noticed that it doesn't correctly
access modern device config values using "natural" accessors: it uses
readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
4.2.2.2 Driver Requirements: MMIO Device Register Layout
...
The driver MUST only use 32 bit wide and aligned reads and writes to
access the control registers described in table 4.1....
2015 Mar 12
1
[PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio
Subject: [PATCH] virtio_mmio: fix access width for mmio
Going over the virtio mmio code, I noticed that it doesn't correctly
access modern device config values using "natural" accessors: it uses
readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
4.2.2.2 Driver Requirements: MMIO Device Register Layout
...
The driver MUST only use 32 bit wide and aligned reads and writes to
access the control registers described in table 4.1....
2018 Dec 20
2
[PATCH v2] drm/bochs: add edid present check
.../drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -89,6 +89,14 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
if (!bochs->mmio)
return -1;
+ /*
+ * Check first two EDID blob header bytes to figure whenever
+ * edid support is enabled in qemu.
+ */
+ if (readb(bochs->mmio + 0) != 0x00 ||
+ readb(bochs->mmio + 1) != 0xff)
+ return -1;
+
kfree(bochs->edid);
bochs->edid = drm_do_get_edid(&bochs->connector,
bochs_get_edid_block, bochs);
--
2.9.3
2018 Dec 20
2
[PATCH v2] drm/bochs: add edid present check
.../drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -89,6 +89,14 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
if (!bochs->mmio)
return -1;
+ /*
+ * Check first two EDID blob header bytes to figure whenever
+ * edid support is enabled in qemu.
+ */
+ if (readb(bochs->mmio + 0) != 0x00 ||
+ readb(bochs->mmio + 1) != 0xff)
+ return -1;
+
kfree(bochs->edid);
bochs->edid = drm_do_get_edid(&bochs->connector,
bochs_get_edid_block, bochs);
--
2.9.3
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...bit wide and aligned accesses for
32 and 64 bit wide fields.
Here's a better commit log:
--->
virtio_mmio: fix access width for mmio
Going over the virtio mmio code, I noticed that it doesn't correctly
access modern device config values using "natural" accessors: it uses
readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
4.2.2.2 Driver Requirements: MMIO Device Register Layout
...
The driver MUST only use 32 bit wide and aligned reads and writes to
access the control registers described in table 4.1.
For the device-specific configura...
2015 Mar 12
2
[PATCH] virtio_mmio: fix endian-ness for mmio
...bit wide and aligned accesses for
32 and 64 bit wide fields.
Here's a better commit log:
--->
virtio_mmio: fix access width for mmio
Going over the virtio mmio code, I noticed that it doesn't correctly
access modern device config values using "natural" accessors: it uses
readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
4.2.2.2 Driver Requirements: MMIO Device Register Layout
...
The driver MUST only use 32 bit wide and aligned reads and writes to
access the control registers described in table 4.1.
For the device-specific configura...
2018 Oct 05
0
[PATCH v2] drm/bochs: add edid support.
...id bochs_hw_set_little_endian(struct bochs_device *bochs)
#define bochs_hw_set_native_endian(_b) bochs_hw_set_little_endian(_b)
#endif
+static int bochs_load_edid(struct bochs_device *bochs)
+{
+ uint8_t *blob;
+ size_t i, len;
+ uint8_t num_exts;
+
+ if (!bochs->mmio)
+ return -1;
+
+ if ((readb(bochs->mmio+0) != 0x00 ||
+ readb(bochs->mmio+1) != 0xff))
+ return -1;
+
+ num_exts = readb(bochs->mmio + 126);
+ len = EDID_LENGTH * (1 + num_exts);
+ if (len > 0x400 /* vga register offset */)
+ return -1;
+
+ kfree(bochs->edid);
+ bochs->edid = kmalloc(len, GFP_KERNEL);...
2018 Oct 02
0
[PATCH v2 2/2] drm/bochs: add edid support.
...b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -47,6 +47,41 @@ static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val)
}
}
+static int bochs_load_edid(struct bochs_device *bochs)
+{
+ uint8_t *blob;
+ size_t i, len;
+ uint8_t num_exts;
+
+ if (!bochs->mmio)
+ return -1;
+
+ if ((readb(bochs->mmio+0) != 0x00 ||
+ readb(bochs->mmio+1) != 0xff))
+ return -1;
+
+ num_exts = readb(bochs->mmio + 126);
+ len = EDID_LENGTH * (1 + num_exts);
+ if (len > 0x400 /* vga register offset */)
+ return -1;
+
+ kfree(bochs->edid);
+ bochs->edid = kmalloc(len, GFP_KERNEL);...
2018 Oct 02
0
[PATCH v3 2/2] drm/bochs: add edid support.
...b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -47,6 +47,41 @@ static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val)
}
}
+static int bochs_load_edid(struct bochs_device *bochs)
+{
+ uint8_t *blob;
+ size_t i, len;
+ uint8_t num_exts;
+
+ if (!bochs->mmio)
+ return -1;
+
+ if ((readb(bochs->mmio+0) != 0x00 ||
+ readb(bochs->mmio+1) != 0xff))
+ return -1;
+
+ num_exts = readb(bochs->mmio + 126);
+ len = EDID_LENGTH * (1 + num_exts);
+ if (len > 0x400 /* vga register offset */)
+ return -1;
+
+ kfree(bochs->edid);
+ bochs->edid = kmalloc(len, GFP_KERNEL);...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...ks,
Rusty.
>
>
> Here's a better commit log:
>
> --->
>
> virtio_mmio: fix access width for mmio
>
> Going over the virtio mmio code, I noticed that it doesn't correctly
> access modern device config values using "natural" accessors: it uses
> readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
>
> 4.2.2.2 Driver Requirements: MMIO Device Register Layout
>
> ...
>
> The driver MUST only use 32 bit wide and aligned reads and writes to
> access the control registers described in table 4.1.
&g...
2015 Mar 13
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...ks,
Rusty.
>
>
> Here's a better commit log:
>
> --->
>
> virtio_mmio: fix access width for mmio
>
> Going over the virtio mmio code, I noticed that it doesn't correctly
> access modern device config values using "natural" accessors: it uses
> readb to get/set them byte by byte, while the virtio 1.0 spec explicitly states:
>
> 4.2.2.2 Driver Requirements: MMIO Device Register Layout
>
> ...
>
> The driver MUST only use 32 bit wide and aligned reads and writes to
> access the control registers described in table 4.1.
&g...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...igned len)
> {
> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
> - u8 *ptr = buf;
> - int i;
> + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG;
> + u8 b;
> + __le16 w;
> + __le32 l;
>
> - for (i = 0; i < len; i++)
> - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i);
> + if (vm_dev->version == 1) {
> + u8 *ptr = buf;
> + int i;
> +
> + for (i = 0; i < len; i++)
> + ptr[i] = readb(base + offset + i);
> + return;
> + }
> +
> + switch (len) {
> + case 1:
> + b = re...
2015 Mar 12
0
[PATCH] virtio_mmio: fix endian-ness for mmio
...igned len)
> {
> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
> - u8 *ptr = buf;
> - int i;
> + void __iomem *base = vm_dev->base + VIRTIO_MMIO_CONFIG;
> + u8 b;
> + __le16 w;
> + __le32 l;
>
> - for (i = 0; i < len; i++)
> - ptr[i] = readb(vm_dev->base + VIRTIO_MMIO_CONFIG + offset + i);
> + if (vm_dev->version == 1) {
> + u8 *ptr = buf;
> + int i;
> +
> + for (i = 0; i < len; i++)
> + ptr[i] = readb(base + offset + i);
> + return;
> + }
> +
> + switch (len) {
> + case 1:
> + b = re...
2018 Dec 18
0
[PATCH] drm/bochs: add edid present check
...a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index c90a0d492f..f91e049625 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -89,6 +89,10 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
if (!bochs->mmio)
return -1;
+ if (readb(bochs->mmio + 0) != 0x00 ||
+ readb(bochs->mmio + 1) != 0xff)
+ return -1;
+
kfree(bochs->edid);
bochs->edid = drm_do_get_edid(&bochs->connector,
bochs_get_edid_block, bochs);
--
2.9.3
2018 Dec 19
0
[PATCH] drm/bochs: add edid present check
...ve a comment here explaining the magic below
> (just like in the commit message to ease the task of understanding
> while reading the code why 2 of 8 bytes of the EDID header is checked
> and why it is all needed). Of course one can use git blame... Up to you
Makes sense.
> > + if (readb(bochs->mmio + 0) != 0x00 ||
> > + readb(bochs->mmio + 1) != 0xff)
>
> bochs->mmio is defined as "void __iomem?? *mmio;". Can we please avoid
> void pointer arithmetic here?
Why is that a problem? gcc uses bytes when doing pointer arithmetic
with void pointer...
2018 Dec 20
0
[PATCH v2] drm/bochs: add edid present check
...rs/gpu/drm/bochs/bochs_hw.c
> @@ -89,6 +89,14 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
> if (!bochs->mmio)
> return -1;
>
> + /*
> + * Check first two EDID blob header bytes to figure whenever
> + * edid support is enabled in qemu.
> + */
> + if (readb(bochs->mmio + 0) != 0x00 ||
> + readb(bochs->mmio + 1) != 0xff)
> + return -1;
> +
> kfree(bochs->edid);
> bochs->edid = drm_do_get_edid(&bochs->connector,
> bochs_get_edid_block, bochs);
> --
> 2.9.3
>
> _______________________...