dologf("Got packet: type %08x", packet->type);
- *(unsigned long*)0xAFFD4 = 0x2BADD00D;
+ if (packet->type == 42) {
+ dump_log((char *)packet->data);
+ *(unsigned long*)0xAFFD4 = 42;
+ } else {
+ *(unsigned long*)0xAFFD4 = 0x2BADD00D;
+ }
}
void smi_entry(void)
smram_state_t old_state = smram_save_state();
smram_aseg_set_state(SMRAM_ASEG_SMMCODE);
-
+
while (*src)
{
*(destp++) = *(src++);
va_end(va);
}
void (*outputf)(const char *s, ...) = dologf;
+
+void dump_log (char * target) {
+ memcpy(target, logents, sizeof(logents));
+}
packet_t * packet = (packet_t *)memalign(4096, sizeof(packet_t));
packet->signature = 0x1BADD00D;
- packet->type = 0xF00FC7C8;
+ packet->type = 42;
+ strcpy(packet->data, "hello, world!");
if (iopl(3) < 0)
{
res = poke(_get_PMBASE() + 0x04, (void *)packet);
printf("returned %p\n", res);
+
+ if (res == 42) {
+ printf("%s\n", packet->data);
+ printf("%s\n", packet->data+41);
+ printf("%s\n", packet->data+82);
+ printf("%s\n", packet->data+123);
+ }
}