]> Joshua Wise's Git repositories - netwatch.git/commitdiff
add dump-buffer command
authorJacob Potter <jdpotter@andrew.cmu.edu>
Fri, 26 Sep 2008 03:29:38 +0000 (23:29 -0400)
committerJacob Potter <jdpotter@andrew.cmu.edu>
Fri, 26 Sep 2008 03:29:38 +0000 (23:29 -0400)
aseg/counter.c
aseg/vga-overlay.c
include/vga-overlay.h
tools/poke-rls.c

index 7b34f3a299719f11b78bb94038f5a83b3c788657..6ef4cf91a19124649aadba12ec9db3ebc5127359 100644 (file)
@@ -81,7 +81,12 @@ void gbl_rls_handler(smi_event_t ev)
 
        dologf("Got packet: type %08x", packet->type);
 
 
        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)
 }
 
 void smi_entry(void)
index ca0e8a53e0abae52efdfbb55ac302872fce13301..7aa8b412c517f73f68f5afeead935b98c5c588cb 100644 (file)
@@ -35,7 +35,7 @@ void strblit(char *src, int row, int col)
        smram_state_t old_state = smram_save_state();
 
        smram_aseg_set_state(SMRAM_ASEG_SMMCODE);
        smram_state_t old_state = smram_save_state();
 
        smram_aseg_set_state(SMRAM_ASEG_SMMCODE);
-       
+
        while (*src)
        {
                *(destp++) = *(src++);
        while (*src)
        {
                *(destp++) = *(src++);
@@ -84,3 +84,7 @@ void dologf(const char *fmt, ...)
        va_end(va);
 }
 void (*outputf)(const char *s, ...) = dologf;
        va_end(va);
 }
 void (*outputf)(const char *s, ...) = dologf;
+
+void dump_log (char * target) {
+       memcpy(target, logents, sizeof(logents));
+}
index 890f3537f1c71e64e4f5be4fc82b68fa491a7ea5..f338d49d88a21eb2bcab4e1ffa77b98b8c9179fa 100644 (file)
@@ -7,4 +7,6 @@ void dolog(char *s);
 void dologf(char *s, ...);
 void outlog();
 
 void dologf(char *s, ...);
 void outlog();
 
+void dump_log(char *buffer);
+
 #endif
 #endif
index 6946fb75fbe42d480670abb10c1f1c41e82190ca..03c4fb1fcf564d652612fd4f7376e0cac0ab11a1 100644 (file)
@@ -28,7 +28,8 @@ int main(int argc, char **argv)
        packet_t * packet = (packet_t *)memalign(4096, sizeof(packet_t));
 
        packet->signature = 0x1BADD00D;
        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)
        {
 
        if (iopl(3) < 0)
        {
@@ -38,4 +39,11 @@ int main(int argc, char **argv)
        
        res = poke(_get_PMBASE() + 0x04, (void *)packet);
        printf("returned %p\n", res);
        
        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);
+       }
 }
 }
This page took 0.030118 seconds and 4 git commands to generate.