- gi->gd_fbaddr = (caddr_t) (*(addr + fboff) << 16);
-#if defined(HP360) || defined(HP370)
- /*
- * For DIO II space addresses offset is relative to the DIO II space.
- * XXX: this should apply to all frame buffer types.
- */
- if (gi->gd_regaddr >= (caddr_t)DIOIIBASE)
+ gi->gd_fbaddr = (caddr_t) (*((u_char *)addr + fboff) << 16);
+ if (gi->gd_regaddr >= (caddr_t)DIOIIBASE) {
+ /*
+ * For DIO II space the fbaddr just computed is the offset
+ * from the select code base (regaddr) of the framebuffer.
+ * Hence it is also implicitly the size of the register set.
+ */
+ gi->gd_regsize = (int) gi->gd_fbaddr;