File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: GPL-2.0
2+
3+ //! Kernel core address types.
4+
5+ use bindings;
6+ use core:: ffi;
7+
8+ /// A physical memory address (which may be wider than the CPU pointer size)
9+ pub type PhysicalAddr = bindings:: phys_addr_t ;
10+ /// A DMA memory address (which may be narrower than `PhysicalAddr` on some systems)
11+ pub type DmaAddr = bindings:: dma_addr_t ;
12+ /// A physical resource size, typically the same width as `PhysicalAddr`
13+ pub type ResourceSize = bindings:: resource_size_t ;
14+ /// A raw page frame number, not to be confused with the C `pfn_t` which also encodes flags.
15+ pub type Pfn = ffi:: c_ulong ;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ compile_error!("Missing kernel configuration for conditional compilation");
4040// Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate).
4141extern crate self as kernel;
4242
43+ pub mod addr;
4344pub mod alloc;
4445#[ cfg( CONFIG_BLOCK ) ]
4546pub mod block;
You can’t perform that action at this time.
0 commit comments