mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
- Add MIPS_IS_KSEG0_ADDR, MIPS_IS_KSEG1_ADDR and MIPS_IS_VALID_PTR
macroses thet check if address belongs to KSEG0, KSEG1 or both of them respectively.
This commit is contained in:
parent
a2f4a6ee3c
commit
9270c7be8b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/mips/; revision=192177
@ -72,6 +72,15 @@
|
||||
#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK)
|
||||
#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK)
|
||||
|
||||
#define MIPS_IS_KSEG0_ADDR(x) \
|
||||
(((vm_offset_t)(x) >= MIPS_KSEG0_START) && \
|
||||
((vm_offset_t)(x) <= MIPS_KSEG0_END))
|
||||
#define MIPS_IS_KSEG1_ADDR(x) \
|
||||
(((vm_offset_t)(x) >= MIPS_KSEG1_START) && \
|
||||
((vm_offset_t)(x) <= MIPS_KSEG1_END))
|
||||
#define MIPS_IS_VALID_PTR(x) (MIPS_IS_KSEG0_ADDR(x) || \
|
||||
MIPS_IS_KSEG1_ADDR(x))
|
||||
|
||||
/*
|
||||
* Status register.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user