The city walls - whose original layout is generally attributed to Arechian planning, but which the documents of Cavensi repeatedly indicate as pre-existing in different segments, sometimes defined as "
destructi" - descended from the castle along the western slopes of the Bonadies hill, lapped the monastery of San Nicola della Palma, until it opens into the Porta dei Respizzi. From this point it continued to Porta Nocerina, continuing east to the steps of S. Maria della Lama. It then descended towards the sea, to largo Campo and to Porta di mare, next to which a tower was also built. Parallel to the coastline it reached the largo Dogana Regia, from which it continued eastwards towards the monasteries of San Michele and San Benedetto, leaving the latter extra moenia, outside Porta Elina. The final stretch went up via Bastioni, through Porta Rotese, until it rejoined the castle. Only later, at the end of the eighth century, the walls were enlarged to the east by Prince Grimoaldo, to also incorporate the monastery of San Benedetto and the nearby area called Orto Magno. The construction of the walls attributes to Arechi the role of "founder" of Salerno: the walls identify the very essence of the city in the Lombard mentality. The fact, then, that the enclosure included a large part of non-urbanized territory is certainly an indication of a precise plan for the reorganization of the pre-existing city fabric.