Lines Matching refs:wp
86 #define KAIF_WPPRIV2ID(wp) (int)(uintptr_t)((wp)->wp_priv)
311 kaif_wapt_validate(kmdb_wapt_t *wp)
313 if (wp->wp_type == DPI_WAPT_TYPE_IO) {
314 if (wp->wp_wflags != (MDB_TGT_WA_R | MDB_TGT_WA_W)) {
319 if (wp->wp_size != 1 && wp->wp_size != 2 && wp->wp_size != 4) {
324 } else if (wp->wp_type == DPI_WAPT_TYPE_PHYS) {
330 if (wp->wp_wflags != (MDB_TGT_WA_R | MDB_TGT_WA_W) &&
331 wp->wp_wflags != MDB_TGT_WA_W) {
336 if ((wp->wp_size & -(wp->wp_size)) != wp->wp_size ||
337 wp->wp_size > WAPT_DATA_MAX_SIZE) {
345 if (wp->wp_addr & (wp->wp_size - 1)) {
347 (ulong_t)wp->wp_size, (ulong_t)wp->wp_size);
355 kaif_wapt_reserve(kmdb_wapt_t *wp)
363 wp->wp_priv = (void *)(uintptr_t)id;
372 kaif_wapt_release(kmdb_wapt_t *wp)
374 int id = KAIF_WPPRIV2ID(wp);
382 kaif_wapt_arm(kmdb_wapt_t *wp)
385 int hwid = KAIF_WPPRIV2ID(wp);
389 if (wp->wp_type == DPI_WAPT_TYPE_IO)
391 else if (wp->wp_wflags & MDB_TGT_WA_R)
393 else if (wp->wp_wflags & MDB_TGT_WA_X)
398 kaif_drreg.dr_addr[hwid] = wp->wp_addr;
401 kaif_drreg.dr_ctl |= KREG_DRCTL_WP_LENRW(hwid, wp->wp_size - 1, rw);
408 kaif_wapt_disarm(kmdb_wapt_t *wp)
410 int hwid = KAIF_WPPRIV2ID(wp);
422 kaif_wapt_match(kmdb_wapt_t *wp)
424 int hwid = KAIF_WPPRIV2ID(wp);