WWW.DUMAIS.IO
ARTICLES
OVERLAY NETWORKS WITH MY SDN CONTROLLERSIMPLE LEARNING SWITCH WITH OPENFLOWINSTALLING KUBERNETES MANUALLYWRITING A HYPERVISOR WITH INTEL VT-X CREATING YOUR OWN LINUX CONTAINERSVIRTIO DRIVER IMPLEMENTATIONNETWORKING IN MY OSESP8266 BASED IRRIGATION CONTROLLERLED STRIP CONTROLLER USING ESP8266.OPENVSWITCH ON SLACKWARESHA256 ASSEMBLY IMPLEMENTATIONPROCESS CONTEXT ID AND THE TLBTHREAD MANAGEMENT IN MY HOBBY OSENABLING MULTI-PROCESSORS IN MY HOBBY OSNEW HOME AUTOMATION SYSTEMINSTALLING AND USING DOCKER ON SLACKWARESYSTEM ON A CHIP EMULATORUSING JSSIP AND ASTERISK TO MAKE A WEBPHONEC++ WEBSOCKET SERVERSIP ATTACK BANNINGBLOCK CACHING AND WRITEBACKBEAGLEBONE BLACK BARE METAL DEVELOPEMENTARM BARE METAL DEVELOPMENTUSING EPOLLMEMORY PAGINGIMPLEMENTING HTTP DIGEST AUTHENTICATIONSTACK FRAME AND THE RED ZONE (X86_64)AVX/SSE AND CONTEXT SWITCHINGHOW TO ANSWER A QUESTION THE SMART WAY.REALTEK 8139 NETWORK CARD DRIVERREST INTERFACE ENGINECISCO 1760 AS AN FXS GATEWAYHOME AUTOMATION SYSTEMEZFLORA IRRIGATION SYSTEMSUMP PUMP MONITORINGBUILDING A HOSTED MAILSERVER SERVICEI AM NOW HOSTING MY OWN DNS AND MAIL SERVERS ON AMAZON EC2DEPLOYING A LAYER3 SWITCH ON MY NETWORKACD SERVER WITH RESIPROCATEC++ JSON LIBRARYIMPLEMENTING YOUR OWN MUTEX WITH CMPXCHGWAKEUPCALL SERVER USING RESIPROCATEFFT ON AMD64CLONING A HARD DRIVECONFIGURING AND USING KVM-QEMUUSING COUCHDBINSTALLING COUCHDB ON SLACKWARENGW100 MY OS AND EDXS/LSENGW100 - MY OSASTERISK FILTER APPLICATIONCISCO ROUTER CONFIGURATIONAASTRA 411 XML APPLICATIONSPA941 PHONEBOOKSPEEDTOUCH 780 DOCUMENTATIONAASTRA CONTACT LIST XML APPLICATIONAVR32 OS FOR NGW100ASTERISK SOUND INJECTION APPLICATIONNGW100 - DIFFERENT PROBLEMS AND SOLUTIONSAASTRA PRIME RATE XML APPLICATIONSPEEDTOUCH 780 CONFIGURATIONUSING COUCHDB WITH PHPAVR32 ASSEMBLY TIPAP7000 AND NGW100 ARCHITECTUREAASTRA WEATHER XML APPLICATIONNGW100 - GETTING STARTEDAASTRA ALI XML APPLICATION

NGW100 - DIFFERENT PROBLEMS AND SOLUTIONS

2012-02-25

AVR32 troubleshooting

In this section, I will describe different problems I ran into. Everytime I spend a lot of time trying to figure why something did not work, I will post the found solutions here.

Illegal opcode with conditional instructions

Everytime I was using "addhi" I got an illegal opcode exception. The worse thing was that I was using addhi inside and exception handler. This is because it seems that my CPU uses architecture revision 1. when looking at the isntruction set reference, you can see that these instructions are meant to be used on revision 2 architecture. It is a shame because I couldn't wait to use those.... oh well.

Unrecoverable exception on scall

Everytime I was using "scall", the "unrecoverable exception" was issued instead of EVBA+0x100. I found out that this is because EVBA was not alligned on a 8kb oundary

Copying to parallel flash using u-boot

The address ranges in the AT49BV642D datasheet are 16bit words! So when they say that the sector 23 resides from 0x80000 up to 0x87FFF, it really means from 0x100000 to 0x107FFF.

ASID field in page table

I could understand from the architecture document that the ASID field in a page table entry (from the TLB) is used by the MMU to match the current process ID. What I could not understand was that the ASID field is matched... against what? Yes it is matched against the processID but where is the current proces ID stored? It is in the TLBEHI register. so the TLBEHI[ASID] field should not only be filled before loading a page in the TLB, it should be loaded ALL the time since it will be used for the comparison as well.

Locking entries in TLB

When setting DLA or ILA in MMUCR, make sure you change DRP or IRP accordingly. If you lock the first entry and leave DRP (or IRP) to 0, you will never be able to write anything in the TLB

INTC not working properly, values written to IPR are read back as zero

Make sure that INTC is enabled in PBBMASK (See power manager)

Comparing a page with buffer on the dataflash always says that the page matches even though it is different

When I was reading a page (using 0x87) , then writting something else to buffer1. A buffer comparison always returned that the pages matched. To fix this, I am now using buffer2 to write and compare. It solves the problem but it doesn't make any sense.

MACB: RBQP increases when receiving frames but descriptor's ownership flag does not change

It is important to load RBQP with a physical address (not virtual address). Descriptors must also be loaded with physical addresses. Also, even if reading descriptors from the P2 segment (uncached memory), it is important to invalidate the cache ("cache r0[0],0b1011").