slb.h (a5615c90442b10b0d286b8fcf2cfdcc1c2958d58) slb.h (1cd30eb6dd61f24520d2dfc71856ac94c4f7b5ad)
1/*-
2 * Copyright (C) 2009 Nathan Whitehorn
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 48 unchanged lines hidden (view full) ---

57 * 0x13bbUL) & (KERNEL_VSID_BIT - 1)) | \
58 KERNEL_VSID_BIT)
59
60#define SLBE_VALID 0x0000000008000000UL /* SLB entry valid */
61#define SLBE_INDEX_MASK 0x0000000000000fffUL /* SLB index mask*/
62#define SLBE_ESID_MASK 0xfffffffff0000000UL /* Effective segment ID mask */
63#define SLBE_ESID_SHIFT 28
64
1/*-
2 * Copyright (C) 2009 Nathan Whitehorn
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 48 unchanged lines hidden (view full) ---

57 * 0x13bbUL) & (KERNEL_VSID_BIT - 1)) | \
58 KERNEL_VSID_BIT)
59
60#define SLBE_VALID 0x0000000008000000UL /* SLB entry valid */
61#define SLBE_INDEX_MASK 0x0000000000000fffUL /* SLB index mask*/
62#define SLBE_ESID_MASK 0xfffffffff0000000UL /* Effective segment ID mask */
63#define SLBE_ESID_SHIFT 28
64
65/* Virtual real-mode VSID in LPARs */
66#define VSID_VRMA 0x1ffffff
67
65/*
66 * User segment for copyin/out
67 */
68#define USER_SLB_SLOT 0
69#define USER_SLB_SLBE (((USER_ADDR >> ADDR_SR_SHFT) << SLBE_ESID_SHIFT) | \
70 SLBE_VALID | USER_SLB_SLOT)
71
72struct slb {
73 uint64_t slbv;
74 uint64_t slbe;
75};
76
77#endif /* !_MACHINE_SLB_H_ */
68/*
69 * User segment for copyin/out
70 */
71#define USER_SLB_SLOT 0
72#define USER_SLB_SLBE (((USER_ADDR >> ADDR_SR_SHFT) << SLBE_ESID_SHIFT) | \
73 SLBE_VALID | USER_SLB_SLOT)
74
75struct slb {
76 uint64_t slbv;
77 uint64_t slbe;
78};
79
80#endif /* !_MACHINE_SLB_H_ */