Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153610935
D22035.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D22035.diff
View Options
Index: head/sys/kern/subr_devmap.c
===================================================================
--- head/sys/kern/subr_devmap.c
+++ head/sys/kern/subr_devmap.c
@@ -46,7 +46,7 @@
* The allocated-kva (akva) devmap table and metadata. Platforms can call
* devmap_add_entry() to add static device mappings to this table using
* automatically allocated virtual addresses carved out of the top of kva space.
- * Allocation begins immediately below the ARM_VECTORS_HIGH address.
+ * Allocation begins immediately below the max kernel virtual address.
*/
#define AKVA_DEVMAP_MAX_ENTRIES 32
static struct devmap_entry akva_devmap_entries[AKVA_DEVMAP_MAX_ENTRIES];
@@ -115,8 +115,8 @@
* physical address and size and a virtual address allocated from the top of
* kva. This automatically registers the akva table on the first call, so all a
* platform has to do is call this routine to install as many mappings as it
- * needs and when initarm() calls devmap_bootstrap() it will pick up all the
- * entries in the akva table automatically.
+ * needs and when the platform-specific init function calls devmap_bootstrap()
+ * it will pick up all the entries in the akva table automatically.
*/
void
devmap_add_entry(vm_paddr_t pa, vm_size_t sz)
@@ -132,13 +132,13 @@
if (akva_devmap_idx == 0)
devmap_register_table(akva_devmap_entries);
+ /* Allocate virtual address space from the top of kva downwards. */
+#ifdef __arm__
/*
- * Allocate virtual address space from the top of kva downwards. If the
- * range being mapped is aligned and sized to 1MB boundaries then also
- * align the virtual address to the next-lower 1MB boundary so that we
- * end up with a nice efficient section mapping.
+ * If the range being mapped is aligned and sized to 1MB boundaries then
+ * also align the virtual address to the next-lower 1MB boundary so that
+ * we end with a nice efficient section mapping.
*/
-#ifdef __arm__
if ((pa & 0x000fffff) == 0 && (sz & 0x000fffff) == 0) {
akva_devmap_vaddr = trunc_1mpage(akva_devmap_vaddr - sz);
} else
@@ -170,7 +170,8 @@
* the previously-registered table is used. This smooths transition from legacy
* code that fills in a local table then calls this function passing that table,
* and newer code that uses devmap_register_table() in platform-specific
- * code, then lets the common initarm() call this function with a NULL pointer.
+ * code, then lets the common platform-specific init function call this function
+ * with a NULL pointer.
*/
void
devmap_bootstrap(vm_offset_t l1pt, const struct devmap_entry *table)
Index: head/sys/sys/devmap.h
===================================================================
--- head/sys/sys/devmap.h
+++ head/sys/sys/devmap.h
@@ -63,16 +63,18 @@
/*
* Register a platform-local table to be bootstrapped by the generic
- * initarm() in arm/machdep.c. This is used by newer code that allocates and
- * fills in its own local table but does not have its own initarm() routine.
+ * platform-specific init function in <ARCH>/machdep.c. This is used by newer
+ * code that allocates and fills in its own local table but does not have its
+ * own platform-specific init routine.
*/
void devmap_register_table(const struct devmap_entry * _table);
/*
* Establish mappings for all the entries in the table. This is called
- * automatically from the common initarm() in arm/machdep.c, and also from the
- * custom initarm() routines in older code. If the table pointer is NULL, this
- * will use the table installed previously by devmap_register_table().
+ * automatically from the common platform-specific init function in
+ * <ARCH>/machdep.c, and also from the custom platform-specific init routines
+ * in older code. If the table pointer is NULL, this will use the table
+ * installed previously by devmap_register_table().
*/
void devmap_bootstrap(vm_offset_t _l1pt,
const struct devmap_entry *_table);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 23, 7:58 AM (6 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32019097
Default Alt Text
D22035.diff (3 KB)
Attached To
Mode
D22035: Generalize ARM specific comments in devmap
Attached
Detach File
Event Timeline
Log In to Comment