Got it. Thanks. I didn't understand that the variables cmos_address_attributes and cmos_data_attributes where attributes of the IOPorts. I thought they were attributes of the RTC component. I was confused when I did not see them defined anywhere.
- John On Wed, Oct 4, 2017 at 12:29 AM, <[email protected]> wrote: > Hi John, > > > The purpose is to allow the attributes on the CMOS hardware component to > have defaults but still able to be overridden by configuration settings of > the RTC component that contains it. > > > If in your assembly you had an instance of the RTC component called clock, > then in your configuration section you could set clock.cmos_address_ > attributes and clock.cmos_data_attributes to different values and these > would override the settings in the underlying hardware component. > > assembly { > > composition { > > RTC clock; > > } > > configuration { > > /* This is going to override the cmos_data_attributes attribute > on the hardware CMOS device */ > > β/* It is equivalent to clock.cmos.cmos_data_attributes = > "0x72:0x72"; β*/ > > clock.cmos_data_attributes = "0x72:0x72"; β > > } > > βThe manual explains the '<-' feature here: https://github.com/seL4/ > camkes-tool/blob/master/docs/index.md#syntax-1 > > And there is an app in the camkes project that shows more examples here: > https://github.com/seL4/camkes/blob/master/apps/ > attributes/attributes.camkes > > > Kind regards, > > Kent > ------------------------------ > *From:* Devel <[email protected]> on behalf of John Backes < > [email protected]> > *Sent:* Wednesday, October 4, 2017 2:27 AM > *To:* devel > *Subject:* [seL4] Question about IO ports in CAmKES > > I have a question about the Real-time Clock component (RTC) for the x86 > VMM found here: > > https://github.com/SEL4PROJ/global-components/blob/master/ > components/RTC/RTC.camkes > > Here is the text of the camkes file: > > import <RTC.idl4>; > import <PutChar.idl4>; > > component CMOS { > hardware; > provides IOPort cmos_address; > provides IOPort cmos_data; > attribute string cmos_address_attributes = "0x70:0x70"; > attribute string cmos_data_attributes = "0x71:0x71"; > > } > > component RTC { > provides RTC rtc; > maybe uses PutChar putchar; > uses IOPort cmos_address; > uses IOPort cmos_data; > attribute int heap_size = 0; > > /* Connect the hardware RTC to the RTC component */ > composition { > component CMOS cmos; > connection seL4HardwareIOPort rtc_cmos_address(from cmos_address, > to cmos.cmos_address); > connection seL4HardwareIOPort rtc_cmos_data(from cmos_data, to > cmos.cmos_data); > } > configuration { > cmos.cmos_address_attributes <- cmos_address_attributes; > cmos.cmos_data_attributes <- cmos_data_attributes; > } > } > > What is the meaning of the last two statements in the configuration block? > what is the scoping rules for the "cmos_address_attributes" and > "cmos_data_attributes" variables? It looks like these attributes are > already set in the definition of the CMOS component? They seemed to be > assigned again in the configuration block? > > - John >
_______________________________________________ Devel mailing list [email protected] https://sel4.systems/lists/listinfo/devel
