Displaying 2 results from an estimated 2 matches for "old_hook".
2009 Dec 07
3
[PATCH] memdisk: "safe hook" and mBFT
...;
#include "e820.h"
@@ -47,6 +48,18 @@ struct memdisk_header {
uint16_t iret_offs;
};
+struct safe_hook {
+ uint8_t jump[3]; /* Max. three bytes for jump */
+ uint8_t signature[8]; /* "$INT13SF" */
+ uint8_t vendor[8]; /* "MEMDISK " */
+ uint32_t old_hook; /* SEG:OFF for previous INT 13h hook */
+ uint32_t flags; /* "Safe hook" flags */
+ /* The next field is a MEMDISK extension to the "safe hook" structure */
+ uint32_t mBFT; /* Offset from hook to the mBFT; refilled
+ * by setup() with the physical address
+...
2011 Aug 06
4
[PATCH] ifmemdsk.c32: Allow boot options based on presence of MEMDISK
...tor */
+ addr = MK_PTR(int13->seg_off.segment, int13->seg_off.offset);
+ found = 0;
+ while ((hook = is_safe_hook(addr))) {
+ if ((mdi = is_memdisk_hook(hook))) {
+ memdisk_info(mdi);
+ ++found;
+ }
+
+ addr = MK_PTR(
+ hook->old_hook.seg_off.segment,
+ hook->old_hook.seg_off.offset
+ );
+ continue;
+ }
+ return found;
+ }
+
+static const s_safe_hook * is_safe_hook(const void * addr) {
+ static const char magic[] = "$INT13SF";
+ const s_safe_hook * test;
+
+ test = addr;...