comparison rathaxes_change_the_abstract_type_notation_in_the_e1000_sample.patch @ 106:976a4b87803f

Fix the resolution and the e1000 sample with the new scalar ref feature
author David Pineau <dav.pineau@gmail.com>
date Mon, 25 Mar 2013 01:17:56 +0100
parents fb20f01ea997
children f42751b8ca99
comparison
equal deleted inserted replaced
105:fb20f01ea997 106:976a4b87803f
1 # HG changeset patch 1 # HG changeset patch
2 # Parent 1fa9b24e6012b2d53f1a84d4606cf3b6b9685fef 2 # Parent f046837f963dcba715cebe8b6dc40e7bbe2ce598
3 rathaxes: change the abstract type notation in the e1000 sample 3 rathaxes: change the abstract type notation in the e1000 sample
4 4
5 Starting with ra24db32bf134 Rathaxes types are generated differently: you 5 Starting with ra24db32bf134 Rathaxes types are generated differently: you
6 don't define entire structures anymore, but only the fields. And the 6 don't define entire structures anymore, but only the fields. And the
7 compiler generate a typedef'ed structure on top of it. 7 compiler generate a typedef'ed structure on top of it.
54 +++ b/rathaxes/samples/e1000/device.rti 54 +++ b/rathaxes/samples/e1000/device.rti
55 @@ -5,6 +5,6 @@ 55 @@ -5,6 +5,6 @@
56 decl data_types(); 56 decl data_types();
57 chunk LKM::includes(); 57 chunk LKM::includes();
58 method init(); 58 method init();
59 - attribute Builtin::symbol data; 59 - attribute Builtin::symbol.scalar data;
60 + attribute Builtin::symbol k_device; 60 + attribute Builtin::symbol.scalar k_device;
61 } 61 }
62 } 62 }
63 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt 63 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt
64 --- a/rathaxes/samples/e1000/e1000.blt 64 --- a/rathaxes/samples/e1000/e1000.blt
65 +++ b/rathaxes/samples/e1000/e1000.blt 65 +++ b/rathaxes/samples/e1000/e1000.blt
470 provided type AbstractDevice 470 provided type AbstractDevice
471 { 471 {
472 chunk LKM::includes(); 472 chunk LKM::includes();
473 + method init(Builtin::symbol); 473 + method init(Builtin::symbol);
474 decl data_types(); 474 decl data_types();
475 - attribute Builtin::symbol netdev; 475 - attribute Builtin::symbol.scalar netdev;
476 + 476 +
477 + attribute Builtin::symbol k_net_dev; 477 + attribute Builtin::symbol.scalar k_net_dev;
478 + /* 478 + /*
479 + * XXX: should be a Ethernet::Device, but that causes a circular 479 + * XXX: should be a Ethernet::Device, but that causes a circular
480 + * dependency. 480 + * dependency.
481 + */ 481 + */
482 + attribute Builtin::symbol rtx_ether_ctx; 482 + attribute Builtin::symbol.scalar rtx_ether_ctx;
483 } 483 }
484 484
485 provided type Device 485 provided type Device
486 @@ -34,9 +41,9 @@
487 * I'd like to use better names here, but I'd like to understand the
488 * difference between the two first:
489 */
490 - attribute Builtin::symbol perm_addr;
491 - attribute Builtin::symbol dev_addr;
492 - attribute Builtin::symbol irq;
493 + attribute Builtin::symbol perm_addr;
494 + attribute Builtin::symbol dev_addr;
495 + attribute Builtin::symbol irq;
496 }
497
498 required sequence open(Ethernet::Device)
499 diff --git a/rathaxes/samples/e1000/pci.blt b/rathaxes/samples/e1000/pci.blt 486 diff --git a/rathaxes/samples/e1000/pci.blt b/rathaxes/samples/e1000/pci.blt
500 --- a/rathaxes/samples/e1000/pci.blt 487 --- a/rathaxes/samples/e1000/pci.blt
501 +++ b/rathaxes/samples/e1000/pci.blt 488 +++ b/rathaxes/samples/e1000/pci.blt
502 @@ -16,15 +16,15 @@ 489 @@ -16,15 +16,15 @@
503 { 490 {
615 @@ -10,10 +10,15 @@ 602 @@ -10,10 +10,15 @@
616 603
617 chunk LKM::includes(); 604 chunk LKM::includes();
618 method init(PCI::AbstractDevice); 605 method init(PCI::AbstractDevice);
619 - method set_context(Builtin::symbol); 606 - method set_context(Builtin::symbol);
607 -
608 - attribute Builtin::symbol.scalar data;
609 - attribute Builtin::symbol.scalar drv_data;
620 + /* 610 + /*
621 + * XXX: the argument should be a PCI::Device but that causes a circular 611 + * XXX: the argument should be a PCI::Device but that causes a circular
622 + * dependency: 612 + * dependency:
623 + */ 613 + */
624 + method set_rtx_context(Builtin::symbol); 614 + method set_rtx_context(Builtin::symbol);
625 615 +
626 - attribute Builtin::symbol data; 616 + attribute Builtin::symbol.scalar k_pci_dev;
627 - attribute Builtin::symbol drv_data;
628 + attribute Builtin::symbol k_pci_dev;
629 + /* XXX: should be PCI::Device (see above point) */ 617 + /* XXX: should be PCI::Device (see above point) */
630 + attribute Builtin::symbol rtx_pci_ctx; 618 + attribute Builtin::symbol.scalar rtx_pci_ctx;
631 } 619 }
632 620
633 provided type PCI::Device 621 provided type PCI::Device
634 @@ -27,9 +32,9 @@ 622 @@ -27,9 +32,10 @@
635 method enable(); 623 method enable();
636 method disable(); 624 method disable();
637 method select_ioaddr(Builtin::number); 625 method select_ioaddr(Builtin::number);
638 - method set_context(Builtin::symbol); 626 - method set_context(Builtin::symbol);
627
628 - attribute Builtin::symbol.scalar context;
639 + method set_rtx_drv_context(Builtin::symbol); 629 + method set_rtx_drv_context(Builtin::symbol);
640 630 +
641 - attribute Builtin::symbol context; 631 + attribute Builtin::symbol.scalar rtx_drv_context;
642 + attribute Builtin::symbol rtx_drv_context; 632 attribute Device::AbstractDevice.ref device;
643 attribute Device::AbstractDevice device; 633 attribute PCI::AbstractDevice.ref pci_device;
644 attribute PCI::AbstractDevice pci_device; 634 attribute Builtin::symbol.ref ioaddr;
645 attribute Builtin::symbol ioaddr;
646 diff --git a/rathaxes/samples/e1000/socket.blt b/rathaxes/samples/e1000/socket.blt 635 diff --git a/rathaxes/samples/e1000/socket.blt b/rathaxes/samples/e1000/socket.blt
647 --- a/rathaxes/samples/e1000/socket.blt 636 --- a/rathaxes/samples/e1000/socket.blt
648 +++ b/rathaxes/samples/e1000/socket.blt 637 +++ b/rathaxes/samples/e1000/socket.blt
649 @@ -14,7 +14,7 @@ 638 @@ -14,7 +14,7 @@
650 639
749 738
750 map 739 map
751 diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti 740 diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti
752 --- a/rathaxes/samples/e1000/socket.rti 741 --- a/rathaxes/samples/e1000/socket.rti
753 +++ b/rathaxes/samples/e1000/socket.rti 742 +++ b/rathaxes/samples/e1000/socket.rti
754 @@ -5,7 +5,8 @@ 743 @@ -5,7 +5,7 @@
755 { 744 {
756 chunk LKM::includes(); 745 chunk LKM::includes();
757 decl data_types(); 746 decl data_types();
758 - attribute Builtin::symbol data; 747 - attribute Builtin::symbol.scalar data;
759 + 748 + attribute Builtin::symbol.scalar k_sk_buff;
760 + attribute Builtin::symbol k_sk_buff;
761 } 749 }
762 750
763 provided type SKBuff 751 provided type SKBuff