Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Kevin Pedretti: memory calculation fix
Jack Lange [Fri, 20 Feb 2009 19:17:58 +0000 (13:17 -0600)]
palacios/src/devices/nvram.c

index a8bfc53..4e9527b 100644 (file)
@@ -462,7 +462,7 @@ static void set_memory_size(struct nvram_internal * nvram, addr_t bytes) {
 
   {
     // Set the extended memory beyond 16 MB in 64k chunks
-    uint16_t mem_chunks = bytes * (1024 / 64);
+    uint16_t mem_chunks = (bytes - (1024 * 1024 * 16)) / (1024 * 64);
     nvram->mem_state[NVRAM_REG_AMI_BIG_MEMORY_HIGH] = (mem_chunks >> 8) & 0x00ff;
     nvram->mem_state[NVRAM_REG_AMI_BIG_MEMORY_LOW] = mem_chunks & 0x00ff;
   }