hrev56153 adds 2 changesets to branch 'master'
old head: 15253c90c3e8662bf4f4de38fb39f774f008397c
new head: 9a6815fbfa897d422b20c46f98ebf736f90c3ff4
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=9a6815fbfa89+%5E15253c90c3e8
----------------------------------------------------------------------------
b69a359e114e: freebsd_network: implement missing generic bus access functions.
Change-Id: I9ed7b0f4187d659df798eac1d01c4f0e1f978e73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5352
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
[ X512 <danger_mail@xxxxxxx> ]
9a6815fbfa89: freebsd_network: Adjust copyright headers in two files.
These were completely rewritten by me some years ago and contain nothing
from Hugo or Colin anymore.
Change-Id: I07f95b79c08f93b7630f73b6ff60634e3fc95599
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5353
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
3 files changed, 112 insertions(+), 6 deletions(-)
.../compat/freebsd_network/compat/machine/bus.h | 4 +-
.../freebsd_network/compat/machine/cpufunc.h | 4 +-
.../freebsd_network/compat/machine/generic/bus.h | 110 +++++++++++++++++++
############################################################################
Commit: b69a359e114e03037da4d13e3985bae4d19c3077
URL: https://git.haiku-os.org/haiku/commit/?id=b69a359e114e
Author: X512 <danger_mail@xxxxxxx>
Date: Fri Jun 3 17:36:34 2022 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Jun 3 17:39:59 2022 UTC
freebsd_network: implement missing generic bus access functions.
Change-Id: I9ed7b0f4187d659df798eac1d01c4f0e1f978e73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5352
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/compat/machine/generic/bus.h
b/src/libs/compat/freebsd_network/compat/machine/generic/bus.h
index abfcf13b8b..1980b5d4e5 100644
--- a/src/libs/compat/freebsd_network/compat/machine/generic/bus.h
+++ b/src/libs/compat/freebsd_network/compat/machine/generic/bus.h
@@ -103,6 +103,114 @@ bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t
bsh,
}
+static __inline void
+bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int8_t *addr, size_t count)
+{
+ for (; count > 0; offset += 1, addr++, count--)
+ *addr = bus_space_read_1(tag, bsh, offset);
+}
+
+
+static __inline void
+bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int16_t *addr, size_t count)
+{
+ for (; count > 0; offset += 2, addr++, count--)
+ *addr = bus_space_read_2(tag, bsh, offset);
+}
+
+
+static __inline void
+bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int32_t *addr, size_t count)
+{
+ for (; count > 0; offset += 4, addr++, count--)
+ *addr = bus_space_read_4(tag, bsh, offset);
+}
+
+
+static __inline void
+bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int8_t *addr, size_t count)
+{
+ for (; count > 0; addr++, count--)
+ bus_space_write_1(tag, bsh, offset, *addr);
+}
+
+
+static __inline void
+bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int16_t *addr, size_t count)
+{
+ for (; count > 0; addr++, count--)
+ bus_space_write_2(tag, bsh, offset, *addr);
+}
+
+
+static __inline void
+bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int32_t *addr, size_t count)
+{
+ for (; count > 0; addr++, count--)
+ bus_space_write_4(tag, bsh, offset, *addr);
+}
+
+
+static __inline void
+bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int8_t *addr, size_t count)
+{
+ for (; count > 0; offset += 1, addr++, count--)
+ bus_space_write_1(tag, bsh, offset, *addr);
+}
+
+
+static __inline void
+bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int16_t *addr, size_t count)
+{
+ for (; count > 0; offset += 2, addr++, count--)
+ bus_space_write_2(tag, bsh, offset, *addr);
+}
+
+
+static __inline void
+bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, const u_int32_t *addr, size_t count)
+{
+ for (; count > 0; offset += 4, addr++, count--)
+ bus_space_write_4(tag, bsh, offset, *addr);
+}
+
+
+static __inline void
+bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int8_t value, size_t count)
+{
+ for (; count > 0; count--)
+ bus_space_write_1(tag, bsh, offset, value);
+}
+
+
+static __inline void
+bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int16_t value, size_t count)
+{
+ for (; count > 0; count--)
+ bus_space_write_2(tag, bsh, offset, value);
+}
+
+
+static __inline void
+bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
+ bus_size_t offset, u_int32_t value, size_t count)
+{
+ for (; count > 0; count--)
+ bus_space_write_4(tag, bsh, offset, value);
+}
+
+
#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */
#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier
*/
@@ -115,6 +223,8 @@ bus_space_barrier(bus_space_tag_t tag __unused,
bus_space_handle_t bsh __unused,
}
+#include <machine/bus_dma.h>
+
/* Assume stream accesses are the same as normal accesses. */
#define bus_space_read_stream_1(t, h, o) bus_space_read_1((t),
(h), (o))
#define bus_space_read_stream_2(t, h, o) bus_space_read_2((t),
(h), (o))
############################################################################
Revision: hrev56153
Commit: 9a6815fbfa897d422b20c46f98ebf736f90c3ff4
URL: https://git.haiku-os.org/haiku/commit/?id=9a6815fbfa89
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Fri Jun 3 17:38:36 2022 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Jun 3 17:39:59 2022 UTC
freebsd_network: Adjust copyright headers in two files.
These were completely rewritten by me some years ago and contain nothing
from Hugo or Colin anymore.
Change-Id: I07f95b79c08f93b7630f73b6ff60634e3fc95599
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5353
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/libs/compat/freebsd_network/compat/machine/bus.h
b/src/libs/compat/freebsd_network/compat/machine/bus.h
index 231538ee69..b51501810a 100644
--- a/src/libs/compat/freebsd_network/compat/machine/bus.h
+++ b/src/libs/compat/freebsd_network/compat/machine/bus.h
@@ -1,7 +1,5 @@
/*
- * Copyright 2009, Colin Günther. All rights reserved.
- * Copyright 2007, Hugo Santos. All rights reserved.
- * Copyright 2018, Haiku, Inc. All rights reserved.
+ * Copyright 2018-2022, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*/
#ifndef _FBSD_COMPAT_MACHINE_BUS_H_
diff --git a/src/libs/compat/freebsd_network/compat/machine/cpufunc.h
b/src/libs/compat/freebsd_network/compat/machine/cpufunc.h
index 9d77ac94f0..49d6abc80a 100644
--- a/src/libs/compat/freebsd_network/compat/machine/cpufunc.h
+++ b/src/libs/compat/freebsd_network/compat/machine/cpufunc.h
@@ -1,7 +1,5 @@
/*
- * Copyright 2009, Colin Günther. All rights reserved.
- * Copyright 2007, Hugo Santos. All rights reserved.
- * Copyright 2018, Haiku, Inc. All rights reserved.
+ * Copyright 2018-2022, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*/
#ifndef _FBSD_COMPAT_MACHINE_CPUFUNC_H_