Changes between Version 198 and Version 199 of GSoC/2015


Ignore:
Timestamp:
Aug 17, 2015, 12:16:02 AM (5 years ago)
Author:
YANG QIAO
Comment:

revert the mistake of deletion in rev 197

Legend:

Unmodified
Added
Removed
Modified
  • GSoC/2015

    v198 v199  
    189189* June 2: Found the root cause for the hang issue. The issue is due to rx interrupt getting enabled before it is serviced. I put a temp hack fix and proceeded. I am able to go to the shell and execute commands. ifconfig of the interface works. irq's are established. Next week I will be working on the packet processing side.
    190190
    191 * June 9: I worked on packet processing this week. We are able to receive the packets and it is moved up the network stack successfully. Transmission of packets have an issue.  The network stack generates packets and it reaches the driver. But the packet is not received on the external side. The stats registers shows that the packets are transferred properly. There are no crc, overrun errors. I also checked for connectivity errors using ethtool and that too was inline with wor
     191* June 9: I worked on packet processing this week. We are able to receive the packets and it is moved up the network stack successfully. Transmission of packets have an issue.  The network stack generates packets and it reaches the driver. But the packet is not received on the external side. The stats registers shows that the packets are transferred properly. There are no crc, overrun errors. I also checked for connectivity errors using ethtool and that too was inline with working scenarios.The interface includes an Address lookup engine which decides how the packet is transmitted. This is where there is difference between working freebsd driver and rtems driver.   Here rtems has some junk entries which are not part of the network. Working driver has entries for only those mac addresses for which it received packets. In rtems there are some random entries which is wrong. I am checking why it happens. I am checking working freebsd driver and checking what might be a possible issue.
     192
     193* June 16: Found the reason for the packet transmission issue. The issue is due to cache. Earlier it was mentioned that cache has to be disabled to make lwIP port to work. After disabling cache, ALE is filled correctly. Packets are transmitted properly. Ping, arp and dhcp were working. As decided in the meeting, I will be testing the rest of the testsuites next week. Cache will be debugged later.
     194
     195* June 23: Most of the testsuites passed successfully. We are able to transfer files using ftpd. We are able to telnet to the machine and execute commands. Other tests also passed successfully. Tests that yet to be tested are foobar client/server. Some tests that does nor depend on networking like media01,usb01 are skipped. ARP, PING, DHCP, FTP, TFTP are all tested and working. I will be preparing the patch and sending it next week.
     196
     197* June 30: Created patch for the ethernet driver and RTEMS workarounds and submitted to devel. Few comments were given and they are addressed. Sebastian suggested that it is better to fix the cache issue in driver instead of disabling the cache completely. I started to debug why cache needs to be disabled to make networking work.
     198
     199* July 7: I continued to debug the cache issue. The ALE entries are corrupted and random values are getting added to the ALE. The frame received on the peer end shows that packets are received from this corrupted entries. Sebastian suggested to check if_cgem driver to see how cache operations are done there. I made similar changes to flush/invalidate cache during tx/rx operations. I also made the memory used non-cacheable. But it did not give the desired result.
     200
     201* July 14: I continued debugging of cache issue. I could not get any significant break through.   Cache flush/invalidate did not solve the issue.So it is decided to start on porting lwip to RTEMS. Since we may face similar issue there, we can progress on lwip and debug the cache issue combined with both the stacks.
     202
     203* July 21: I worked on porting of lwIP to RTEMS. I explored the lwip stack and understood its internals. I also read about what support an OS must provide and what are the changes needed. Then I built the lwip port and created a library. Then, I  studied RTEMS resource builder & understood how third party packages are built using RSB. I created config and bset file for lwip using ntp as reference.
     204
     205* July 28: I was trying to run an RTEMS application based on lwip stack. I read about how to write application for lwip. I am understanding what are the basic services that needs to be enabled in RTEMS for an lwip app to run like what are the essential "CONFIGURE_" options that need to be enabled.On the cache issue side, I narrowed down the issue to TX part. After we start DMA on the transmit side, the corrupted ethernet frame is sent. I deleted the junk entries before transmitting. But after we transmit, the random entries are created by the DMA operation.
     206
     207* Aug 4: This week I worked on writing an application using lwip stack and RTEMS. With this I will be able to link the lwip library to an application. I started with the app and looked into how to start lwip. I found out what are the necessary “CONFIGURE_” defines for the app. Then I was able to run the app. I faced a few issues with running thethreads. I had to tweak few parameters for the threads to run. Now the app is running successfully. It is able to get the ip address from dhcp server. PING and ARP were also working. So networking is up with lwip. Though there is one issue. The threads are not preempted and I have to yield to get the next thread running. RX & TX are in separate threads so yield is necessary to make it work. Next step is to build the libraries using RSB.
     208
     209== Jarielle Catbagan ==
     210
     211* May 19: Currently, I have a basic image to perform UART booting on the BBB.  As of right now I am transferring my changes from the initial Umon 1.19 sources to the new revised Umon git source tree obtained from the  RTEMS repos.  Furthermore, I am also working on a copy of the CSB740 port by replacing the CSB740 specifics with that of the BBB/ARM Cortex-A8 while maximizing code reuse as much as possible.  From now up uptil the next status update, I will continue finishing the remaining logistics of the project, continue working on the base files of Umon to get an initial image up and running while committing and pushing my changes regularly.  I will draw up inspiration from existing Umon port implementations for the design of the BBB port.  Finally, I will continue looking into the ARMv7A ARM Architecture Reference Manual, specifically the application level and system level architecture to help me understand the fundamentals of RTEMS and Umon.
     212
     213* May 26: The boot process that the AM335x/Beaglebone Black undergoes and the possible sources to boot from has been determined.  The ideal boot sources to transfer and/or execute the initial image is either from a uSD or via UART.  Porting Umon is underway and I am approaching the port with the notion of a top-down approach. That is starting from the entry point where program execution first starts and then traversing the source code while replacing irrelevant and integrating the essential/necessary code.  In the context of the Beaglebone Black, program execution starts at rom_reset.S and then jumps to the C code initialization in start.c.  My current effort is to integrate the initial functionality and mechanisms specific to the AM335x into these startup files and then have it inter-work with the existing Umon implementation.  For my references, I will continue using the ARMv7A Architecture Reference Manual as well as the AM335x Technical Reference Manual, Beaglebone Black System Reference Manual, and the Umon User Manual.
     214
     215* June 2: During the process of converting the initialization file for running Umon from ROM (rom_reset.S) in the csb740 port to the Beaglebone Black, some existing code were reused as the processor in the csb740 port and the AM335x processor share some similarities.  The reused code encompasses the fundamental and required initializations.  These included retaining the stack initialization for each of the processor modes as well as setting the processor to an initial processor mode, which is supervisor mode.  Right now, I am consolidating the necessary information in order to develop the mechanisms to initialize and set up the external DDR3 RAM on the board. This will provide the capability of removing an application's reliance on the limited internal SRAM  Furthermore, the utilization of this external memory will allow larger images to run on the system.  From the information I was able to obtain it is both practical and efficient in initalizing the external memory at a very low-level, and as a result this process will be done in rom_reset.S.  Shortly after, rom_reset.S jumps to the first C-defined function start().  Mostly like the mechanisms to manipulate the external memory will be done in C.
     216
     217* June 9: The previous Umon image that was built was using the previous Umon 1.19 sources.  The new Umon source tree, which was obtained from the RTEMS git repos, is stripped of any code that would conflict with the licenses involved.  During the process where code was being removed, the directory/file structure of the new Umon source tree was shifted around to the point where a Umon image cannot be built immediately.  After performing the necessary modifications, the basic Umon image that boots from UART and was built from the Umon 1.19 sources can now be built with the new Umon source tree.  I have also looked more extensively in the initialization that Umon undergoes.  Umon does the minimum system intializations with the ultimate goal of presenting the Umon command line to the user.  As mentioned in the previous status update, in the context of the AM335x/Beaglebone Black, program execution first starts at rom_reset.S.  This contains the low-level mechanisms to initialize the system.  From here, a jump to the first C function start() is performed.  The general order of function invocation after start() is umonBssinit() -> init0() -> init1() -> init2() -> reginit() -> init3() before finally reaching CommandLoop() where the Umon command line is presented to the user.  Getting to this point is the main goal.  Since I am approaching the porting process with a top-down approach, the first step would be getting umonBssInit() to function properly.  Delving into the specifics of this function, it can be seen that it manipulates the memory location whose base address is 0x80000000.  Referring to the AM335x TRM, this is the start location of the external DDR3 SDRAM.  As of right now the main focus is performing the necessary configurations to get the external DDR3 SDRAM working before proceeding to modifying the next initialization functions along the chain previously specified.
     218
     219* June 16: Since the last status update, I elaborated extensively the approach that I am taking in porting Umon as well as the fundamentals of DDR3 SDRAMs which can be found in my blog.  I have also consolidated all the necessary information that pertain to the composition, operation, and requirements of DDR3 and I am currently implementing the DDR3 configuration in rom_reset.S.  The BBB that I have has a 512MB DDR3 SDRAM, which is the D2516EC4BXGGB from Kingston, and I have already familiarized myself with the parameters of the DDR3 as it is required during the DDR3 configuration.  The memory subsystem on the AM335x, and subsequently on the BBB, that interfaces with the DDR3 SDRAM is the EMIF subsystem as specified in section 7.3 in the AM335x TRM.  Fortunately, TI has a dedicated wiki that provides tips and insights on the configuration of these registers within the EMIF subsystem in order to interface with DDR3.  There is also essential information in the JEDEC DDR3 Standard specification, in particular section 3.3.1, as it concisely summaries the sequence of steps required in order to reset and initialize DDR3 properly.  As a result, this is also utilized as reference for the current DDR3 implementation effort.  There are also the DDR PHY registers that must be configured accordingly based on the characteristics of the board where the DDR3 exists in order to ensure that proper timing is performed for all DDR transactions.  Additionally, the clocks going into the DDR memory must also be configured as specified in section 7.3.3.2 in the AM335x TRM.  The information that will be utilized to configure the DDR clocks is in section 8.1.6.11 in the AM335x TRM as well.  Once the DDR3 configuration is implemented, a simple test that I will be performing to ensure that the DDR3 is setup properly is by manipulating predetermined values within the DDR3 memory range and then outputting the values through UART0.  This memory range of the EMIF subsystem, and as a result it is also the memory that can be allocated to DDR3, is 0x80000000 - 0xBFFFFFFF.  This is equivalent to 1GB.  The modifications/additions to the Umon sources will be pushed accordingly.
     220
     221* June 23: A set of patches were submitted recently on umon-devel@ that fix up the BBB port as well as the main Umon sources to allow Umon to be built successfully.  Another set of patches were also submitted that removed and replaced any irrelevant code in the BBB port.  The Umon command line has been reached, but functionality is still limited.  Executing some of the commands results in a data abort exception and after a substantial amount of debugging, the root cause of the problem has been determined.  A multitude of solutions were proposed and formulated, but the best solution is to transition to using the RTEMS compiler instead of the default arm cross-compiler toolset that is used to build Umon.  This transition will not only provide the possibility of eradicating the issues we were facing, but also to prevent any issues and complexities that could arise if we chose to transition to the RTEMS toolset later on.  Expanding on the premise stated, one thing to note about this transition is that it is an attempt to see if the issues regarding the data abort exception would be rectified.  As a result, I will now look into getting the Umon sources to be built using the RTEMS toolset.  Once Umon can be built using the RTEMS toolset, a patch will be developed to reflect these changes.    Furthermore, the previous set of patches have already been tested by Ed and now only requires some improvements, especially in the format of the code, and it should be ready to be merged with the main Umon sources.
     222
     223* June 30: The patches that I recently submitted creates the base directory for the BBB port, cleans up the uMon sources as well resolving the build process, and provides the first run of removing any irrelevant code and replacing it with those that are specific to the BBB/AM335x.  These patches are finally merged in to the uMon master branch at the RTEMS git repos.  Furthermore, uMon is now building with the RTEMS tools and this is the first step in providing a more controllable and verifiable way of building uMon.  The necessary files are finally incorporated into the uMon master branch that removes uMon's external dependence on the C library provided with the RTEMS toolset.  The next step is to get uMon to boot from a uSD and to push the initial version of DDR3 initialization to the Github repo.
     224
     225* July 7: UART0 initialization was integrated.  As a result uMon can now boot from uSD.  A script was created to automate the process of setting up a bootable SD card to boot uMon using either "raw" or FAT mode.  Documentation was added in the BBB port to elaborate the process of how exactly an SD card is set up for either "raw" or FAT mode boot.  Patches that incorporate these additions and files were submitted and have been merged.  Development on DDR3 initialization has been occurring simultaneously, hence the next task is to get the DDR3 initialized properly for normal operation.
     226
     227* July 14: The DDR3 memory is now initialized.  According to the AM335x TRM, Section 2.1 "ARM Cortex-A8 Memory Map", Table 2-1 "L3 Memory Map", DDR memories can span the range 0x80000000 - 0xBFFFFFFF.  Prior to initializing the DDR3 memory, accessing a value within the memory space would result in a data abort exception to occur.  Now that it is initialized, I have been able to manipulate values within the DDR3 memory space but nothing useful just yet.  Now that the DDR3 is initialized, my next step is to set up the MMC interface in order to allow uMon to boot an application image from an external SD card and ultimately from the onboard eMMC memory.  With the MMC interface mechanisms in place, booting RTEMS applications will be just a matter of time before it is achieved.
     228
     229* July 21: Currently implementing the SD/MMC interface.  I am focusing first on the SD card interface and since the interface to SD and MMC are quite similar, implementing MMC is not far off.  In order for the AM335x to connect to the SD card and perform communications, the SD/MMC/SDIO subsystem has to be initialized appropriately.  As a result the controller that will handle communications between the AM335x and SD card must have the timing and protocol configured properly.  For my reference in setting up the SD controller on the AM335x and to understand what is required to interface with an SD card I am using the AM335x TRM, Section 18 "Multimedia Card (MMC)", Physical Layer Simplified Specification Version 2.00, and SD Host Controller Simplified Specification Version 3.00.
     230
     231* July 28: The interface to the SD card is mostly implemented, just need to clean up the implementation before finally integrating the SD interface functionality with the main BBB port.  I am currently working on the MMC interface in order to interact with the onboard eMMC.  I will still be using the AM335x TRM, Section 18 "Multimedia Card (MMC)" for my reference in addition to JEDEC JESD84-A441 eMMC-Card Product Standard specification.  Once I finish the SD and MMC interface, I will be pursuing Ethernet and then implementing the mechanisms in uMon to do a TFS-less boot.
     232
     233* August 4: Patches that implement the interface to the SD card via the "sd" command have been submitted to umon-devel@ and are now merged with the uMon master.  The implementation for the interface to the onboard eMMC is finished for the most part.  I am currently in the process of cleaning up the sources and preparing the patches before submitting them to umon-devel@.  Once the patches are submitted, I will now be focusing on implementing the Ethernet functionality.
     234
     235== Sujay Raj ==
     236
     237* May 19: Got qemu networking figured, and successfully set up development environment on rtems virtual machine. Will be setting up the same on my pc. The next week will involve understanding Monkey's source code. A blog and calender will be established asap.
     238
     239* May 26: networked applications running (using the old stack) on my pc. Last week was spent on reading Monkey current development version's code. Initially it was planned to implement a select (2) version of the polling system. But it was concluded that select on rtems is slow and limited and hence we have to proceed with the new stack. Compiled rtems-libbsd with waf and I am in process of getting things working with it. In the next few days, I will get new stack completely covered, and focus on kqueue.
     240
     241* June 2: Past Week: Most of my time was spent on getting the new stack running. It installs and programs compile using it,  but it is not running properly with network demos . I spent around four days working on it with no avail, presently kiwichris is working with me for getting it to work, and hopefully it will be resolved in a day or two. I started with monkey, compiling it with freebsd There weren't major issues and because of the patch kiwichris posted some time ago, things are comparatively smooth.  Next Week: Working on rtems-libbsd will be on the sidelines as chris helps me set it up. I will be working solely on monkey. ( I am going to ask edsiper after the meeting about where to head next ).
     242
     243* June 9: Monkey Successfully running on FreeBSD. Some Kqueue tests not running for libbsd.
     244
     245* June 16: Continuing from last week, I figured the problem was in the kqueue test not kqueue itself. I wrote some sample kqueue tests and it worked in the demo, the demo still failing overall. I did some primary stress testing on monkey on linux using both epoll and kqueue and there were times when it failed, I reported some bugs to edsiper and he got them fixed asap ( development at monkey happens too fast ) The work on getting monkey building is nearly done. At the moment for me, it compiles completely but linking it with libc gets an error multiple definition of getreent but that will hopefully be figured out soon. Presently Monkey compiles successfully as a static library. I am looking at how this can be used. Networking with rtems-libbsd is still non-functional, and kiwichris is working on it. Seeing ragunath 's work with libbsd, I am thinking I should catch up with him and try to figure out how he got it working.
     246* June 23: getreent issue resolved. No more need for libc to be added.Monkey successfully building for rtems. Emailed patches for review to chris. Had to discuss porting sendfile to libbsd. Next work to focus on testing monkey on qemu. Have to read about IMFS.   
     247
     248
     249== Ketul Shah ==
     250
     251* May 19: Currently designing GPIO drivers for BeagleBone Black. I have already designed gpio drivers for output configuration and trying to make it more generalized API. In the next week I will be making it in generalized way according to suggestions from developers.   
     252* May 26: Currently I am tesitng my code on BBB and rectifying some errors with consulting mentors. Probably by next week we will be able to merge the code to manline and yah blog and calender I will be establishing this week.
     253
     254* June 2 : Almost done with the generalized gpio API and successfully tested on hardware too. My next task is to work with the GPIO Input and ADC driver development. For that I would be referring TRM of AM335X and probably by next week I will be able to have simple demo with push button on BBB.
     255
     256* June 9 : This week I will address most of the comments from mentors and will also coordinate with RPi student for making GPIO API  more generalized. Also this week I am going to add required registers (reference:- TRM of AM335x) mapping which are required for ADC interfacing for BBB.
     257
     258* June 16 : I added required registers for ADC interfacing to AM335x.h. Also added locking mechanism (Mutex) for avoiding rece condition to gpio API. Next week I will try to write code for ADC input. Probably I will be able to give a small demo on ADC on my BBB in upcoming weeks. Meanwhile, I am also updating GPIO API as per mentor(s)' comment(s)/suggestion(s).
     259
     260* June 23 : This week I implemented basic ADC driver and tested it on BBB and found working fine. Waiting for the review(s) for the same. Meanwhile I did some code(GPIO api) cleanup and made it to follow coding conventions. Next week I will try to have some good test with the ADC driver using variable resistor and post the video.
     261
     262* July 28 : I referred the TRM for I2C interfacing and also got myself used to with libi2c api available. Analysed the work done by Claas Ziemke for beaglebone black. Also did communication with him for my some issues.After that I modified his work as required. So up till now I almost done with the i2c driver except adding some functions,tests and reviews. And for testing purpose I managed one adxl345 sensor which can be interfaced via I2C and it will be cool for demo. I am able to interface that sensor with my raspberry pi (raspbian OS) through I2C and got the desired output.
     263
     264* Aug 4 : This week I worked with I2C drivers errors fixing. Then I also worked with adxl345 driver code. I almost completed the driver code for that sensor and put that in libchip . So my next task would be to real hardware testing and making a demo on that sensor interface using designed I2C driver on BBB. Also will try to make one video for all demos on that I worked this summer.
     265
     266== YANG Qiao ==
     267
     268* May 19: Mailbox and simple frambuffer implemented. Drawing pixels has tested. Next week I'll will look into the i386 bsp's code and other references for EDID retrieval, resolution autodetection and framebuffer text console implementation.
     269
     270* May 26: Tested the fb interfaces, read and ported part of reusable code from i386 bsp. Next week,Graphic text output would be implemented.
     271
     272* Jun 2: Graphic text output and its drawing implemented. Graphic output without drawing cursor has implemented (only by serial for input devices haven't been ported). Next week,communication with videocore, read EDID will be implemented and resolution autodetect would be active. Clean up and patches would take a bit more time.
     273
     274* Jun 9: fb graphic text console implemented. Part of useful supports for videocore, communicated by mailbox property channel, are implemented. Next week, review, discuss, cleanup all codes, write sample/tests if needed. test and create patch for mailbox, framebuffer, videocore, fbcons individually. ready to move on for graphic libraries porting.
     275
     276* Jun 16: Cleanup and refactory works in process. Find a better way of constructuring the mailbox buffer. Next week, look into the code structure, how the libjpeg library integrated into rsb and how to implement other graphic libraries. Continue to correct the code for the midterm review.
     277
     278* Jun 23: New way of constructuring the mailbox buffer waiting to be reviewed. Refactor the outch code is not done yet. Next week, get ready for the midterm review, continue to cleanup code. Try to port some graphic libraries into rsb.
     279
     280* July 7: Fixed some bugs and inviting more developpers to try out the graphic console . Port and test the microwindows graphic desktop environment.
     281
     282* Aug 10: fixed up bugs everywhere and small improvements,  limited the work area memory so that we won't corrupt the GPU memory area. Added kernel commandline support.